cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bosschaert (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DOSGI-157) Single-Bundle distribution missing log4j
Date Sat, 02 Feb 2013 21:48:13 GMT

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

David Bosschaert updated DOSGI-157:
-----------------------------------

    Summary: Single-Bundle distribution missing log4j  (was: Single-Bundle distribution req)
    
> 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
>            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}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 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: http://www.atlassian.com/software/jira

Mime
View raw message