org.apache.karaf.specs.locator not found

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

org.apache.karaf.specs.locator not found

Alex Soto
With Karaf 4.2.9 and Pax-Exam 4.13.3, and openjdk version "11.0.7" 2020-04-14, running integration tests produces warning:

        WARNING: package org.apache.karaf.specs.locator not in java.base

And error :

Bundle org.apache.felix.framework [0] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator)
java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
        at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
        at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
        at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1289) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:512) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4108) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133) [org.apache.felix.framework-5.6.12.jar:?]
        at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.resolveBundles(BundleInstallSupportImpl.java:244) [!/:?]
        at org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1168) [!/:?]
        at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1022) [!/:?]
        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:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]


Any idea?


Best regards,
Alex soto




Reply | Threaded
Open this post in threaded view
|

Re: org.apache.karaf.specs.locator not found

jbonofre
Hi Alex,

I don’t see this error on Jenkins, so I guess this error is in your itest.

Can you share a simple project to reproduce ?

By the way, I added karaf user mailing list as it’s Karaf related.

Thanks,
Regards
JB

> Le 13 juil. 2020 à 18:11, Alex Soto <[hidden email]> a écrit :
>
> With Karaf 4.2.9 and Pax-Exam 4.13.3, and openjdk version "11.0.7" 2020-04-14, running integration tests produces warning:
>
> WARNING: package org.apache.karaf.specs.locator not in java.base
>
> And error :
>
> Bundle org.apache.felix.framework [0] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator)
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
> at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
> at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1289) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:512) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4108) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.resolveBundles(BundleInstallSupportImpl.java:244) [!/:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1168) [!/:?]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1022) [!/:?]
> 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:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
>
>
> Any idea?
>
>
> Best regards,
> Alex soto
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.karaf.specs.locator not found

Alex Soto
In reply to this post by Alex Soto
Answering my own question…

The karaf.version system property is needed.  It can be configured in the Failsafe plugin as:

                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-failsafe-plugin</artifactId>
                            <configuration>
                                        <systemPropertyVariables>
                                        <karaf.version>${karaf.version}</karaf.version>
                                        </systemPropertyVariables>
                                </configuration>
                        </plugin>

KarafTestSupport class uses this system variable to configure the endorsed Jar providing the OsgiLocator package.

Best regards,
Alex soto




> On Jul 13, 2020, at 12:11 PM, Alex Soto <[hidden email]> wrote:
>
> With Karaf 4.2.9 and Pax-Exam 4.13.3, and openjdk version "11.0.7" 2020-04-14, running integration tests produces warning:
>
> WARNING: package org.apache.karaf.specs.locator not in java.base
>
> And error :
>
> Bundle org.apache.felix.framework [0] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator)
> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
> at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
> at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1289) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:512) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4108) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133) [org.apache.felix.framework-5.6.12.jar:?]
> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.resolveBundles(BundleInstallSupportImpl.java:244) [!/:?]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1168) [!/:?]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1022) [!/:?]
> 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:264) [?:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
> at java.lang.Thread.run(Thread.java:834) [?:?]
>
>
> Any idea?
>
>
> Best regards,
> Alex soto
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.karaf.specs.locator not found

Alex Soto
In reply to this post by jbonofre
I am sorry I posted this to the wrong mailing list.


Best regards,
Alex soto




> On Jul 13, 2020, at 12:22 PM, Jean-Baptiste Onofre <[hidden email]> wrote:
>
> Hi Alex,
>
> I don’t see this error on Jenkins, so I guess this error is in your itest.
>
> Can you share a simple project to reproduce ?
>
> By the way, I added karaf user mailing list as it’s Karaf related.
>
> Thanks,
> Regards
> JB
>
>> Le 13 juil. 2020 à 18:11, Alex Soto <[hidden email]> a écrit :
>>
>> With Karaf 4.2.9 and Pax-Exam 4.13.3, and openjdk version "11.0.7" 2020-04-14, running integration tests produces warning:
>>
>> WARNING: package org.apache.karaf.specs.locator not in java.base
>>
>> And error :
>>
>> Bundle org.apache.felix.framework [0] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator)
>> java.lang.NoClassDefFoundError: org/apache/karaf/specs/locator/OsgiLocator
>> at org.apache.karaf.specs.activator.Activator.register(Activator.java:124) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
>> at org.apache.karaf.specs.activator.Activator.bundleChanged(Activator.java:96) ~[org.apache.karaf.specs.activator-4.2.9.jar:4.2.9]
>> at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.StatefulResolver.fireResolvedEvents(StatefulResolver.java:1289) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.StatefulResolver.resolve(StatefulResolver.java:512) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.Felix.resolveBundles(Felix.java:4108) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.felix.framework.FrameworkWiringImpl.resolveBundles(FrameworkWiringImpl.java:133) [org.apache.felix.framework-5.6.12.jar:?]
>> at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.resolveBundles(BundleInstallSupportImpl.java:244) [!/:?]
>> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.resolveBundles(FeaturesServiceImpl.java:1168) [!/:?]
>> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1022) [!/:?]
>> 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:264) [?:?]
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
>> at java.lang.Thread.run(Thread.java:834) [?:?]
>>
>>
>> Any idea?
>>
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>