You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ronald Müller <r....@unicomp-berlin.de> on 2010/10/14 17:40:24 UTC

DOSGi wsdl-first approach

Hi,

i'm getting stuck on following exception (see below), while trying to
implement a web-service from a given WSDL (by wsdl2java) with
jaxb-databinding. The same thing runs fine, if started without any
OSGi-things (just plain CXF).

So i suppose that there are just some import or export-statements
missing, but i've no idea what.

I'm working with the latest cxf-dosgi-singlebundle-dist from trunk.
Is there any working example somewhere, from what i can build on?
(comparing MANIFEST etc.) Or where to start further investigation?


regards

Ronald




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
de.unicomp.osgi.ots.pdServer.impl.Activator.publishService2(Activator.java:98)
	at de.unicomp.osgi.ots.pdServer.impl.Activator.start(Activator.java:63)
	at
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)
	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1862)
	at org.apache.felix.framework.Felix.startBundle(Felix.java:1779)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
	at
org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:769)
	at
org.apache.felix.fileinstall.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:789)
	at
org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.java:372)
	at
org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:121)
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)getting
stuck
	... 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: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 72
counts of IllegalAnnotationExceptions
The createWatchdog method has @XmlElementMapping on it, but it doesn't
return a sub-type of JAXBElement.
	this problem is related to the following location:
		at @javax.xml.bind.annotation.XmlElementDecl(scope=class
javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
defaultValue=, substitutionHeadNamespace=##default,
namespace=http://otec-konsortium.de/OCIT-I_PD-SP, name=Watchdog)

-- 
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

Re: DOSGi wsdl-first approach

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 15 October 2010 10:53:38 am Ronald Müller wrote:
> Hi,
> 
> please keep in mind, that most people just want "use" it. Its desirable
> that people utilise the latest version and the recommended versions
> should stated somewhere on the web, but if there is no functional
> dependency, than the dependency-level should be as low as possible.
> 
> The JDK Stax-parser may by slow, but this should be no reason to reject
> it - there is no API change. The same for JAXB.

Well, the JDK stax parser is not just slow, it's buggy.   For example, it 
handles /r characters in text nodes completely wrong and causes signature 
problems with them.   Thus, ws-security is not very reliable with it.   

JAXB in the JDK is also buggy.   It holds onto things in thread locals using  
strong references.   If your in a container that uses thread pools, those 
references could never be cleaned up.   The result is that those classes and 
classloaders can never be removed, the jars remain locked, apps won't undeploy 
properly, memory leaks, etc....

By default, we wan the out-of-the box experience with CXF to work properly.  
If that requires shipping a newer version of something that's in the JDK, that 
what  we need to do.

Dan


> Keep things simple! The real world is complicated enough. It took me
> four days to bring my webservice up with DOSGi, not one line productive
> code, only hunting exceptions and configuring framework - no fun.
> Fortunately with happy end.
> 
> In many projects this part is only a fraction of the whole.
> 
> 
> my two cents.
> 
> regards
> 
> Ronald
> 
> Am 15.10.2010 15:51, schrieb Daniel Kulp:
> > jaxb-impl COULD, but not the servicemix version.   The version in the
> > modern JDK's is 2.1.10 which is newer than the smx version anyway.  
> > HOWEVER, there are some major bugs fixed in 2.1.13 which is why CXF
> > 2.3.0 always depends on it.
> > 
> > CXF 2.3.0, when using Java6 and Maven, won't bring in many of the things
> > that are built into the JDK.   Things like saaj, activation, etc... are
> > not dependencies anymore as the JDK provides them.  The two major
> > execptions are: 1) jaxb-impl (see above)
> > 2) woodstox - the Stax parser built into the JDK sucks.   It's slow and
> > buggy. Using woodstox is SOOOO much better.
> > 
> > Due to zookeeper, DOSGi doesn't really support Java5 anyway.  Thus, I'd
> > say for DOSGi 1.3, we should just drop support for Java5 and remove the
> > bundles that are no longer necessary.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: DOSGi wsdl-first approach

