[
https://issues.apache.org/jira/browse/AXIS2-4853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965002#action_12965002
]
Andreas Veithen commented on AXIS2-4853:
----------------------------------------
I think we all three got a bit confused. Actually, what David and I are
explaining here only applies to Axiom 1.2.9 and above. However, you originally
opened the issue for Axis2 1.5.1, which uses Axiom 1.2.8. On the other hand,
the SCR component descriptor you have shown in the description is definitely
from Axiom 1.2.9.
Actually I tried to reproduce your issue and it appears that the Axis2 OSGi
bundle is broken starting with the 1.5.2 release. I've opened another JIRA
issue that clearly explains the reasons for this: AXIS2-4902. That also implies
that the stack trace you have shown cannot come from Axis2 1.5.2 or 1.5.3,
because in these versions, the bundle would not even resolve (except if you
used an older Axiom version, which would eventually fail for other reasons).
To summarize:
* Axis2 1.5.1 + Axiom 1.2.8 should work, but then you should forget anything
David and I said about the way OSGi is supported by Axiom.
* Axis2 1.5.2 and 1.5.3 will not work until we have a solution for AXIS2-4902.
> Use Axiom osgi services
> -----------------------
>
> Key: AXIS2-4853
> URL: https://issues.apache.org/jira/browse/AXIS2-4853
> Project: Axis2
> Issue Type: Bug
> Affects Versions: 1.5.1
> Reporter: Ancoron Luciferis
>
> When trying to use axis2-osgi with the upstream axiom version the following
> error appears:
> org.osgi.framework.BundleException: Activator start error in bundle
> org.apache.axis2.osgi [285].
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1864)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:1734)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> at com.profitbricks.osgi.test.FelixTest.deployBundle(FelixTest.java:61)
> at com.profitbricks.osgi.test.FelixTest.testModules(FelixTest.java:220)
> Caused by: org.apache.axiom.om.OMException: java.lang.ClassNotFoundException:
> org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
> at
> org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:139)
> at
> org.apache.axiom.om.OMAbstractFactory.getOMFactory(OMAbstractFactory.java:152)
> at
> org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:70)
> at
> org.apache.axis2.engine.AxisConfiguration.<init>(AxisConfiguration.java:160)
> at
> org.apache.axis2.osgi.deployment.OSGiServerConfigurator.populateAxisConfiguration(OSGiServerConfigurator.java:76)
> at
> org.apache.axis2.osgi.deployment.OSGiServerConfigurator.getAxisConfiguration(OSGiServerConfigurator.java:61)
> at
> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
> at
> org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.startConfigurationContext(OSGiConfigurationContextFactory.java:93)
> at
> org.apache.axis2.osgi.deployment.OSGiConfigurationContextFactory.updated(OSGiConfigurationContextFactory.java:102)
> at org.apache.axis2.osgi.internal.Activator.start(Activator.java:45)
> at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:633)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:1817)
> ... 34 more
> Caused by: java.lang.ClassNotFoundException:
> org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory
> at
> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772)
> at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
> at
> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:169)
> at
> org.apache.axiom.om.OMAbstractFactory.getMetaFactory(OMAbstractFactory.java:133)
> This is due to the fact that the axiom OSGi bundles are separated into e.g.
> axiom-api and axiom-impl, where the class
> "org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory" resides in
> "axiom-impl" and the "org.apache.axiom.om.OMAbstractFactory" is exported by
> "axiom-api".
> To overcome this the folks from axiom already provide a service for the
> OMMetaFactory:
> <components xmlns:scr="http://www.osgi.org/xmlns/scr/v1.0.0">
> <scr:component enabled="true" immediate="true"
> name="metafactory.llom.component">
> <implementation
> class="org.apache.axiom.om.impl.llom.factory.OMLinkedListMetaFactory"/>
> <service servicefactory="false">
> <provide interface="org.apache.axiom.om.OMMetaFactory"/>
> </service>
> <property name="implementationName" type="String" value="llom"/>
> <property name="service.pid" value="metafactory.llom.component"/>
> </scr:component>
> </components>
> So the axis2 OSGi integration really should use that instead.
--
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: [email protected]
For additional commands, e-mail: [email protected]