Deploying a WAB with Spring Security 3.0.5 in bundle-classpath [message #756334] |
Sat, 12 November 2011 02:51  |
Eclipse User |
|
|
|
I'm bundling my maven project as a wab, using the maven-bundle-plugin. The wab contain spring-security-config3.0.5.RELEASE in WEB-INF/lib folder.
When start the bundle on the osgi shell, I get the following exception.
org.springframework.beans.FatalBeanException: Class [org.springframework.security.config.SecurityNamespaceHandler] for namespace [www.springframework.org/schema/security] does not implement the [org.springframework.beans.factory.xml.NamespaceHandler] interface
I did a clhas through the shell on the SecurityNamespaceHandler class and my module seems to be the only one which has the class
I did a clload on the same class again and this time, the bundle started without any exceptions and was put to the ACTIVE state.
Questions I have,
1. Virgo uses spring 3.0. Does it have an older version of SecurityNamespaceHandler class in its path? The reason I ask this is because, digging through some code, it seems like the xmlbean factory looks for the class in a specific class loader. I'm not packaging the spring modules (packaging only the security modules) and use spring services provided by virgo. If that is the case, the class in my bundle class path may not have been loaded.
2. If Case1 is true, should i package spring with my app and stop using the provided spring framework?
|
|
|
|
|
|
|
Re: Deploying a WAB with Spring Security 3.0.5 in bundle-classpath [message #757120 is a reply to message #757115] |
Wed, 16 November 2011 10:38  |
Eclipse User |
|
|
|
There is reference to this issue in the docs 6.4 Form Tags Shared Services WAR.
It is in a bit of a obscure place. Click on the link and look for Note in "Accessing the Service and Types from the WAR" section. It is one of the things that we will have to move to an FAQ section. I will submit and issue to do it.
As for the idea that I mentioned in the first reply - it did not have to do with import/export directly but with the way spring-dm 1.2.x implemented namespace handling. Now that I think more of it - it should not have mattered at all anyway. You are not using osgi shared services model.
Regards,
Dmitry
|
|
|
Powered by
FUDForum. Page generated in 0.06625 seconds