Posted by David Bosschaert <da...@gmail.com>.
On 15 October 2010 14:51, Daniel Kulp <dk...@apache.org> wrote:
> On Friday 15 October 2010 5:57:55 am David Bosschaert wrote:
>> On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de> wrote:
>> > 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.activa
>> > tion.*,javax.xml.stream.*
>> >
>> > And it just works now :-) !
>>
>> That's excellent news! Does anyone know whether these bundles actually
>> provide any value for JSE 6 users? You obviously need them for JSE 5
>> but I'm wondering do we really need to support JSE 5 in our releases
>> given that JSE 5 reached end of life about a year ago?
>
> jaxb-impl COULD, but not the servicemix version.   The version in the modern
> JDK's is 2.1.10 which is newer than the smx version anyway.   HOWEVER, there
> are some major bugs fixed in 2.1.13 which is why CXF 2.3.0 always depends on
> it.
>
> CXF 2.3.0, when using Java6 and Maven, won't bring in many of the things that
> are built into the JDK.   Things like saaj, activation, etc... are not
> dependencies anymore as the JDK provides them.  The two major execptions are:
> 1) jaxb-impl (see above)
> 2) woodstox - the Stax parser built into the JDK sucks.   It's slow and buggy.
> Using woodstox is SOOOO much better.
>
> Due to zookeeper, DOSGi doesn't really support Java5 anyway.  Thus, I'd say
> for DOSGi 1.3, we should just drop support for Java5 and remove the bundles
> that are no longer necessary.

Sounds good to me!

BTW zookeeper is only used in the optional discovery component. You
can actually use the bulk of DOSGi with Java 5 if you wanted to. You
would just not get dynamic remote discovery (although you could take a
Java 5 compatible discovery service from somewhere else).

Best regards,

David

Re: DOSGi wsdl-first approach

Posted by Ronald Müller <r....@unicomp-berlin.de>.
Hi,

please keep in mind, that most people just want "use" it. Its desirable
that people utilise the latest version and the recommended versions
should stated somewhere on the web, but if there is no functional
dependency, than the dependency-level should be as low as possible.

The JDK Stax-parser may by slow, but this should be no reason to reject
it - there is no API change. The same for JAXB.

Keep things simple! The real world is complicated enough. It took me
four days to bring my webservice up with DOSGi, not one line productive
code, only hunting exceptions and configuring framework - no fun.
Fortunately with happy end.

In many projects this part is only a fraction of the whole.


my two cents.

regards

Ronald


Am 15.10.2010 15:51, schrieb Daniel Kulp:
> 
> jaxb-impl COULD, but not the servicemix version.   The version in the modern 
> JDK's is 2.1.10 which is newer than the smx version anyway.   HOWEVER, there 
> are some major bugs fixed in 2.1.13 which is why CXF 2.3.0 always depends on 
> it. 
> 
> CXF 2.3.0, when using Java6 and Maven, won't bring in many of the things that 
> are built into the JDK.   Things like saaj, activation, etc... are not 
> dependencies anymore as the JDK provides them.  The two major execptions are:
> 1) jaxb-impl (see above)
> 2) woodstox - the Stax parser built into the JDK sucks.   It's slow and buggy.   
> Using woodstox is SOOOO much better. 
> 
> Due to zookeeper, DOSGi doesn't really support Java5 anyway.  Thus, I'd say 
> for DOSGi 1.3, we should just drop support for Java5 and remove the bundles 
> that are no longer necessary.
> 


-- 
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

Re: DOSGi wsdl-first approach

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 15 October 2010 5:57:55 am David Bosschaert wrote:
> On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de> wrote:
> > 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.activa
> > tion.*,javax.xml.stream.*
> > 
> > And it just works now :-) !
> 
> That's excellent news! Does anyone know whether these bundles actually
> provide any value for JSE 6 users? You obviously need them for JSE 5
> but I'm wondering do we really need to support JSE 5 in our releases
> given that JSE 5 reached end of life about a year ago?

jaxb-impl COULD, but not the servicemix version.   The version in the modern 
JDK's is 2.1.10 which is newer than the smx version anyway.   HOWEVER, there 
are some major bugs fixed in 2.1.13 which is why CXF 2.3.0 always depends on 
it. 

CXF 2.3.0, when using Java6 and Maven, won't bring in many of the things that 
are built into the JDK.   Things like saaj, activation, etc... are not 
dependencies anymore as the JDK provides them.  The two major execptions are:
1) jaxb-impl (see above)
2) woodstox - the Stax parser built into the JDK sucks.   It's slow and buggy.   
Using woodstox is SOOOO much better. 

