cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <>
Subject [jira] [Created] (DOSGI-157) Single-Bundle distribution req
Date Sat, 02 Feb 2013 21:48:13 GMT
David Bosschaert created DOSGI-157:

             Summary: Single-Bundle distribution req
                 Key: DOSGI-157
             Project: CXF Distributed OSGi
          Issue Type: Bug
          Components: Product
    Affects Versions: 1.4
            Reporter: David Bosschaert

When configuring Discovery with the Single-Bundle distribution a NoClassDefFoundError occurs
and discovery does not start up.

To reproduce, place a org.apache.cxf.dosgi.discovery.zookeeper.cfg file in the {{load}} directory
with the following content:
{code} ={code}

When the CXF-DOSGi bundle is started the following error appears:
{code} *ERROR* [, id=25, bundle=5]: Unexpected problem updating
Configuration PID=org.apache.cxf.dosgi.discovery.zookeeper, factoryPID=null, bundleLocation=file:/Users/david/checkouts/cxf_dosgi_240113/distribution/single-bundle/target/cxf-dosgi-ri-singlebundle-distribution-1.5-SNAPSHOT.jar
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
	at org.apache.zookeeper.ZooKeeper.<clinit>(
	at org.apache.cxf.dosgi.discovery.zookeeper.ZooKeeperDiscovery.createZooKeeper(
	at org.apache.cxf.dosgi.discovery.zookeeper.ZooKeeperDiscovery.updated(
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger not found by cxf-dosgi-ri-singlebundle-distribution
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(
	at org.apache.felix.framework.BundleWiringImpl.access$400(
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	... 6 more{code}

While CXF-DOSGi has migrated to use SLF4J, the embedded zookeeper code still uses Log4J. Log4J
is currently not provided in the single bundle distro nor marked as imported. The classloader
manages to get access to it because of the Dynamic-ImportPackage=* which is present in the
CXF-DOSGi bundle (yuck).

As the Single-Bundle distro is really about convenience, it should also provide the Log4J
classes so that the discovery code will work without providing any additional bundles.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message