[ 
https://issues.apache.org/jira/browse/KARAF-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16975615#comment-16975615
 ] 

Robert Varga edited comment on KARAF-6345 at 1/7/20 12:26 PM:
--------------------------------------------------------------

Just confirmed, karaf-4.2.7 with pax-logging-1.10.1 downgraded works as 
expected.

As for the test scenario:
 * clone [https://github.com/opendaylight/odlparent/] , checkout 5.0.x branch
 * clone [https://github.com/opendaylight/controller/] , checkout stable/sodium 
branch
 * setup .m2/settings.xml with the content of odlparent.git/settings.xml (to 
get ODL snapshots/releases)
 * go to controller.git/karaf and edit pom.xml to point to 
karaf4-parent/5.0.4-SNAPSHOT
 * 'mvn clean install', it should result in a karaf-4.2.6 based distribution
 * unpack target/distribution.opendaylight-karaf-1.13.2-SNAPSHOT.tar.gz
 * run ./bin/karaf
 * issue 'feature:install odl-mdsal-distributed-datastore', it should succeed 
and karaf should not crash

now for the failing case:
 * in odlparent.git issue
{code:java}
git fetch "https://git.opendaylight.org/gerrit/odlparent"; 
refs/changes/86/85786/3 && git checkout FETCH_HEAD{code}

 * rebuild odlparent using
{code:java}
mvn clean install -Pq{code}
note the 'q' profile makes things compile fast, otherwise it takes ~30 minutes

 * rebuild controller.git/karaf
 * unpack target/distribution.opendaylight-karaf-1.13.2-SNAPSHOT.tar.gz
 * run ./bin/karaf
 * issue 'feature:install odl-mdsal-distributed-datastore', karaf should crash 
with
{noformat}
opendaylight-user@root>feature:install odl-mdsal-distributed-datastore
Uncaught error from thread 
[opendaylight-cluster-data-akka.actor.default-dispatcher-18]: 
org/iq80/leveldb/DBFactory, shutting down JVM since 
'akka.jvm-exit-on-fatal-error' is enabled for 
ActorSystem[opendaylight-cluster-data]
java.lang.NoClassDefFoundError: org/iq80/leveldb/DBFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at akka.util.Reflect$.findConstructor(Reflect.scala:92)
        at 
akka.persistence.Persistence.akka$persistence$Persistence$$createPlugin(Persistence.scala:408)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:443)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:433)
        at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
        at akka.actor.ExtensionId.apply(Extension.scala:79)
        at akka.actor.ExtensionId.apply$(Extension.scala:78)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.apply(Persistence.scala:433)
        at akka.persistence.Persistence.pluginHolderFor(Persistence.scala:391)
        at akka.persistence.Persistence.journalConfigFor(Persistence.scala:338)
        at akka.persistence.Eventsourced.$init$(Eventsourced.scala:97)
        at 
akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:455)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.<init>(AbstractUntypedPersistentActor.java:24)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActorWithMetering.<init>(AbstractUntypedPersistentActorWithMetering.java:15)
        at 
org.opendaylight.controller.cluster.datastore.shardmanager.ShardManager.<init>(ShardManager.java:182)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at akka.util.Reflect$.instantiate(Reflect.scala:68)
        at 
akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:101)
        at akka.actor.Props.newActor(Props.scala:212)
        at akka.actor.ActorCell.newActor(ActorCell.scala:648)
        at akka.actor.ActorCell.create(ActorCell.scala:674)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:547)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:569)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:293)
        at akka.dispatch.Mailbox.run(Mailbox.scala:228)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at 
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at 
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: org.iq80.leveldb.DBFactory cannot 
be found by com.typesafe.akka.persistence_2.5.25
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 36 more
Uncaught error from thread 
[opendaylight-cluster-data-akka.actor.default-dispatcher-2]: 
org/iq80/leveldb/DBFactory, shutting down JVM since 
'akka.jvm-exit-on-fatal-error' is enabled for 
ActorSystem[opendaylight-cluster-data]
java.lang.NoClassDefFoundError: org/iq80/leveldb/DBFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at akka.util.Reflect$.findConstructor(Reflect.scala:92)
        at 