Due to zookeeper, DOSGi doesn't really support Java5 anyway.  Thus, I'd say 
for DOSGi 1.3, we should just drop support for Java5 and remove the bundles 
that are no longer necessary.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Re: DOSGi wsdl-first approach

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi

It appears it is a CXF level issue. Does this NPE occur even if you use a
standalone client, without DOSGI ?

cheers, Sergey

On Mon, Oct 18, 2010 at 2:52 PM, <je...@orange-ftgroup.com> wrote:

> Hi,
>
> I'm still on this issue and I could really use som help.
>
> I don't understand why I get an IndexOutOfBoundException in this class with
> cxf-dosgi-ri-singlebundle-distribution.
>
> As mentionned early by mail, we are using
> cxf-dosgi-ri-singlebundle-distribution-1.1.jar modified according Ronald
> instructions plus one (replacing cxf-bundle-minimal-2.2.4 with
> cxf-bundle-minimal-2.2.10 because of a NullPointerException in same method
> (known bug it appears)).
>
> How could I possibly get rid of that Exception ?
>
> Thanks a lot.
>
> -----Message d'origine-----
> De : jean.dat@orange-ftgroup.com [mailto:jean.dat@orange-ftgroup.com]
> Envoyé : vendredi 15 octobre 2010 18:41
> À : users@cxf.apache.org
> Objet : RE: DOSGi wsdl-first approach
>
> Hi,
>
> Thanks Ronald for your answer, it "almost" worked for me too.
>
> I get it to work for some web services but it fails every time with axis
> powered web services. I get this exception:
>
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>        at java.util.ArrayList.get(ArrayList.java:322)
>        at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClassInfo(ReflectionServiceFactoryBean.java:692)
>        at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:224)
>        at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:636)
>        at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:260)
>        at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:386)
>        at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:490)
>        at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:240)
>        at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:180)
>        at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
>        at
> org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
>        at
> org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
>        at
> org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:121)
>        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:458)
>        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
>        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
>        at javax.xml.ws.Service.getPort(Service.java:40)
>
> I'm testing with this web service :
> http://webservices.wolfram.com/services/SearchServices/WolframSearch2.wsdl
>
> We are using cxf-dosgi-ri-singlebundle-distribution-1.1.jar modified
> according Ronald instructions plus one (replacing cxf-bundle-minimal-2.2.4
> with cxf-bundle-minimal-2.2.10 because of a NullPointerException in same
> method (known bug it appears)).
>
> Our customized cxf-dosgi-ri-singlebundle-distribution bundle works great
> with cxf powered web services. That's strange.
>
> Any help great appreciated.
>
> Thanks.
>
>
> -----Message d'origine-----
> De : David Bosschaert [mailto:david.bosschaert@gmail.com]
> Envoyé : vendredi 15 octobre 2010 11:58
> À : users@cxf.apache.org
> Objet : Re: DOSGi wsdl-first approach
>
> On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de>
> wrote:
> >
> > 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 :-) !
>
> That's excellent news! Does anyone know whether these bundles actually
> provide any value for JSE 6 users? You obviously need them for JSE 5
> but I'm wondering do we really need to support JSE 5 in our releases
> given that JSE 5 reached end of life about a year ago?
>
> Best regards,
>
> David
>
> *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified.
> If you are not the intended addressee of this message, please cancel it
> immediately and inform the sender.
> ********************************
>
>
> *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified.
> If you are not the intended addressee of this message, please cancel it
> immediately and inform the sender.
> ********************************
>
>

RE: DOSGi wsdl-first approach

Posted by je...@orange-ftgroup.com.
Hi,

I'm still on this issue and I could really use som help.

I don't understand why I get an IndexOutOfBoundException in this class with cxf-dosgi-ri-singlebundle-distribution.

As mentionned early by mail, we are using cxf-dosgi-ri-singlebundle-distribution-1.1.jar modified according Ronald instructions plus one (replacing cxf-bundle-minimal-2.2.4 with cxf-bundle-minimal-2.2.10 because of a NullPointerException in same method (known bug it appears)).

How could I possibly get rid of that Exception ?

Thanks a lot.

