You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by NCorbet <Ne...@gmail.com> on 2014/02/11 20:15:33 UTC

CXFDOSGI 1.4 Jaxb Classloader issue

Hello all,

I have a perplexing problem. I am using CXFDosgi 1.4 ( 2.7.2 ) and Java
1.7.0_21.

I have a Junit test that contains the following code in the setUp() method:

@Before
	public void setUp() {
		baseUrl = System.getProperty("envoy-base-url");
		factory = new JaxWsProxyFactoryBean();
		factory.getInInterceptors().add(new LoggingInInterceptor());
		factory.getOutInterceptors().add(new LoggingOutInterceptor());
		
				
		factory.setServiceClass(ElpManagementService.class);
		factory.setAddress(baseUrl + "elpManagement");
		emsClient = (ElpManagementService) factory.create();

		factory.setServiceClass(UnitDataService.class);
		factory.setAddress(baseUrl + "unitData");
		udsClient = (UnitDataService) factory.create();

		sessionPropertiesHolder = new Holder<String>();
		try {
			emsClient.startSession(sessionPropertiesHolder);
		} catch (ServiceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

When running from Eclipse ( select unit test, Debug As, Junit Test ), my
test connects to the remote and processes fine. My Test passes. No Problems.

When I run my test from maven ( I am using Tycho Surefire Plugin
integration-test goal), my test does not run and contains the following
failure ( cause highlighted in bold ):

org.apache.cxf.service.factory.ServiceConstructionException
	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:332)
	at
org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:475)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:537)
	at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:249)
	at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
	at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
	at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
	at
org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.setUp(TestUnitTransactionData.java:42)
	at junit.framework.TestCase.runBare(TestCase.java:139)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
	at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
	at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
	at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
	at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
	at
org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:85)
	at
org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
*Caused by: javax.xml.bind.JAXBException
 - with linked exception:
[javax.xml.bind.JAXBException: property
"com.sun.xml.bind.defaultNamespaceRemap" is not supported]*
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:237)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:396)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
	at
org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:267)
	at
org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:265)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:265)
	at
org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:172)
	at
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:464)
	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:330)


I run my Junit test from the pde while passing -verbose:class to the JVM and
I can see entries like the following:

[Loaded javax.xml.bind.JAXBContext from C:\Program
Files\Java\jdk1.7.0_21\jre\lib\rt.jar]

When I run the test through maven, using the -verbose:class command I do not
see javax.xml.bind being loaded anywhere. I do see entries from classes
being loaded from my jre, just not these.

Does anyone have any advice with classloading, Maven, and Jaxb? 



--
View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840.html
Sent from the cxf-user mailing list archive at Nabble.com.

RE: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by Andrei Shakirin <as...@talend.com>.
Hi Neil,

Basically "No binding factory for namespace http://schemas.xmlsoap.org/soap/ registered" could mean that cxf-rt-bindings-soap bundle is not available or started too late.
Perhaps that helps.

Regards,
Andrei.

