PDA

View Full Version : Upgrading Spring Security throws error



kannanMugundan
Jul 21st, 2009, 07:15 AM
Hi,


I am using spring Blazeds Integration GA1 and I tried to updgrade Spring Security from 2.0.4 to M1 and I endup with this below exception




SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/config/web-application-config.xml]; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/ConfigAttributeDefinition
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:394)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:316)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:284)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:125)
at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:93)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:126)
at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:419)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:349)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:254)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:198)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
Caused by: java.lang.NoClassDefFoundError: org/springframework/security/ConfigAttributeDefinition
at org.springframework.flex.config.xml.MessageBrokerB eanDefinitionParser.parseConfigAttributeDefinition (MessageBrokerBeanDefinitionParser.java:302)
at org.springframework.flex.config.xml.MessageBrokerB eanDefinitionParser.registerEndpointInterceptorIfN ecessary(MessageBrokerBeanDefinitionParser.java:35 8)
at org.springframework.flex.config.xml.MessageBrokerB eanDefinitionParser.configureSecurity(MessageBroke rBeanDefinitionParser.java:297)
at org.springframework.flex.config.xml.MessageBrokerB eanDefinitionParser.doParse(MessageBrokerBeanDefin itionParser.java:213)
at org.springframework.beans.factory.xml.AbstractSing leBeanDefinitionParser.parseInternal(AbstractSingl eBeanDefinitionParser.java:85)
at org.springframework.beans.factory.xml.AbstractBean DefinitionParser.parse(AbstractBeanDefinitionParse r.java:56)
at org.springframework.beans.factory.xml.NamespaceHan dlerSupport.parse(NamespaceHandlerSupport.java:72)
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1320)
at org.springframework.beans.factory.xml.BeanDefiniti onParserDelegate.parseCustomElement(BeanDefinition ParserDelegate.java:1310)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:475)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:372)
... 28 more

Please Excuse me , I have posted this problem already in spring Security forum, but I think that this exception is some what related to message broker and flex-blazeds, so thought I will post here also , I have attached my web and application config file in that post http://forum.springsource.org/showthread.php?t=75106


Please help to fix this issue.

jeremyg484
Jul 21st, 2009, 11:59 AM
Spring Security 3.0 has changed some of their package structure around, including some classes that we depend on, so Spring BlazeDS Integration 1.0 will not work correctly with it. I have added a Jira for this: http://jira.springframework.org/browse/FLEX-65, and it is something we will likely try to adress in a 1.1 release.

aalbericio
Nov 2nd, 2009, 04:32 AM
Hi Jeremy,

Please could you confirm what combinations of Spring versions are currently supported by SpringBlazeDS 1.0.1.RELEASE?

1) Spring 2.5.6 + Spring Security 2.0.5 ( works? )
2) Spring 3.0.0M3 + Spring Security 3.0.0RC1 ( works? )
3) Etc

Is there any new on when SpringBlazeDS 1.1 willl be released or supporting Spring 3*

Thank you so much.

jeremyg484
Nov 9th, 2009, 12:45 PM
1) Spring 2.5.6 + Spring Security 2.0.5 ( works? )


Yes.



2) Spring 3.0.0M3 + Spring Security 3.0.0RC1 ( works? )


Does not work because API refactoring in Spring Security 3 breaks the current integration.



Is there any new on when SpringBlazeDS 1.1 willl be released or supporting Spring 3*


It is our intention that you should be able to use Spring BlazeDS 1.0.x with Spring 3, but not Spring Security 3. Note that the latest Spring Security 2.0.5 is also intended to work with Spring 3, though it obviously doesn't take advantage of the Spring 3-specific features. If you find any incompatibility with the supported combination Spring 3 + Spring BlazeDS 1.0.1 + Spring Security 2.0.5, please raise a Jira and we will release further 1.0.x maintenance updates to correct.

Spring BlazeDS 1.5 will update the supported stack to Spring 3.x, Spring Security 3.x, BlazeDS 4.x, and LCDS 3.x. Assuming the release of BlazeDS 4 / LCDS 3 does not slide further, our target final release date of Spring BlazeDS 1.5 is calendar Q1 of 2010. Though we should have the first official milestone available in December.

aalbericio
Nov 10th, 2009, 06:11 AM
Thank you Jeremy. For now, I can live with Spring 2.5.6 + Spring Security 2.0.5 but it's good to hear you are working to support Spring 3 products and BlazeDS 4.

Thanks.