akka.persistence.Persistence.akka$persistence$Persistence$$createPlugin(Persistence.scala:408)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:443)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:433)
        at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
        at akka.actor.ExtensionId.apply(Extension.scala:79)
        at akka.actor.ExtensionId.apply$(Extension.scala:78)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.apply(Persistence.scala:433)
        at akka.persistence.Persistence.pluginHolderFor(Persistence.scala:391)
        at akka.persistence.Persistence.journalConfigFor(Persistence.scala:338)
        at akka.persistence.Eventsourced.$init$(Eventsourced.scala:97)
        at 
akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:455)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.<init>(AbstractUntypedPersistentActor.java:24)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActorWithMetering.<init>(AbstractUntypedPersistentActorWithMetering.java:15)
        at 
org.opendaylight.controller.cluster.datastore.shardmanager.ShardManager.<init>(ShardManager.java:182)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at akka.util.Reflect$.instantiate(Reflect.scala:68)
        at 
akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:101)
        at akka.actor.Props.newActor(Props.scala:212)
        at akka.actor.ActorCell.newActor(ActorCell.scala:648)
        at akka.actor.ActorCell.create(ActorCell.scala:674)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:547)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:569)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:293)
        at akka.dispatch.Mailbox.run(Mailbox.scala:228)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at 
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at 
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: org.iq80.leveldb.DBFactory cannot 
be found by com.typesafe.akka.persistence_2.5.25
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 36 more
{noformat}

 

 


was (Author: nite):
Just confirmed, karaf-4.2.7 with pax-logging-1.10.1 works as expected.

As for the test scenario:
 * clone [https://github.com/opendaylight/odlparent/] , checkout 5.0.x branch
 * clone [https://github.com/opendaylight/controller/] , checkout stable/sodium 
branch
 * setup .m2/settings.xml with the content of odlparent.git/settings.xml (to 
get ODL snapshots/releases)
 * go to controller.git/karaf and edit pom.xml to point to 
karaf4-parent/5.0.4-SNAPSHOT
 * 'mvn clean install', it should result in a karaf-4.2.5 based distribution
 * unpack target/distribution.opendaylight-karaf-1.13.2-SNAPSHOT.tar.gz
 * run ./bin/karaf
 * issue 'feature:install odl-mdsal-distributed-datastore', it should succeed 
and karaf should not crash

now for the failing case:
 * in odlparent.git issue
{code:java}
git fetch "https://git.opendaylight.org/gerrit/odlparent"; 
refs/changes/86/85786/2 && git checkout FETCH_HEAD{code}

 * rebuild odlparent using
{code:java}
mvn clean install -Pq{code}
note the 'q' profile makes things compile fast, otherwise it takes ~30 minutes
 * rebuild controller.git/karaf
 * unpack target/distribution.opendaylight-karaf-1.13.2-SNAPSHOT.tar.gz
 * run ./bin/karaf
 * issue 'feature:install odl-mdsal-distributed-datastore', karaf should crash 
with
{noformat}
opendaylight-user@root>feature:install odl-mdsal-distributed-datastore
Uncaught error from thread 
[opendaylight-cluster-data-akka.actor.default-dispatcher-18]: 
org/iq80/leveldb/DBFactory, shutting down JVM since 
'akka.jvm-exit-on-fatal-error' is enabled for 
ActorSystem[opendaylight-cluster-data]
java.lang.NoClassDefFoundError: org/iq80/leveldb/DBFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at akka.util.Reflect$.findConstructor(Reflect.scala:92)
        at 
akka.persistence.Persistence.akka$persistence$Persistence$$createPlugin(Persistence.scala:408)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:443)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:433)
        at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
        at akka.actor.ExtensionId.apply(Extension.scala:79)
        at akka.actor.ExtensionId.apply$(Extension.scala:78)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.apply(Persistence.scala:433)
        at akka.persistence.Persistence.pluginHolderFor(Persistence.scala:391)
        at akka.persistence.Persistence.journalConfigFor(Persistence.scala:338)
        at akka.persistence.Eventsourced.$init$(Eventsourced.scala:97)
        at 
akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:455)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.<init>(AbstractUntypedPersistentActor.java:24)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActorWithMetering.<init>(AbstractUntypedPersistentActorWithMetering.java:15)
        at 