> -----Original Message-----
> From: NCorbet [mailto:Neil.Corbet@gmail.com]
> Sent: Dienstag, 11. Februar 2014 21:01
> To: users@cxf.apache.org
> Subject: Re: CXFDOSGI 1.4 Jaxb Classloader issue
> 
> Well,
> 
> Changing the start level got me past that issue. Now I have the following
> issue:
> 
> *org.apache.cxf.service.factory.ServiceConstructionException: Could not
> resolve a binding for null*
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo
> (AbstractWSDLBasedEndpointFactory.java:350)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInf
> o(AbstractWSDLBasedEndpointFactory.java:258)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(A
> bstractWSDLBasedEndpointFactory.java:143)
> 	at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
> 	at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBea
> n.java:156)
> 	at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.j
> ava:156)
> 	at
> org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.se
> tUp(TestUnitTransactionData.java:42)
> 	at junit.framework.TestCase.runBare(TestCase.java:139)
> 	at junit.framework.TestResult$1.protect(TestResult.java:122)
> 	at junit.framework.TestResult.runProtected(TestResult.java:142)
> 	at junit.framework.TestResult.run(TestResult.java:125)
> 	at junit.framework.TestCase.run(TestCase.java:129)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255)
> 	at junit.framework.TestSuite.run(TestSuite.java:250)
> 	at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
> 	at org.junit.runners.Suite.runChild(Suite.java:127)
> 	at org.junit.runners.Suite.runChild(Suite.java:26)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
> 	at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider
> .java:123)
> 	at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:10
> 4)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> mpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(Reflecti
> onUtils.java:164)
> 	at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(Provi
> derFactory.java:110)
> 	at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStart
> er.java:175)
> 	at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireSt
> arter.java:123)
> 	at
> org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBoote
> r.java:85)
> 	at
> org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTest
> Application.java:21)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> mpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException
> (EclipseAppContainer.java:587)
> 	at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:1
> 98)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(E
> clipseAppLauncher.java:110)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseApp
> Launcher.java:79)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> mpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> *Caused by: org.apache.cxf.BusException: No binding factory for namespace
> http://schemas.xmlsoap.org/soap/ registered.*
> 	at
> org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(B
> indingFactoryManagerImpl.java:123)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo
> (AbstractWSDLBasedEndpointFactory.java:338)
> 	... 53 more
> 
> I do see the org.apache.cxf.cxf-rt-bindings-soap-2.7.2.jar started. Is this another
> startup order issue?
> 
> Neil
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-
> Jaxb-Classloader-issue-tp5739840p5739843.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by NCorbet <Ne...@gmail.com>.
This is awesome David. In my dealings with CXF and OSGI it has been painful
on a couple different levels. Most have been centered around JAXB and other
dependencies. 

I will mess around with start orders in the morning and let you know what I
find.

Thanks,
Neil



--
View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840p5739846.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by David Bosschaert <da...@gmail.com>.
I *think* there is but I can't really remember which dependency had
the ordering requirement :(

I started working on a subsystem definition for CXF-DOSGi, which is
unfinished, but it does contain what I think was the working order of
dependencies. It might help:
https://svn.apache.org/repos/asf/cxf/dosgi/trunk/distribution/subsystem/src/main/resources/OSGI-INF/SUBSYSTEM.MF

Cheers,

David

On 11 February 2014 20:01, NCorbet <Ne...@gmail.com> wrote:
> Well,
>
> Changing the start level got me past that issue. Now I have the following
> issue:
>
> *org.apache.cxf.service.factory.ServiceConstructionException: Could not
> resolve a binding for null*
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:350)
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:143)
>         at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
>         at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
>         at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
>         at
> org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.setUp(TestUnitTransactionData.java:42)
>         at junit.framework.TestCase.runBare(TestCase.java:139)
>         at junit.framework.TestResult$1.protect(TestResult.java:122)
>         at junit.framework.TestResult.runProtected(TestResult.java:142)
>         at junit.framework.TestResult.run(TestResult.java:125)
>         at junit.framework.TestCase.run(TestCase.java:129)
>         at junit.framework.TestSuite.runTest(TestSuite.java:255)
>         at junit.framework.TestSuite.run(TestSuite.java:250)
>         at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
>         at org.junit.runners.Suite.runChild(Suite.java:127)
>         at org.junit.runners.Suite.runChild(Suite.java:26)
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
>         at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
>         at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
>         at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
>         at
> org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:85)
>         at
> org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
>         at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>         at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>         at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> *Caused by: org.apache.cxf.BusException: No binding factory for namespace
> http://schemas.xmlsoap.org/soap/ registered.*
>         at
> org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123)
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
>         ... 53 more
>
> I do see the org.apache.cxf.cxf-rt-bindings-soap-2.7.2.jar started. Is this
> another startup order issue?
>
> Neil
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840p5739843.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by NCorbet <Ne...@gmail.com>.
Well,

Changing the start level got me past that issue. Now I have the following
issue:

*org.apache.cxf.service.factory.ServiceConstructionException: Could not
resolve a binding for null*
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:350)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:143)
	at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
	at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
	at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
	at
org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.setUp(TestUnitTransactionData.java:42)
	at junit.framework.TestCase.runBare(TestCase.java:139)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
	at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
	at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
	at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
	at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
	at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
	at
org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:85)
	at
org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
	at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
	at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
*Caused by: org.apache.cxf.BusException: No binding factory for namespace
http://schemas.xmlsoap.org/soap/ registered.*
	at
org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123)
	at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338)
	... 53 more

