karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amichai Rothman (Jira)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-6210) NoClassDefFoundError: org/apache/karaf/shell/api/action/Action when starting Karaf
Date Tue, 07 Jul 2020 16:45:00 GMT

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

Amichai Rothman commented on KARAF-6210:
----------------------------------------

Still happens in 4.2.8:

java.lang.NoClassDefFoundError: org/apache/karaf/shell/api/action/Action 
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_202] 
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_202] 
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:276)
~[?:?] 
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:655)
~[?:?] 
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:578)
~[?:?] 
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:538)
~[?:?] 
        at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:525)
~[?:?] 
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:328)
~[?:?] 
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:368)
~[?:?] 
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:446)
~[?:?] 
        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) ~[?:1.8.0_202] 
        at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
~[?:?] 
        at org.apache.karaf.shell.impl.action.osgi.CommandExtension.start(CommandExtension.java:100)
~[?:?] 
        at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254)
~[?:?] 
        at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227)
~[?:?] 
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
~[osgi.core-6.0.0.jar:?] 
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
~[osgi.core-6.0.0.jar:?] 
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[osgi.core-6.0.0.jar:?]

        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
~[osgi.core-6.0.0.jar:?] 
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
~[?:?] 
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
~[?:?] 
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
~[?:?] 
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) ~[?:?] 
        at org.eclipse.osgi.container.Module.start(Module.java:467) ~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383)
~[?:?] 
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402)
~[?:?] 
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165)
~[?:?] 
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1153)
~[?:?] 
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1036)
~[?:?] 
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
~[?:?] 
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
~[?:?] 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_202]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_202] 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_202] 
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202] 
Caused by: java.lang.ClassNotFoundException: org.apache.karaf.shell.api.action.Action cannot
be found by org.apache.karaf.system.core_4.2.8 
        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) ~[?:1.8.0_202] 
        ... 42 more

> NoClassDefFoundError: org/apache/karaf/shell/api/action/Action when starting Karaf
> ----------------------------------------------------------------------------------
>
>                 Key: KARAF-6210
>                 URL: https://issues.apache.org/jira/browse/KARAF-6210
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.4
>         Environment: Stock Karaf 4.2.4 on Windows 10 with latest Oracle JDK 8.
>            Reporter: Amichai Rothman
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>         Attachments: karaf_command_not_found.log
>
>
> When starting karaf using equinox and some bundle in the deploy folder, many shell commands
(such as bundle:* and others) are not recognized, and the log shows NoClassDefFoundError:
org/apache/karaf/shell/api/action/Action. Some commands don't work, but others (e.g. shell:*)
do.
> This happens consistently on Windows 10, but not on Linux, not sure why.
>  
> Steps to recreate:
> 1. Extract stock Karaf 4.2.4.
> 2. In etc/config.properties change karaf.framework=felix to karaf.framework=equinox.
> 3. Place org.apache.aries.transaction.blueprint-2.2.0.jar (from maven) in deploy folder.
This is not the only bundle it happens with, just a public one I found for this example. From
several I tried, some recreated the issue and some did not. The bundle is not resolved due
to missing dependencies.
> 4. Start Karaf.
> 5. Try to run bundle:list and it'll say command not found. Or look at the karaf log and
see "java.lang.NoClassDefFoundError: org/apache/karaf/shell/api/action/Action". Use shell
completion to see that some commands are available but others are not.
>  



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

Mime
View raw message