doinotlikeit
May 22nd, 2008, 05:57 PM
Hi,
We're tying to get Spring DM, CFX, and Equinox working. So far everything looks good except the classloader problem encountered when trying to configure CFX using Spring config file.
We're trying to import the CXF bean configuration file into our main application context configuration file read by Spring DM. How to configure CFX using Spring is described here http://cwiki.apache.org/CXF20DOC/configuration.html. We're trying to import the cxf.xml file as below:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
...
</beans>
The Spring-enabled application bundle contains the cxf-2.1.jar and that jar contains the cxf.xml. When Equinox starts up, here's what we get:
Starting Service Container ...
osgi> May 22, 2008 5:28:31 PM org.springframework.osgi.extender.internal.activat or.ContextLoaderListener start
INFO: Starting [org.springframework.bundle.osgi.extender] bundle v.[1.1.0.m2]
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.support .NamespaceManager hasCompatibleNamespaceType
WARNING: Bundle spring-aop (org.springframework.bundle.spring.aop) cannot see org.springframework.beans.factory.xml.NamespaceHan dlerResolver; ignoring its namespace handle
rs
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.support .ExtenderConfiguration <init>
INFO: No custom configuration detected; using defaults
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.activat or.ContextLoaderListener addDefaultPostProcessors
INFO: Disabled automatic Spring-DM annotation processing; [ org.springframework.osgi.extender.annotation.auto. processing=null]
May 22, 2008 5:28:32 PM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
INFO: Refreshing org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext@1e2670b: display name [OsgiBundleXmlApplicationContext(bundle=com.ihg.ser vice.res
ervation.web, config=osgibundle:/META-INF/spring/*.xml)]; startup date [Thu May 22 17:28:32 EDT 2008]; root of context hierarchy
May 22, 2008 5:28:32 PM org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext startRefresh
SEVERE: Pre refresh error
java.lang.IllegalArgumentException: interface org.springframework.beans.factory.xml.NamespaceHan dlerResolver is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:3 53)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.jav a:581)
at org.springframework.aop.framework.JdkDynamicAopPro xy.getProxy(JdkDynamicAopProxy.java:117)
at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.java:110)
at org.springframework.osgi.context.support.TrackingU til.getService(TrackingUtil.java:127)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.lookupNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:260)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.createNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:214)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.loadBeanDefinitions(OsgiBun dleXmlApplicationContext.java:129)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:423)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.startRefresh(A bstractDelegatedExecutionApplicationContext.java:2 06)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.stageOne(DependencyWaiterApplicationContext Executor.j
ava:218)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.refresh(DependencyWaiterApplicationContextE xecutor.ja
va:169)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.refresh(Abstra ctDelegatedExecutionApplicationContext.java:131)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener$2.run(ContextLoaderListen er.java:674)
at java.lang.Thread.run(Thread.java:619)
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor fail
SEVERE: Unable to create application context for [com.ihg.service.reservation.web], unsatisfied dependencies: none
java.lang.IllegalArgumentException: interface org.springframework.beans.factory.xml.NamespaceHan dlerResolver is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:3 53)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.jav a:581)
at org.springframework.aop.framework.JdkDynamicAopPro xy.getProxy(JdkDynamicAopProxy.java:117)
at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.java:110)
at org.springframework.osgi.context.support.TrackingU til.getService(TrackingUtil.java:127)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.lookupNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:260)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.createNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:214)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.loadBeanDefinitions(OsgiBun dleXmlApplicationContext.java:129)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:423)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.startRefresh(A bstractDelegatedExecutionApplicationContext.java:2 06)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.stageOne(DependencyWaiterApplicationContext Executor.j
ava:218)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.refresh(DependencyWaiterApplicationContextE xecutor.ja
va:169)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.refresh(Abstra ctDelegatedExecutionApplicationContext.java:131)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener$2.run(ContextLoaderListen er.java:674)
at java.lang.Thread.run(Thread.java:619)
We suspect this is due to the warning message below:
WARNING: Bundle spring-aop (org.springframework.bundle.spring.aop) cannot see org.springframework.beans.factory.xml.NamespaceHan dlerResolver; ignoring its namespace handle
Any help on resolving this is much appreciated.
Thanks,
Ron
We're tying to get Spring DM, CFX, and Equinox working. So far everything looks good except the classloader problem encountered when trying to configure CFX using Spring config file.
We're trying to import the CXF bean configuration file into our main application context configuration file read by Spring DM. How to configure CFX using Spring is described here http://cwiki.apache.org/CXF20DOC/configuration.html. We're trying to import the cxf.xml file as below:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
...
</beans>
The Spring-enabled application bundle contains the cxf-2.1.jar and that jar contains the cxf.xml. When Equinox starts up, here's what we get:
Starting Service Container ...
osgi> May 22, 2008 5:28:31 PM org.springframework.osgi.extender.internal.activat or.ContextLoaderListener start
INFO: Starting [org.springframework.bundle.osgi.extender] bundle v.[1.1.0.m2]
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.support .NamespaceManager hasCompatibleNamespaceType
WARNING: Bundle spring-aop (org.springframework.bundle.spring.aop) cannot see org.springframework.beans.factory.xml.NamespaceHan dlerResolver; ignoring its namespace handle
rs
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.support .ExtenderConfiguration <init>
INFO: No custom configuration detected; using defaults
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.activat or.ContextLoaderListener addDefaultPostProcessors
INFO: Disabled automatic Spring-DM annotation processing; [ org.springframework.osgi.extender.annotation.auto. processing=null]
May 22, 2008 5:28:32 PM org.springframework.context.support.AbstractApplic ationContext prepareRefresh
INFO: Refreshing org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext@1e2670b: display name [OsgiBundleXmlApplicationContext(bundle=com.ihg.ser vice.res
ervation.web, config=osgibundle:/META-INF/spring/*.xml)]; startup date [Thu May 22 17:28:32 EDT 2008]; root of context hierarchy
May 22, 2008 5:28:32 PM org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext startRefresh
SEVERE: Pre refresh error
java.lang.IllegalArgumentException: interface org.springframework.beans.factory.xml.NamespaceHan dlerResolver is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:3 53)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.jav a:581)
at org.springframework.aop.framework.JdkDynamicAopPro xy.getProxy(JdkDynamicAopProxy.java:117)
at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.java:110)
at org.springframework.osgi.context.support.TrackingU til.getService(TrackingUtil.java:127)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.lookupNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:260)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.createNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:214)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.loadBeanDefinitions(OsgiBun dleXmlApplicationContext.java:129)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:423)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.startRefresh(A bstractDelegatedExecutionApplicationContext.java:2 06)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.stageOne(DependencyWaiterApplicationContext Executor.j
ava:218)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.refresh(DependencyWaiterApplicationContextE xecutor.ja
va:169)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.refresh(Abstra ctDelegatedExecutionApplicationContext.java:131)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener$2.run(ContextLoaderListen er.java:674)
at java.lang.Thread.run(Thread.java:619)
May 22, 2008 5:28:32 PM org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor fail
SEVERE: Unable to create application context for [com.ihg.service.reservation.web], unsatisfied dependencies: none
java.lang.IllegalArgumentException: interface org.springframework.beans.factory.xml.NamespaceHan dlerResolver is not visible from class loader
at java.lang.reflect.Proxy.getProxyClass(Proxy.java:3 53)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.jav a:581)
at org.springframework.aop.framework.JdkDynamicAopPro xy.getProxy(JdkDynamicAopProxy.java:117)
at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.java:110)
at org.springframework.osgi.context.support.TrackingU til.getService(TrackingUtil.java:127)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.lookupNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:260)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.createNamespaceHandlerResol ver(OsgiBundleXmlApplicationContext.java:214)
at org.springframework.osgi.context.support.OsgiBundl eXmlApplicationContext.loadBeanDefinitions(OsgiBun dleXmlApplicationContext.java:129)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:423)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.startRefresh(A bstractDelegatedExecutionApplicationContext.java:2 06)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.stageOne(DependencyWaiterApplicationContext Executor.j
ava:218)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor.refresh(DependencyWaiterApplicationContextE xecutor.ja
va:169)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.refresh(Abstra ctDelegatedExecutionApplicationContext.java:131)
at org.springframework.osgi.extender.internal.activat or.ContextLoaderListener$2.run(ContextLoaderListen er.java:674)
at java.lang.Thread.run(Thread.java:619)
We suspect this is due to the warning message below:
WARNING: Bundle spring-aop (org.springframework.bundle.spring.aop) cannot see org.springframework.beans.factory.xml.NamespaceHan dlerResolver; ignoring its namespace handle
Any help on resolving this is much appreciated.
Thanks,
Ron