cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Problem with service call in osgi: Unmarshalling Error: unexpected element (uri:"", local:"customers"). Expected elements are (none)
Date Thu, 26 Aug 2010 22:55:25 GMT
  Hi Willem,

I am currently trying to recreate the problem at home where I am more 
flexible in using stuf from the internet.

I have created a small bundle that should act as a client for the 
customerservice from wsdl first example. When doing the service call I 
get the following problem:

org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name 'tester' defined in URL 
[bundleentry://59.fwk23376028/META-INF/spring/bundle-context.xml]: 
Invocation of init method failed; nested exception is 
java.lang.LinkageError: loader constraint violation: when resolving 
overridden method 
"org.apache.cxf.jaxb.attachment.JAXBAttachmentMarshaller.addSwaRefAttachment(Ljavax/activation/DataHandler;)Ljava/lang/String;"

the class loader (instance of 
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current 
class, org/apache/cxf/jaxb/attachment/JAXBAttachmentMarshaller, and its 
superclass loader (instance of <bootloader>), have different Class 
objects for the type javax/activation/DataHandler used in the signature

So I think the problem is that the system bundle offers javax.activation 
in version 0.0.0 and 
org.apache.geronimo.specs.geronimo-activation_1.1_spec offers it as 
version "1.1.0".
I guess at work I am seeing something similar with the jaxb api.  I just 
checked the system bundle in servicemix but it also seems to export the 
package.

Greetings

Christian

-----

The manifest looks like this:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Customerserviceclient
Bundle-SymbolicName: customerserviceclient
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: customerserviceclient.Activator
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.osgi.framework;version="1.3.0"
Require-Bundle: org.apache.cxf.bundle-minimal;bundle-version="2.2.10",
  org.springframework.beans;bundle-version="2.5.6",
  com.springsource.org.junit;bundle-version="4.8.1"


Am 26.08.2010 14:41, schrieb Willem Jiang:
> Schneider Christian wrote:
>> Hi Willem,
>>
>> I have not yet used servicemix (at least the 4.x version). I will try 
>> with servicemix but my target environment will be eclipse rcp. My 
>> colleagues want to call services from a rich client. So I guess even 
>> if it works with servicemix it is not a suitable environment.
>>
>> What do you mean by bundle header? The manifest?
>
> Yeah, it's the manifest file which has the import and export packages.
>
> BTW, in ServiceMix you can get control of which JVM system package 
> will be export into osgi platform, I guess you can do the same thing 
> in the eclipse rcp to export the right version of JAXB.
>
> Willem
>>
>> Greetings
>>
>> Christian
>>
>> Christian Schneider
>> Informationsverarbeitung Business Solutions
>> Handel und Dispatching
>>
>> Tel : +49-(0)721-63-15482
>>
>> EnBW Systeme Infrastruktur Support GmbH
>> Sitz der Gesellschaft: Karlsruhe
>> Handelsregister: Amtsgericht Mannheim ­ HRB 108550
>> Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
>> Geschäftsführer: Jochen Adenau, Hans-Günther Meier
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Willem Jiang [mailto:willem.jiang@gmail.com] Gesendet: Mittwoch, 
>> 25. August 2010 15:58
>> An: users@cxf.apache.org
>> Betreff: Re: AW: Problem with service call in osgi: Unmarshalling 
>> Error: unexpected element (uri:"", local:"customers"). Expected 
>> elements are (none)
>>
>> Hi Christian,
>>
>> Did you try to deploy your bundle into ServicemMix?
>> Can I have a look at your application bundle header?
>>
>> Willem
>>
>> Schneider Christian wrote:
>>> I have set the start levels so that the spec packages are loaded 
>>> first. The console messages below show that the javax.xml.bind.* 
>>> packages are resolved to the same package in jaxb impl and cxf. I 
>>> still get the same error though. Could it be that cxf can not load 
>>> or instantiate my stub classes. I must confess I do not really 
>>> understand how cxf can access / create these classes at all. Do I 
>>> have to enable something like buiddy classloading or should this 
>>> simply work?
>>>
>>> I have done an interesting experiment. I added the 
>>> cxf-bundle-minimal jar to the project in a lib dir, adjusted the 
>>> require bundles and the call worked. So I suspect that the problem 
>>> could be that cxf can not access my stub classes. Could I be right? 
>>> Any ideas how to fix that with normal bundles?
>>>
>>> Greetings
>>>
>>> Christian
>>>
>>
>
>

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


Mime
View raw message