Hi all,
I'm trying to use cxf-bundle-2.7.7 to create an OSGi application that
uses org.apache.cxf.ws.security.wss4j package.
However, cxf-bundle-2.7.7 fails to start, due to following error:
Activator start error in bundle org.apache.cxf.bundle [158].
Caused by:
java.lang.ClassNotFoundException: org.apache.neethi.AssertionBuilderFactory not
found by org.apache.cxf.bundle [158]
I've been looking into cxf-bundle-2.7.7 manifest and couldn't find any
dependency to this package.
Please, see attached document if more detail is desired.
I guess this problem is related with the issue noticed in the previous
conversation. Taking the same recommended approach of using individual
CXF modules (instead of composite bundles), how can I know which modules
to install?
Thank you in advance,
Isart
El 17/10/13 19:00, Sergey Beryozkin ha escrit:
Hi David
On 17/10/13 17:00, David Bosschaert wrote:
Caused by: java.lang.NoClassDefFoundError:
org/osgi/framework/BundleActivator
Is the bundle importing the org.osgi.framework package?
Hmm..., good catch, it appears none of CXF 2.7.7 composite/big bundles
import it. It is there imported correctly in CXF 2.7.6.
We now work with installing individual modules, example, cxf rt core,
etc, which import this package, but the big bundles have missed it in
CXF 2.7.7
Adrián, can you experiment with installing individual CXF modules
(which are now bundles) ? You probably need cxf-rt-core,
cxf-rt-bindings-xml, cxf-rt-transports-http & cxf-rt-frontend-jaxrs,
this is the better way to go, in CXF 3.0.0 composite bundles (except
the all one) have been removed,
though this issue needs to be fixed for 2.7.8
Thanks, Sergey
--
Isart Canyameres Giménez
Distributed Applications and Networks Area (DANA)
Fundació i2CAT, Internet i Innovació Digital a Catalunya, Barcelona, Spain
T: +34 93 567 99 27 - http://dana.i2cat.net
karaf>features:install my-feature
Error executing command: Could not start bundle
mvn:org.apache.cxf/cxf-bundle/2.7.7 in feature(s) my-feature-0.24.1: Activator
start error in bundle org.apache.cxf.bundle [158].
Logs:
org.apache.cxf.bus.extension.ExtensionException: Could not load extension class
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.
at
org.apache.cxf.bus.osgi.CXFExtensionBundleListener$OSGiExtension.tryClass(CXFExtensionBundleListener.java:140)
at
org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:194)
at
org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeansOfType(ExtensionManagerImpl.java:317)
at org.apache.cxf.bus.CXFBusImpl.getExtension(CXFBusImpl.java:108)
at
org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:110)
at
org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:134)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:40)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:36)
at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:32)
at
org.apache.cxf.dosgi.dsw.handlers.HttpServiceManager.registerServletAndGetBus(HttpServiceManager.java:77)
at
org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.createServer(JaxRSPojoConfigurationTypeHandler.java:129)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportInterfaces(RemoteServiceAdminCore.java:165)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:121)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:56)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:54)
at java.security.AccessController.doPrivileged(Native Method)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:54)
at
org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:39)
at
org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.exportServiceUsingRemoteServiceAdmin(TopologyManagerExport.java:177)
at
org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport.doExportService(TopologyManagerExport.java:168)
at
org.apache.cxf.dosgi.topologymanager.exporter.TopologyManagerExport$3.run(TopologyManagerExport.java:143)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError:
org/apache/neethi/AssertionBuilderFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1947)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:752)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1947)
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:752)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:670)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1654)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:909)
at
org.apache.cxf.bus.osgi.CXFExtensionBundleListener$OSGiExtension.tryClass(CXFExtensionBundleListener.java:131)
... 23 more
Caused by: java.lang.ClassNotFoundException:
org.apache.neethi.AssertionBuilderFactory not found by org.apache.cxf.bundle
[158]
at
org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:812)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:72)
at
org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1807)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 43 more
Manifest for mvn:org.apache.cxf/cxf-bundle/2.7.7 does not import
org.apache.neethi package:
karaf>osgi:headers 158
Apache CXF Bundle Jar (158)
---------------------------
Specification-Title = Apache CXF
Tool = Bnd-2.1.0.20130426-122213
Specification-Version = 2.7.7
Specification-Vendor = The Apache Software Foundation
Implementation-Version = 2.7.7
Build-Jdk = 1.6.0_33
Implementation-Vendor-Id = org.apache
Created-By = Apache Maven Bundle Plugin
Implementation-Title = Apache CXF
Manifest-Version = 1.0
Bnd-LastModified = 1379522779665
SPI-Provider = true
Built-By = dkulp
Implementation-Vendor = The Apache Software Foundation
Bundle-Vendor = The Apache Software Foundation
Bundle-Activator = org.apache.cxf.bus.osgi.CXFActivator
Bundle-Name = Apache CXF Bundle Jar
Bundle-DocURL = http://www.apache.org/
Bundle-Description = Apache CXF Bundle Jar
Bundle-SymbolicName = org.apache.cxf.bundle
Bundle-Version = 2.7.7
Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-ManifestVersion = 2
DynamicImport-Package =
com.sun.xml.bind,
com.sun.xml.bind.*,
com.sun.xml.internal.bind,
com.sun.xml.internal.bind.*,
com.ctc.wstx.*,
org.apache.commons.logging.*,
org.slf4j.*,
org.slf4j.impl.*,
org.eclipse.jetty.plus.jaas,
org.eclipse.jetty.plus.jaas.*,
org.apache.karaf.jaas.modules,
org.apache.karaf.jaas.modules.*,
org.eclipse.jetty.jmx,
org.eclipse.jetty.jmx.*
Import-Package =
javax.xml.soap,
org.apache.http.nio.conn;resolution:=optional;version="[4.0.0.beta3,4.1)",
org.apache.lucene.search;resolution:=optional,
org.apache.http.nio.conn.scheme;resolution:=optional;version="[4.0.0.beta3,4.1)",
org.apache.http.impl.nio.conn;resolution:=optional;version="[4.0.0.beta3,4.1)",
org.apache.lucene.document;resolution:=optional,
javax.jms;resolution:=optional;version="[0.0,2)",
javax.activation;version="[0.0,2)",
org.apache.lucene.index;resolution:=optional,
javax.annotation;version="[0.0,2)",
org.joda.time;resolution:=optional;version="[1.6,2)",
org.apache.http.impl.nio.client;resolution:=optional;version="[4.0.0.beta3,4.1)",
repackage;resolution:=optional,
org.apache.http.nio.conn.ssl;resolution:=optional;version="[4.0.0.beta3,4.1)"
Export-Package =
META-INF.cxf;version=2.7.7,
META-INF.cxf.osgi;version=2.7.7