I do see the org.apache.cxf.cxf-rt-bindings-soap-2.7.2.jar started. Is this
another startup order issue?

Neil



--
View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840p5739843.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by NCorbet <Ne...@gmail.com>.
Thanks David, I can set start levels in my Tycho setup. I will give it a
shot.

Neil



--
View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840p5739842.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by David Bosschaert <da...@gmail.com>.
Hi Neil,

The JAXB libraries have some really annoying ordering requirements in
them which makes them not ideal in an OSGi or any modular/dynamic
environment.
If I remember it well, the JAXB impl bundle must be started/resolved
before the JAXB spec bundle because the spec bundle in a static
initializer tries to find the impl class. If it doesn't find it, it
will revert back to a default setting, i.e. classes from rt.jar.

So if you make sure that this ordering is setup correctly then it
should work. One way to do this in OSGi is using start levels.

Hope this helps,

David

On 11 February 2014 19:15, NCorbet <Ne...@gmail.com> wrote:
> Hello all,
>
> I have a perplexing problem. I am using CXFDosgi 1.4 ( 2.7.2 ) and Java
> 1.7.0_21.
>
> I have a Junit test that contains the following code in the setUp() method:
>
> @Before
>         public void setUp() {
>                 baseUrl = System.getProperty("envoy-base-url");
>                 factory = new JaxWsProxyFactoryBean();
>                 factory.getInInterceptors().add(new LoggingInInterceptor());
>                 factory.getOutInterceptors().add(new LoggingOutInterceptor());
>
>
>                 factory.setServiceClass(ElpManagementService.class);
>                 factory.setAddress(baseUrl + "elpManagement");
>                 emsClient = (ElpManagementService) factory.create();
>
>                 factory.setServiceClass(UnitDataService.class);
>                 factory.setAddress(baseUrl + "unitData");
>                 udsClient = (UnitDataService) factory.create();
>
>                 sessionPropertiesHolder = new Holder<String>();
>                 try {
>                         emsClient.startSession(sessionPropertiesHolder);
>                 } catch (ServiceException e) {
>                         // TODO Auto-generated catch block
>                         e.printStackTrace();
>                 }
>         }
>
> When running from Eclipse ( select unit test, Debug As, Junit Test ), my
> test connects to the remote and processes fine. My Test passes. No Problems.
>
> When I run my test from maven ( I am using Tycho Surefire Plugin
> integration-test goal), my test does not run and contains the following
> failure ( cause highlighted in bold ):
>
> org.apache.cxf.service.factory.ServiceConstructionException
>         at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:332)
>         at
> org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:475)
>         at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:537)
>         at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:249)
>         at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
>         at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
>         at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
>         at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
>         at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
>         at
> org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.setUp(TestUnitTransactionData.java:42)
>         at junit.framework.TestCase.runBare(TestCase.java:139)
>         at junit.framework.TestResult$1.protect(TestResult.java:122)
>         at junit.framework.TestResult.runProtected(TestResult.java:142)
>         at junit.framework.TestResult.run(TestResult.java:125)
>         at junit.framework.TestCase.run(TestCase.java:129)
>         at junit.framework.TestSuite.runTest(TestSuite.java:255)
>         at junit.framework.TestSuite.run(TestSuite.java:250)
>         at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
>         at org.junit.runners.Suite.runChild(Suite.java:127)
>         at org.junit.runners.Suite.runChild(Suite.java:26)
>         at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>         at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>         at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
>         at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
>         at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
>         at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
>         at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
>         at
> org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:85)
>         at
> org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
>         at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>         at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
>         at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:601)
>         at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
>         at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
>         at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
>         at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> *Caused by: javax.xml.bind.JAXBException
>  - with linked exception:
> [javax.xml.bind.JAXBException: property
> "com.sun.xml.bind.defaultNamespaceRemap" is not supported]*
>         at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:237)
>         at javax.xml.bind.ContextFinder.find(ContextFinder.java:396)
>         at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
>         at
> org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:267)
>         at
> org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:265)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:265)
>         at
> org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:172)
>         at
> org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:464)
>         at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:330)
>
>
> I run my Junit test from the pde while passing -verbose:class to the JVM and
> I can see entries like the following:
>
> [Loaded javax.xml.bind.JAXBContext from C:\Program
> Files\Java\jdk1.7.0_21\jre\lib\rt.jar]
>
> When I run the test through maven, using the -verbose:class command I do not
> see javax.xml.bind being loaded anywhere. I do see entries from classes
> being loaded from my jre, just not these.
>
> Does anyone have any advice with classloading, Maven, and Jaxb?
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by NCorbet <Ne...@gmail.com>.
Christian,

