Announcement Announcement Module
Collapse
No announcement yet.
spring security and glassfish 2.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring security and glassfish 2.1

    At first: For something like spring-roo i was waiting for. Great Idea. Playing something with spring-roo (M2) makes fun. "mvn tomcat:run" works as expected. But my target container will be glassfish. Is that exception related to environment differences between glassfish and tomcat? Did someone try glassfish too?

    Code:
    [#|2009-06-22T20:29:37.952+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpWorkerThread-4848-2;_RequestID=dbd9808b-e7b5-4308-aca1-05b224df082c;|WebModule[/cleanerfish-0.1.0-SNAPSHOT]PWC1270: Ausnahmefehler beim Starten von Filter springSecurityFilterChain
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:443)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:986)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:259)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:179)
    	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:872)
    	at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:217)
    	at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:145)
    	at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:179)
    	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:273)
    	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:385)
    	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:119)
    	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4498)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:5317)
    	at com.sun.enterprise.web.WebModule.start(WebModule.java:353)

  • #2
    Hi,

    Thanks for making us aware of this problem!

    I have just tested this myself and it appears that GlassFish has problems with the wildcard matching pattern for the contextConfigLocation param in the web.xml.

    I got it to work by explicitly specifying the application contexts used in this application:

    Code:
    	
    <context-param>
    	<param-name>contextConfigLocation</param-name>
    	<param-value>classpath:applicationContext.xml
    	classpath:applicationContext-security.xml</param-value></context-param>
    I will raise a Jira ticket in Roo so we can review our default application context handling.

    Btw: there seems to be a bug ticket for this in the GlassFish bug tracker:
    https://glassfish.dev.java.net/issue...ug.cgi?id=5441

    Hope this helps!


    Cheers,

    Stefan

    Comment


    • #3
      Thanks. It works.

      Comment

      Working...
      X