org.opendaylight.controller.cluster.datastore.shardmanager.ShardManager.<init>(ShardManager.java:182)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at akka.util.Reflect$.instantiate(Reflect.scala:68)
        at 
akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:101)
        at akka.actor.Props.newActor(Props.scala:212)
        at akka.actor.ActorCell.newActor(ActorCell.scala:648)
        at akka.actor.ActorCell.create(ActorCell.scala:674)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:547)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:569)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:293)
        at akka.dispatch.Mailbox.run(Mailbox.scala:228)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at 
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at 
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: org.iq80.leveldb.DBFactory cannot 
be found by com.typesafe.akka.persistence_2.5.25
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 36 more
Uncaught error from thread 
[opendaylight-cluster-data-akka.actor.default-dispatcher-2]: 
org/iq80/leveldb/DBFactory, shutting down JVM since 
'akka.jvm-exit-on-fatal-error' is enabled for 
ActorSystem[opendaylight-cluster-data]
java.lang.NoClassDefFoundError: org/iq80/leveldb/DBFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getDeclaredConstructors(Class.java:2020)
        at akka.util.Reflect$.findConstructor(Reflect.scala:92)
        at 
akka.persistence.Persistence.akka$persistence$Persistence$$createPlugin(Persistence.scala:408)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:443)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.createExtension(Persistence.scala:433)
        at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1006)
        at akka.actor.ExtensionId.apply(Extension.scala:79)
        at akka.actor.ExtensionId.apply$(Extension.scala:78)
        at 
akka.persistence.Persistence$PluginHolderExtensionId.apply(Persistence.scala:433)
        at akka.persistence.Persistence.pluginHolderFor(Persistence.scala:391)
        at akka.persistence.Persistence.journalConfigFor(Persistence.scala:338)
        at akka.persistence.Eventsourced.$init$(Eventsourced.scala:97)
        at 
akka.persistence.AbstractPersistentActor.<init>(PersistentActor.scala:455)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.<init>(AbstractUntypedPersistentActor.java:24)
        at 
org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActorWithMetering.<init>(AbstractUntypedPersistentActorWithMetering.java:15)
        at 
org.opendaylight.controller.cluster.datastore.shardmanager.ShardManager.<init>(ShardManager.java:182)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at akka.util.Reflect$.instantiate(Reflect.scala:68)
        at 
akka.actor.ArgsReflectConstructor.produce(IndirectActorProducer.scala:101)
        at akka.actor.Props.newActor(Props.scala:212)
        at akka.actor.ActorCell.newActor(ActorCell.scala:648)
        at akka.actor.ActorCell.create(ActorCell.scala:674)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:547)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:569)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:293)
        at akka.dispatch.Mailbox.run(Mailbox.scala:228)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at 
akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at 
akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: org.iq80.leveldb.DBFactory cannot 
be found by com.typesafe.akka.persistence_2.5.25
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at 
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at 
org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 36 more
{noformat}

 

 

> Optional imports do not propagate to OSGi framework
> ---------------------------------------------------
>
>                 Key: KARAF-6345
>                 URL: https://issues.apache.org/jira/browse/KARAF-6345
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.6, 4.2.7
>            Reporter: Robert Varga
>            Assignee: Jean-Baptiste Onofré
>            Priority: Critical
>             Fix For: 4.3.0, 4.2.8
>
>
> Based on 
> [https://lists.apache.org/thread.html/bf9e724cc9715b2a568bac7537a7be4a8df85867a2126bbd14e4e79d@%3Cdev.karaf.apache.org%3E]
> The problem is that:
> {noformat}
> java.lang.NoClassDefFoundError: org/iq80/leveldb/DBFactory
>         at java.lang.Class.getDeclaredConstructors0(Native Method)
>         at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
>         at java.lang.Class.getDeclaredConstructors(Class.java:2020)
>         at akka.util.Reflect$.findConstructor(Reflect.scala:92)
>         at 
> akka.persistence.Persistence.akka$persistence$Persistence$$createPlugin(Persistence.scala:408)
> [snip]
> Caused by: java.lang.ClassNotFoundException: org.iq80.leveldb.DBFactory 
> cannot be found by com.typesafe.akka.persistence_2.5.23
>         at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
>         at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
>         at 
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
>         at 
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         ... 32 more{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to