-----Message d'origine-----
De : jean.dat@orange-ftgroup.com [mailto:jean.dat@orange-ftgroup.com] 
Envoyé : vendredi 15 octobre 2010 18:41
À : users@cxf.apache.org
Objet : RE: DOSGi wsdl-first approach

Hi,

Thanks Ronald for your answer, it "almost" worked for me too. 

I get it to work for some web services but it fails every time with axis powered web services. I get this exception:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClassInfo(ReflectionServiceFactoryBean.java:692)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:224)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:636)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:260)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:386)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:490)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:240)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:180)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
        at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
        at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
        at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:121)
        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:458)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
        at javax.xml.ws.Service.getPort(Service.java:40)

I'm testing with this web service : http://webservices.wolfram.com/services/SearchServices/WolframSearch2.wsdl

We are using cxf-dosgi-ri-singlebundle-distribution-1.1.jar modified according Ronald instructions plus one (replacing cxf-bundle-minimal-2.2.4 with cxf-bundle-minimal-2.2.10 because of a NullPointerException in same method (known bug it appears)).

Our customized cxf-dosgi-ri-singlebundle-distribution bundle works great with cxf powered web services. That's strange.

Any help great appreciated.

Thanks.


-----Message d'origine-----
De : David Bosschaert [mailto:david.bosschaert@gmail.com] 
Envoyé : vendredi 15 octobre 2010 11:58
À : users@cxf.apache.org
Objet : Re: DOSGi wsdl-first approach

On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de> wrote:
>
> 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 :-) !

That's excellent news! Does anyone know whether these bundles actually
provide any value for JSE 6 users? You obviously need them for JSE 5
but I'm wondering do we really need to support JSE 5 in our releases
given that JSE 5 reached end of life about a year ago?

Best regards,

David

*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************


*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************


RE: DOSGi wsdl-first approach

Posted by je...@orange-ftgroup.com.
Hi,

Thanks Ronald for your answer, it "almost" worked for me too. 

I get it to work for some web services but it fails every time with axis powered web services. I get this exception:

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
        at java.util.ArrayList.get(ArrayList.java:322)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeClassInfo(ReflectionServiceFactoryBean.java:692)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperation(JaxWsServiceFactoryBean.java:224)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeWSDLOperations(ReflectionServiceFactoryBean.java:636)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.initializeWSDLOperations(JaxWsServiceFactoryBean.java:260)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:386)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:490)
        at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:240)
        at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:180)
        at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:99)
        at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:51)
        at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:102)
        at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:121)
        at org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:458)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:330)
        at org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:317)
        at javax.xml.ws.Service.getPort(Service.java:40)

I'm testing with this web service : http://webservices.wolfram.com/services/SearchServices/WolframSearch2.wsdl

We are using cxf-dosgi-ri-singlebundle-distribution-1.1.jar modified according Ronald instructions plus one (replacing cxf-bundle-minimal-2.2.4 with cxf-bundle-minimal-2.2.10 because of a NullPointerException in same method (known bug it appears)).

Our customized cxf-dosgi-ri-singlebundle-distribution bundle works great with cxf powered web services. That's strange.

Any help great appreciated.

Thanks.


-----Message d'origine-----
De : David Bosschaert [mailto:david.bosschaert@gmail.com] 
Envoyé : vendredi 15 octobre 2010 11:58
À : users@cxf.apache.org
Objet : Re: DOSGi wsdl-first approach

On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de> wrote:
>
> 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 :-) !

That's excellent news! Does anyone know whether these bundles actually
provide any value for JSE 6 users? You obviously need them for JSE 5
but I'm wondering do we really need to support JSE 5 in our releases
given that JSE 5 reached end of life about a year ago?

Best regards,

David

*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************


Re: DOSGi wsdl-first approach

Posted by David Bosschaert <da...@gmail.com>.
On 15 October 2010 10:48, Ronald Müller <r....@unicomp-berlin.de> wrote:
>
> 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 :-) !

That's excellent news! Does anyone know whether these bundles actually
provide any value for JSE 6 users? You obviously need them for JSE 5
but I'm wondering do we really need to support JSE 5 in our releases
given that JSE 5 reached end of life about a year ago?

Best regards,

David

Re: DOSGi wsdl-first approach

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 21 April 2011 5:40:46 AM dhrubo wrote:
> ok the solution is some hacking
> You need to remove the version no of import-package for javax.activation
> from the mail bundle
> delete the activation bundle
> Keep the boot delegation and it should work.
> BTW i am using cxf-minimal 2.2.9
> 
> How are things in minimal 2.4.x?

