[ 
https://issues.apache.org/jira/browse/DOSGI-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

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: https://issues.apache.org/jira/browse/DOSGI-157
>             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}zookeeper.host = 127.0.0.1{code}
> When the CXF-DOSGi bundle is started the following error appears:
> {code} *ERROR* [org.osgi.service.cm.ManagedService, 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>(ZooKeeper.java:108)
>       at 
> org.apache.cxf.dosgi.discovery.zookeeper.ZooKeeperDiscovery.createZooKeeper(ZooKeeperDiscovery.java:111)
>       at 
> org.apache.cxf.dosgi.discovery.zookeeper.ZooKeeperDiscovery.updated(ZooKeeperDiscovery.java:72)
>       at 
> org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1160)
>       at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)
>       at java.lang.Thread.run(Thread.java:680)
> Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger not 
> found by cxf-dosgi-ri-singlebundle-distribution [5]
>       at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
>       at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
>       at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>       ... 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
(v6.3.4#6332)

Reply via email to