Announcement Announcement Module
Collapse
No announcement yet.
No bean named 'grailsUrlMappingsHolder' is defined Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No bean named 'grailsUrlMappingsHolder' is defined

    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

  • #2
    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?

    Comment


    • #3
      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?

      Code:
      Processing HTTP request to servlet [default] finished with error. The error is: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'grailsUrlMappingsHolder' is defined
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:504)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:265)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
      at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1004)
      at org.codehaus.groovy.grails.web.util.WebUtils.lookupUrlMappings(WebUtils.java:137)
      at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:84)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:249)
      at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:140)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.codehaus.groovy.grails.web.servlet.filter.GrailsReloadServletFilter.doFilterInternal(GrailsReloadServletFilter.java:101)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:65)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:66)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:425)
      at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
      at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)
      at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
      at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
      at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
      at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
      at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
      at com.sap.engine.services.httpserver.server.Processor$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.execute(SingleThread.java:152)
      at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)

      Comment


      • #4
        Originally posted by burtbeckwith View Post
        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

        Comment


        • #5
          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?

          Comment


          • #6
            Hi,

            did you manage to solve the problem? If so, it would be great if you could share your solution :-)

            Comment


            • #7
              It's a class loader issue

              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/po...idelayout=true

              With best regards
              Sebastian

              Comment


              • #8
                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
                Code:
                [...]
                	<!-- SPRING -->
                
                	<listener>
                		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                	</listener>
                	<listener>
                		<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
                	</listener>
                	<listener>
                		<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
                	</listener>
                
                	<filter>
                		<filter-name>springSecurityFilterChain</filter-name>
                		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</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.AnnotationConfigWebApplicationContext    
                         </param-value>
                	</context-param>
                
                	<!-- <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
                		</listener> -->
                	<!-- FECHA SPRING -->
                
                [...]
                MY applicationContext.xml
                Code:
                <?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
                Code:
                <?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>

                Comment


                • #9
                  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.

                  Comment

                  Working...
                  X