2.4 usually uses a broad range for the JDK provided packages.   Even for JAX-
WS API, you see things like "[0.0,2.3)".   The 0.0 is generally how equinox 
exports things from the JDK so we now allow that.     It's not ideal, but it 
does allow a lot more flexibility and reduced numbers of bundles.

Dan



> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/DOSGi-wsdl-first-approach-tp3212289p433038
> 6.html Sent from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com

Re: DOSGi wsdl-first approach

Posted by dhrubo <dh...@gmail.com>.
ok the solution is some hacking
You need to remove the version no of import-package for javax.activation
from the mail bundle
delete the activation bundle
Keep the boot delegation and it should work.
BTW i am using cxf-minimal 2.2.9

How are things in minimal 2.4.x?

--
View this message in context: http://cxf.547215.n5.nabble.com/DOSGi-wsdl-first-approach-tp3212289p4330386.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: DOSGi wsdl-first approach

Posted by dhrubo <dh...@gmail.com>.
I tried to set the bootdelegation and now the contract first web service is
registered. BTW my contract first web service is just a fragment containing
only the details required by that ws. The host bundle has all the cxf
configs. But now I get this error.


Error 500 loader constraint violation: when resolving overridden method
"org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller.getAttachmentAsDataHandler(Ljava/lang/String;)Ljavax/activation/DataHandler;"
the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current
class, org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller, and its
superclass loader (instance of &lt;bootloader&gt;), have different Class
objects for the type javax/activation/DataHandler used in the
signature</title>
</head>
<body>
HTTP ERROR: 500
<pre>loader constraint violation: when resolving overridden method
"org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller.getAttachmentAsDataHandler(Ljava/lang/String;)Ljavax/activation/DataHandler;"
the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current
class, org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller, and its
superclass loader (instance of &lt;bootloader&gt;), have different Class
objects for the type javax/activation/DataHandler used in the
signature</pre>
<p>RequestURI=/sampleweb/productservice</p>
Caused by:
<pre>java.lang.LinkageError: loader constraint violation: when resolving
overridden method
"org.apache.cxf.jaxb.attachment.JAXBAttachmentUnmarshaller.getAttachmentAsDataHandler(Ljava/lang/String;)Ljavax/activation/DataHandler;"
the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5) of the current
class, org/apache/cxf/jaxb/attachment/JAXBAttachmentUnmarshaller, and its
superclass loader (instance of <bootloader>), have different Class objects
for the type javax/activation/DataHandler used in the signature


I have an activation bundle. I think now it sees two activation class - one
from bundle and other from JDK 6. How to solve this?

--
View this message in context: http://cxf.547215.n5.nabble.com/DOSGi-wsdl-first-approach-tp3212289p4330032.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: DOSGi wsdl-first approach

Posted by Ronald Müller <r....@unicomp-berlin.de>.
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 jean.dat@orange-ftgroup.com:
> 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

RE: DOSGi wsdl-first approach

Posted by je...@orange-ftgroup.com.
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.


On Thursday 14 October 2010 11:40:24 am Ronald Müller wrote:
> Hi,
> 
> i'm getting stuck on following exception (see below), while trying to
> implement a web-service from a given WSDL (by wsdl2java) with
> jaxb-databinding. The same thing runs fine, if started without any
> OSGi-things (just plain CXF).
> 
> So i suppose that there are just some import or export-statements
> missing, but i've no idea what.
> 
> I'm working with the latest cxf-dosgi-singlebundle-dist from trunk.
> Is there any working example somewhere, from what i can build on?
> (comparing MANIFEST etc.) Or where to start further investigation?

This is almost always a startup ordering issue resulting from some bundles 
picking up the JAXB-API things from the JDK and others from the servicemix 
jaxb-api bundle.   Try to make sure the smx jaxb-api  is one of the VERY first 
bundles loaded.  That alone may fix it.


Dan


