cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Resolved] (DOSGI-157) Single-Bundle distribution missing log4j
Date Wed, 14 Sep 2016 09:56:20 GMT


Christian Schneider resolved DOSGI-157.
    Resolution: Won't Fix
      Assignee: Christian Schneider

Single-bundle distro is not supported anymore.

> Single-Bundle distribution missing log4j
> ----------------------------------------
>                 Key: DOSGI-157
>                 URL:
>             Project: CXF Distributed OSGi
>          Issue Type: Bug
>          Components: Product
>    Affects Versions: 1.4.0
>            Reporter: David Bosschaert
>            Assignee: Christian Schneider
> 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(
> 	at$
> 	at
> 	at
> 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 Single-Bundle distro (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 was sent by Atlassian JIRA

View raw message