Pentaho

 View Only

 org.osgi.framework.BundleException: Activator start error in bundle org.apache.cxf.cxf-core [127]

Leo Helfer's profile image
Leo Helfer posted 02-16-2024 13:07

I got the following error message. The data integration works fine, but I am not sure why I am getting this error message and how to fix it.

org.apache.cxf.cxf-core [org.osgi.framework.FrameworkEvent] ERROR : FrameworkEvent ERROR
org.osgi.framework.BundleException: Activator start error in bundle org.apache.cxf.cxf-core [127].
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2290)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.NoClassDefFoundError: org/osgi/service/cm/ManagedServiceFactory
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2410)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2194)
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1607)
    at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at org.apache.cxf.bus.osgi.CXFActivator.start(CXFActivator.java:59)
    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
    ... 4 more
Caused by: java.lang.ClassNotFoundException: org.osgi.service.cm.ManagedServiceFactory not found by org.apache.cxf.cxf-core [127]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
    at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 15 more

Any suggestions?

Petr Prochazka's profile image
Petr Prochazka

Hi Leo,

try delete OSGi cache. Delete directory karaf/caches in system directory.

Leo Helfer's profile image
Leo Helfer

Response to Petr since I can't seem to respond directly:

I am not sure what the "data-1", "data-2", and "data-3" directories are, are you saying I should delete the "data-1/cache", "data-2/cache", and "data-3/cache"?

You are saying I should really just delete the entire "system/karaf/caches/" directory all together?

Petr Prochazka's profile image
Petr Prochazka

You can delete all data-n directories, if server is stopped.

Leo Helfer's profile image
Leo Helfer

What would happen if I deleted some of the caches while it was running? I had too many tabs opened and deleted one of them. I was able to delete it successfully and nothing looked weird in the logs, is there anything I should be worried about?

Petr Prochazka's profile image
Petr Prochazka

Hi Leo,

I don't known how is behaviour of OSGi when you delete any his files when is running. But if you run PDI on Windows, files can be locked by running process.

data-1 means first instance of OSGi in PDI. If you run PDI twice then is created data-2 directory with cache for second instance. So if you run only one instance, important is directory data-1.

Leo Helfer's profile image
Leo Helfer

Thank you, my question is now solved.

Leo Helfer's profile image
Leo Helfer

If we clear the cache, would we ever need to clear the cache again? Or only as needed if we make any changes to the data-integration files?

Petr Prochazka's profile image
Petr Prochazka

IMHO this depends on used JRE, not modified trans files. I have experience that when changed JRE version, after sometimes cache is broken.