ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <>
Subject [jira] Resolved: (AXIOM-355) Axiom Causes java.lang.LinkageError Running Under OSGi/Servicemix/Equinox
Date Tue, 11 Jan 2011 22:31:46 GMT


Andreas Veithen resolved AXIOM-355.

    Resolution: Invalid

The stack trace shows a class called SafeXMLStreamReader which only existed in Axiom 1.2.8.
Therefore the issue description doesn't match the information about the affected version (which
mentions 1.2.10). In addition, the OSGi stuff has been completely reworked for the 1.2.9 release.
The manifests are now generated by maven-bundle-plugin which correctly includes
in the Import-Package declaration.

> Axiom Causes java.lang.LinkageError Running Under OSGi/Servicemix/Equinox
> -------------------------------------------------------------------------
>                 Key: AXIOM-355
>                 URL:
>             Project: Axiom
>          Issue Type: Bug
>    Affects Versions: 1.2.10
>         Environment: Apache Servicemix 4.3 (Fuse distribution), Apache ODE, Equinox
>            Reporter: Kurt Westerfeld
> When using Apache ODE under Apache Servicemix, Fuse distribution, which uses Equinox
as a OSGi container, the Apache ODE code throws a classloader exception (see
when trying to use the package.  The error seems to be related to a
partial OSGi "Import-Package" decleration provided by Apache Axiom.  To fix, I adjusted the
OSGi manifest, and added:
> Around/alongside the import package statement.   This hack was not something
I would recommend normal users to have to do--it just illustrates the OSGi packaging problem
Axiom has.
> What I think is going on here is that Axiom loads parts of its classes with the OSGi
loader when running under Servicemix, which provides the package from a supplied
package (Stax API), and then the boot loader provides other parts.  These two class domains
cannot be intermingled.
> Please simply add these two packages listed above to an explicitly declared Import-Package
to the maven compile for Axiom.  This will fix this nicely.  Simply add all three to the maven-bundle-plugin:
> A workaround for this issue can be found at the bottom of this web page, on project 
Apache ODE:   Note the workaround in this
case causes the to always be loaded from one place, and the OSGi manifest
tweaks on Import-Package I suggest above do the same thing (but don't require the user to
change the configuration of the container).
> Here is the stacktrace for the error I am receiving:
> Caused by: java.lang.LinkageError: loader constraint violation: when resolving method
the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of
the current class, org/apache/axiom/om/impl/builder/SafeXMLStreamReader, and the class loader
(instance of <bootloader>) for resolved class, javax/xml/stream/util/StreamReaderDelegate,
have different Class objects for the type javax/xml/stream/XMLStreamReader used in the signature
> 	at<init>(
> 	at
> 	at<init>(
> 	at<init>(
> 	at<init>(
> 	at<init>(
> 	at
> 	at
> 	at org.apache.ode.jbi.DynamicMessageExchangeProcessor.invoke(
> 	at org.apache.ode.jbi.BaseMessageExchangeProcessor.onJbiMessageExchange(
> 	... 8 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message