View Full Version : No bean named 'grailsUrlMappingsHolder' is defined
fitzecarraldo76
Jan 3rd, 2011, 09:23 PM
Hello,
I am running into a problem while deploying a grails application. It works when i deploy it on Tomcat, but deploying on SAP NetWeaver Application Server i receive this error: No bean named 'grailsUrlMappingsHolder' is defined
I assume this is a problem during initialization happening inside the grails plugin, as no such bean is defined in the application XML.
How can i resolve this issue, anz help appreciated
Best wishes
Sebastian
burtbeckwith
Jan 3rd, 2011, 11:02 PM
Quite often errors like this are very misleading, and the real information is contained far down in the stacktrace. Often when there's a problem in the application context configuration, the real error causes a chain of other errors and the last one is the one you see at the top, but it's a red herring.
Could you post the complete stack trace?
fitzecarraldo76
Jan 4th, 2011, 12:06 AM
Hi Burt,
Ok below is the complete stack trace of the error message.
I saw that during initialization there s also a Warning in my App Server traces
that says "Warning occurred on server 3961150 during startApp JavaEE/SimpleGrailsProject-0.1 : Initialization of servlet [gsp] failed. Check init() method of servlet. Error is: [org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'groovyPagesTemplateEngine' is defined]"
Here s the stack trace of the original error message. I see there's something
going on with AccessController's, but not quite clear what it means, any hints?
Processing HTTP request to servlet [default] finished with error. The error is: org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'grailsUrlMappingsHolder' is defined
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeanDefinition(DefaultListab leBeanFactory.java:504)
at org.springframework.beans.factory.support.Abstract BeanFactory.getMergedLocalBeanDefinition(AbstractB eanFactory.java:1041)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:273 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:265 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.context.support.AbstractApplic ationContext.getBean(AbstractApplicationContext.ja va:1004)
at org.codehaus.groovy.grails.web.util.WebUtils.looku pUrlMappings(WebUtils.java:137)
at org.codehaus.groovy.grails.web.mapping.filter.UrlM appingsFilter.doFilterInternal(UrlMappingsFilter.j ava:84)
at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at org.codehaus.groovy.grails.web.sitemesh.GrailsPage Filter.obtainContent(GrailsPageFilter.java:249)
at org.codehaus.groovy.grails.web.sitemesh.GrailsPage Filter.doFilter(GrailsPageFilter.java:140)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at org.codehaus.groovy.grails.web.servlet.filter.Grai lsReloadServletFilter.doFilterInternal(GrailsReloa dServletFilter.java:101)
at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at org.codehaus.groovy.grails.web.servlet.mvc.GrailsW ebRequestFilter.doFilterInternal(GrailsWebRequestF ilter.java:65)
at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at org.codehaus.groovy.grails.web.filters.HiddenHttpM ethodFilter.doFilterInternal(HiddenHttpMethodFilte r.java:66)
at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at org.springframework.web.filter.CharacterEncodingFi lter.doFilterInternal(CharacterEncodingFilter.java :88)
at org.springframework.web.filter.OncePerRequestFilte r.doFilter(OncePerRequestFilter.java:76)
at org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
at org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)
at com.sap.engine.services.servlets_jsp.server.runtim e.FilterChainImpl.doFilter(FilterChainImpl.java:74 )
at com.sap.engine.services.servlets_jsp.server.HttpHa ndlerImpl.runServlet(HttpHandlerImpl.java:425)
at com.sap.engine.services.servlets_jsp.server.HttpHa ndlerImpl.handleRequest(HttpHandlerImpl.java:289)
at com.sap.engine.services.httpserver.server.RequestA nalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestA nalizer.startServlet(RequestAnalizer.java:376)
at com.sap.engine.services.servlets_jsp.filters.Servl etSelector.process(ServletSelector.java:85)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.servlets_jsp.filters.Appli cationSelector.process(ApplicationSelector.java:16 0)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.WebCont ainerInvoker.process(WebContainerInvoker.java:67)
at com.sap.engine.services.httpserver.chain.HostFilte r.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.Respons eLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilte r.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.DefineH ostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFil ter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.Monitor ingFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFil ter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractC hain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.server.Processo r.chainedRequest(Processor.java:309)
at com.sap.engine.services.httpserver.server.Processo r$FCAProcessorThread.run(Processor.java:222)
at com.sap.engine.core.thread.impl3.ActionObject.run( ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.exec ute(SingleThread.java:152)
at com.sap.engine.core.thread.impl3.SingleThread.run( SingleThread.java:247)
fitzecarraldo76
Jan 6th, 2011, 04:55 AM
Quite often errors like this are very misleading, and the real information is contained far down in the stacktrace. Often when there's a problem in the application context configuration, the real error causes a chain of other errors and the last one is the one you see at the top, but it's a red herring.
Could you post the complete stack trace?
Hi Burt,
I am not quite clear if the cause is visible in the stacktrace above, but that's all i get as error.
Is there any other way to initiate the urlMapping Bean manually (e.g. with the applicationContext file) ?
I am a little confused where it gets created, must be somewhere inside of the grails framework, right?
Sebastian
fitzecarraldo76
Jan 13th, 2011, 05:45 AM
Update,
I found deep in the traces some errors in processing Grails Taglibs.
"spring-form.tld is not Java EE 5 compatible, because of this annotations will not be processed."
So it seems some of the taglibs are not compatible to Jee 5?
Any hints how i could resolve that?
rrabbit
Mar 17th, 2011, 03:49 AM
Hi,
did you manage to solve the problem? If so, it would be great if you could share your solution :-)
fitzecarraldo76
Mar 17th, 2011, 12:16 PM
Hello rrabbit,
In the end this was a classic grails classloader issue.
I resolved it by puting all jars of grails into a library and reference it with
what SAP calls "heavy class loader", this is a classloader that gets loaded before
all SAP J2EE core classes.
See more information about it here:
https://cw.sdn.sap.com/cw/docs/DOC-106403
or this article about Hibernate deployments on SAP NetWeaver in the SAP
Developer network (applies to Grails, too):
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50c5bd44-36c6-2c10-9283-9a26354c7aa9?QuickLink=index&overridelayout=true
With best regards
Sebastian
renannery
Oct 11th, 2011, 09:50 AM
Friends,
I'm having trouble start in my Tomcat 6.0 server after implementation of Spring 3.1. Going up the server error occurs below
No bean named 'springSecurityFilterChain' is defined
My web.xml
[...]
<!-- SPRING -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListe ner</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestCon textListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessi onEventPublisher</listener-class>
</listener>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterPro xy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<context-param>
<param-name>contexConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
/WEB-INF/applicationContext-security.xml
</param-value>
</context-param>
<context-param>
<param-name>contextClass</param-name>
<param-value>
org.springframework.web.context.support.Annotation ConfigWebApplicationContext
</param-value>
</context-param>
<!-- <listener> <listener-class>org.springframework.web.context.ContextLoaderListe ner</listener-class>
</listener> -->
<!-- FECHA SPRING -->
[...]
MY applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<b:beans xmlns="http://www.springframework.org/schema/security"
xmlns:b="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<http>
<intercept-url pattern="/admin/**" access="ROLE_ADMINISTRADOR" />
<intercept-url pattern="/restrito/**" access="ROLE_USUARIO" />
<form-login login-page="/publico/login.jsf"
always-use-default-target="true" default-target-url="/restrito/principal.jsf"
authentication-failure-url="/publico/login.jsf?login_error=1" />
<logout />
<remember-me />
</http>
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="sdkStoreDataSource"
authorities-by-username-query="SELECT
u.login, p.permissao FROM usuario u, usuario_permissao p WHERE u.id_usuario
= p.permissao AND u.login = ?"
users-by-username-query="SELECT login, senha,
ativo FROM usuario WHERE login = ?" />
</authentication-provider>
</authentication-manager>
</b:beans>
My applicationContext-security.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="sdkStoreDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/sdkStoreDB</value>
</property>
</bean>
<beans:bean id="springSecurityFilterChain" class="org.springframework.security.util.FilterChainProxy">
<filter-chain-map path-type="ant">
<filter-chain pattern="/**" filters="sif"/>
</filter-chain-map>
</beans:bean>
</beans>
burtbeckwith
Oct 11th, 2011, 10:21 AM
renannery - this is a Grails forum, and you appear to be using Spring. Plus you should post a new question instead of replying to an older thread.
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.