> 
> 
> regards
> 
> Ronald
> 
> 
> 
> 
> org.apache.cxf.service.factory.ServiceConstructionException
> 	at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:339)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro
> mWSDL(ReflectionServiceFactoryBean.java:432) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServi
> ceModel(ReflectionServiceFactoryBean.java:528) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflecti
> onServiceFactoryBean.java:278) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFac
> toryBean.java:179) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abs
> tractWSDLBasedEndpointFactory.java:99) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105
> ) at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.j
> ava:175) at
> de.unicomp.osgi.ots.pdServer.impl.Activator.publishService2(Activator.java:
> 98) at de.unicomp.osgi.ots.pdServer.impl.Activator.start(Activator.java:63)
> at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.ja
> va:633) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1862)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1779)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> 	at
> org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:7
> 69) at
> org.apache.felix.fileinstall.DirectoryWatcher.startAllBundles(DirectoryWatc
> her.java:789) at
> org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.
> java:372) at
> org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:121
> ) 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(JAXBDataBin
> ding.java:502) at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:322)get
> ting stuck
> 	... 18 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
> 9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:91)
> 	... 22 more
> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 72
> counts of IllegalAnnotationExceptions
> The createWatchdog method has @XmlElementMapping on it, but it doesn't
> return a sub-type of JAXBElement.
> 	this problem is related to the following location:
> 		at @javax.xml.bind.annotation.XmlElementDecl(scope=class
> javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
> defaultValue=, substitutionHeadNamespace=##default,
> namespace=http://otec-konsortium.de/OCIT-I_PD-SP, name=Watchdog)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************


Re: DOSGi wsdl-first approach

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 14 October 2010 11:40:24 am Ronald Müller wrote:
> Hi,
> 
> i'm getting stuck on following exception (see below), while trying to
> implement a web-service from a given WSDL (by wsdl2java) with
> jaxb-databinding. The same thing runs fine, if started without any
> OSGi-things (just plain CXF).
> 
> So i suppose that there are just some import or export-statements
> missing, but i've no idea what.
> 
> I'm working with the latest cxf-dosgi-singlebundle-dist from trunk.
> Is there any working example somewhere, from what i can build on?
> (comparing MANIFEST etc.) Or where to start further investigation?

This is almost always a startup ordering issue resulting from some bundles 
picking up the JAXB-API things from the JDK and others from the servicemix 
jaxb-api bundle.   Try to make sure the smx jaxb-api  is one of the VERY first 
bundles loaded.  That alone may fix it.

Dan


> 
> 
> regards
> 
> Ronald
> 
> 
> 
> 
> org.apache.cxf.service.factory.ServiceConstructionException
> 	at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:339)
> at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFro
> mWSDL(ReflectionServiceFactoryBean.java:432) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServi
> ceModel(ReflectionServiceFactoryBean.java:528) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Reflecti
> onServiceFactoryBean.java:278) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFac
> toryBean.java:179) at
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(Abs
> tractWSDLBasedEndpointFactory.java:99) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:105
> ) at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.j
> ava:175) at
> de.unicomp.osgi.ots.pdServer.impl.Activator.publishService2(Activator.java:
> 98) at de.unicomp.osgi.ots.pdServer.impl.Activator.start(Activator.java:63)
> at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.ja
> va:633) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1862)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1779)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> 	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> 	at
> org.apache.felix.fileinstall.DirectoryWatcher.start(DirectoryWatcher.java:7
> 69) at
> org.apache.felix.fileinstall.DirectoryWatcher.startAllBundles(DirectoryWatc
> her.java:789) at
> org.apache.felix.fileinstall.DirectoryWatcher.doInstalled(DirectoryWatcher.
> java:372) at
> org.apache.felix.fileinstall.DirectoryWatcher.run(DirectoryWatcher.java:121
> ) 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(JAXBDataBin
> ding.java:502) at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:322)get
> ting stuck
> 	... 18 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
> 9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:25) at java.lang.reflect.Method.invoke(Method.java:597)
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:91)
> 	... 22 more
> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 72
> counts of IllegalAnnotationExceptions
> The createWatchdog method has @XmlElementMapping on it, but it doesn't
> return a sub-type of JAXBElement.
> 	this problem is related to the following location:
> 		at @javax.xml.bind.annotation.XmlElementDecl(scope=class
> javax.xml.bind.annotation.XmlElementDecl$GLOBAL, substitutionHeadName=,
> defaultValue=, substitutionHeadNamespace=##default,
> namespace=http://otec-konsortium.de/OCIT-I_PD-SP, name=Watchdog)

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog