Hi,
i struggled trying to change startup order by configuring start levels
for misc bundles (jaxb-api,jax-impl,javax.activation,stax) without real
success:
felix.startlevel.bundle=3
org.osgi.framework.startlevel.beginning=3
felix.auto.start.1=file:bnd/org.apache.servicemix.specs.stax-api-1.0-1.3.0.jar
file:bnd/geronimo-activation_1.1_spec-1.0.2.jar
file:bnd/org.apache.servicemix.specs.jaxb-api-2.1-1.3.0.jar
file:bnd/org.osgi.compendium-4.2.0.jar file:bnd/osgi.enterprise.jar
felix.auto.start.2=file:bnd/org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar
which lead to following bundle-order: (*) is the ws-implementation
g! lb
START LEVEL 3
ID|State |Level|Name
0|Active | 0|System Bundle (3.0.0)
1|Active | 3|Apache Felix File Install (3.0.0)
2|Active | 3|Apache Felix Gogo Command (0.6.0)
3|Active | 3|Apache Felix Gogo Runtime (0.6.0)
4|Active | 3|Apache Felix Gogo Shell (0.6.0)
5|Active | 3|Apache Felix Shell Service (1.4.2)
6|Active | 3|Apache Felix Remote Shell (1.0.4)
7|Active | 3|Apache Jakarta log4j Plug-in (1.2.15.v201005080500)
8|Active | 2|Apache ServiceMix Bundles: jaxb-impl-2.1.6 (2.1.6.1)
9|Active | 1|Apache ServiceMix Specs :: STAX API 1.0 (1.3.0)
10|Active | 1|geronimo-activation_1.1_spec (1.0.2)
11|Active | 1|Apache ServiceMix Specs :: JAXB API 2.1 (1.3.0)
12|Active | 1|osgi.cmpn (4.2.0.200908310645)
13|Active | 1|osgi.enterprise (4.2.0.201003190513)
16|Active | 3|Distributed OSGi Distribution Software
Single-Bundle Distribution (1.3.0.SNAPSHOT)
18|Active | 3|DataServerClient (1.0.0)
(*)19|Active | 3|OTS-PDServer-Impl (1.1.0.201010141752)
but resulted in:
Exception in thread "pool-1-thread-1"
org.apache.cxf.service.factory.ServiceConstructionException
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:339)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:432)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:528)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:278)
at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:179)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:175)
at
org.apache.cxf.dosgi.dsw.handlers.PojoConfigurationTypeHandler.createServer(PojoConfigurationTypeHandler.java:168)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:244)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:78)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:71)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:40)
at
org.apache.cxf.dosgi.topologymanager.TopologyManager$2.run(TopologyManager.java:254)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.xml.bind.JAXBException: Unable to create context
- with linked exception:
[java.lang.reflect.InvocationTargetException]
at javax.xml.bind.ContextFinder.find(ContextFinder.java:93)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:65)
at
org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:562)
at
org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:502)
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:322)
... 18 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:91)
... 22 more
Caused by: java.lang.IllegalAccessError: tried to access class
com.sun.xml.bind.v2.model.impl.GetterSetterPropertySeed from class
com.sun.xml.bind.v2.model.impl.ClassInfoImpl
[...]
Which seems to be another perspective on the same problem ?! The classes
"com.sun.xml.bind.v2.model.impl.GetterSetterPropertySeed" and
"com.sun.xml.bind.v2.model.impl.ClassInfoImpl" seems to be originated
from different implementations (JDK6 and jaxb-bundle?), although they
should only provided by the bundle.
Finally i solved my issue by kicking the following bundles:
* geronimo-activation_1.1_spec-1.0.2.jar
* org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar
* org.apache.servicemix.specs.jaxb-api-2.1-1.3.0.jar
* org.apache.servicemix.specs.stax-api-1.0-1.3.0.jar
out of the cxf-dosgi-singlebundle.jar, as these are also provided by the
JDK6. So i configured the bootdelegation-property as following:
org.osgi.framework.bootdelegation=com.sun.*,javax.xml.bind.*,javax.activation.*,javax.xml.stream.*
And it just works now :-) !
regards
Ronald
Am 15.10.2010 10:13, schrieb [email protected]:
> Hi,
>
> Could you explain how making jaxb-api one of the very first bundle loaded
> when working with cxf-dosgi-ri-singlebundle-distribution (v 1.1).
> This bundle is not an osgi bundle. Is is embedded inside
> cxf-dosgi-ri-singlebundle-distribution.
>
> Thanks.
>
>
--
Mit freundlichen Grüßen
Dipl.-Ing. Ronald Müller
M-UniComp Verkehrssysteme GmbH
Plauener Straße 163-165, Haus L
D-13053 Berlin
Fon: +49 (0) 30 / 9831 70070
Fax: +49 (0) 30 / 9831 70077
Internet: www.unicomp-berlin.de
Firma: M-UniComp Verkehrssysteme GmbH
Geschaeftsfuehrer: Andreas Dreher
Sitz der Gesellschaft: Berlin
Registergericht: Berlin Amtsgericht Charlottenburg, HRB 35329