Our project infrastructure is all Tycho builds and it felt more natural to
keep it all that way.

This article helped make the decision more clear for me:  OSGi Application
Testing with Tycho <http://java.sys-con.com/node/1839682>   

I did get this to finally work at the end of the workday yesterday and
wanted to follow up. 

I am not 100% sure if all of the start orders are correct here ( mostly
whether I needed to control all of the list bundles start number ) but here
is what worked for me:

<plugin>
	            <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                  
<testSuite>my.company.dot.com.integration.test</testSuite>
                     
<testClass>my.company.dot.com.integration.test.EnvoyIntegrationTest</testClass>                 
                   <dependencies>
                     <dependency>
                        <type>eclipse-plugin</type>
                        <artifactId>javax.servlet</artifactId>
                        <version>2.5.0</version>
                     </dependency>
                     <dependency>
                        <type>eclipse-plugin</type>
                        <artifactId>javax.xml.stream</artifactId>
                        <version>1.0.1.v201004272200</version>
                     </dependency>
                     <dependency>
                        <type>eclipse-plugin</type>
                       
<artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
                        <version>2.2.1.1_2</version>
                     </dependency>
                     <dependency>
                        <type>eclipse-plugin</type>
                       
<artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
                        <version>1.6.2.6</version>
                     </dependency>                   
                   </dependencies>  
                   <bundleStartLevel>
                        <bundle>
                            <id>org.apache.ws.xmlschema.core</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.apache.cxf.cxf-rt-core</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle>
                        <bundle>
                            <id>org.apache.servicemix.bundles.wsdl4j</id>
                            <level>1</level>
                            <autoStart>true</autoStart>
                        </bundle> 
                        <bundle>
                            <id>org.apache.servicemix.bundles.jaxb-impl</id>
                            <level>4</level>
                            <autoStart>true</autoStart>
                        </bundle>
                       <bundle>
                           
<id>org.apache.servicemix.specs.jaxb-api-2.2</id>
                            <level>5</level>
                            <autoStart>true</autoStart>
                        </bundle> 
                         <bundle>
                            <id>org.apache.cxf.cxf-rt-bindings-soap</id>
                            <level>6</level>
                            <autoStart>true</autoStart>
                        </bundle> 
                       <bundle>
                            <id>org.apache.cxf.cxf-rt-frontend-simple</id>
                            <level>9</level>
                            <autoStart>true</autoStart>
                        </bundle>
                       <bundle> 
                            <id>org.apache.cxf.cxf-rt-frontend-jaxws</id>
                            <level>20</level>
                            <autoStart>true</autoStart>
                        </bundle>                        
                        <bundle>
                            <id>org.apache.cxf.cxf-rt-transports-http</id>
                            <level>22</level>
                            <autoStart>true</autoStart>
                        </bundle>
                       <bundle>
                           
<id>org.apache.servicemix.specs.stax-api-1.0</id>
                            <level>29</level>
                            <autoStart>true</autoStart>
                        </bundle>                       
                        <bundle>
                            <id>org.apache.cxf.cxf-api</id>
                            <level>30</level>
                            <autoStart>true</autoStart>
                        </bundle>
                    </bundleStartLevel>                 
                </configuration>
	       </plugin>

Adding javax.xml.stream was the final dependency that pulled me over the
finish line. 

Thanks for all the help everyone,
Neil



--
View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840p5739949.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: CXFDOSGI 1.4 Jaxb Classloader issue

Posted by Christian Schneider <ch...@die-schneider.net>.
Hi Neil,

why dont you just use pax exam to test?
We use it in cxf dosgi ourself.

See http://svn.apache.org/repos/asf/cxf/dosgi/trunk/systests2/multi-bundle/

Christian

On 11.02.2014 20:15, NCorbet wrote:
> Hello all,
>
> I have a perplexing problem. I am using CXFDosgi 1.4 ( 2.7.2 ) and Java
> 1.7.0_21.
>
> I have a Junit test that contains the following code in the setUp() method:
>
> @Before
> 	public void setUp() {
> 		baseUrl = System.getProperty("envoy-base-url");
> 		factory = new JaxWsProxyFactoryBean();
> 		factory.getInInterceptors().add(new LoggingInInterceptor());
> 		factory.getOutInterceptors().add(new LoggingOutInterceptor());
> 		
> 				
> 		factory.setServiceClass(ElpManagementService.class);
> 		factory.setAddress(baseUrl + "elpManagement");
> 		emsClient = (ElpManagementService) factory.create();
>
> 		factory.setServiceClass(UnitDataService.class);
> 		factory.setAddress(baseUrl + "unitData");
> 		udsClient = (UnitDataService) factory.create();
>
> 		sessionPropertiesHolder = new Holder<String>();
> 		try {
> 			emsClient.startSession(sessionPropertiesHolder);
> 		} catch (ServiceException e) {
> 			// TODO Auto-generated catch block
> 			e.printStackTrace();
> 		}
> 	}
>
> When running from Eclipse ( select unit test, Debug As, Junit Test ), my
> test connects to the remote and processes fine. My Test passes. No Problems.
>
> When I run my test from maven ( I am using Tycho Surefire Plugin
> integration-test goal), my test does not run and contains the following
> failure ( cause highlighted in bold ):
>
> org.apache.cxf.service.factory.ServiceConstructionException
> 	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:332)
> 	at
> org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:475)
> 	at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:690)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:537)
> 	at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:249)
> 	at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
> 	at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
> 	at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
> 	at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:156)
> 	at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
> 	at
> org.syntech.envoy.dod.services.integration.test.unit.TestUnitTransactionData.setUp(TestUnitTransactionData.java:42)
> 	at junit.framework.TestCase.runBare(TestCase.java:139)
> 	at junit.framework.TestResult$1.protect(TestResult.java:122)
> 	at junit.framework.TestResult.runProtected(TestResult.java:142)
> 	at junit.framework.TestResult.run(TestResult.java:125)
> 	at junit.framework.TestCase.run(TestCase.java:129)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255)
> 	at junit.framework.TestSuite.run(TestSuite.java:250)
> 	at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
> 	at org.junit.runners.Suite.runChild(Suite.java:127)
> 	at org.junit.runners.Suite.runChild(Suite.java:26)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> 	at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
> 	at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
> 	at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> 	at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> 	at
> org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
> 	at
> org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:123)
> 	at
> org.eclipse.tycho.surefire.osgibooter.OsgiSurefireBooter.run(OsgiSurefireBooter.java:85)
> 	at
> org.eclipse.tycho.surefire.osgibooter.HeadlessTestApplication.run(HeadlessTestApplication.java:21)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at
> org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
> 	at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> 	at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
> 	at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
> *Caused by: javax.xml.bind.JAXBException
>   - with linked exception:
> [javax.xml.bind.JAXBException: property
> "com.sun.xml.bind.defaultNamespaceRemap" is not supported]*
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:237)
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:396)
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
> 	at
> org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:267)
> 	at
> org.apache.cxf.common.jaxb.JAXBContextCache$2.run(JAXBContextCache.java:265)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at
> org.apache.cxf.common.jaxb.JAXBContextCache.createContext(JAXBContextCache.java:265)
> 	at
> org.apache.cxf.common.jaxb.JAXBContextCache.getCachedContextAndSchemas(JAXBContextCache.java:172)
> 	at
> org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:464)
> 	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:330)
>
>
> I run my Junit test from the pde while passing -verbose:class to the JVM and
> I can see entries like the following:
>
> [Loaded javax.xml.bind.JAXBContext from C:\Program
> Files\Java\jdk1.7.0_21\jre\lib\rt.jar]
>
> When I run the test through maven, using the -verbose:class command I do not
> see javax.xml.bind being loaded anywhere. I do see entries from classes
> being loaded from my jre, just not these.
>
> Does anyone have any advice with classloading, Maven, and Jaxb?
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/CXFDOSGI-1-4-Jaxb-Classloader-issue-tp5739840.html
> Sent from the cxf-user mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com