org.osgi.framework.BundleException

Activator start error in bundle com.test.basic.servlet [10].

Samebug tips9

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web6166

  • via Oracle Community by dboltri, 11 months ago
    Activator start error in bundle com.test.basic.servlet [10].
  • Activator start error in bundle myapp [10].
  • Activator start error in bundle org.apache.aries.jpa.container [65].
  • Stack trace

    • org.osgi.framework.BundleException: Activator start error in bundle com.test.basic.servlet [10]. at org.apache.felix.framework.Felix.activateBundle(Felix.java:1751) at org.apache.felix.framework.Felix.startBundle(Felix.java:1622) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:915) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:902) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1027) at org.apache.felix.fileinstall.internal.DirectoryWatcher.start(DirectoryWatcher.java:1013) at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1006) at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:396) at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:206) Caused by: java.lang.NoClassDefFoundError: javax/servlet/Servlet at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3520) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1695) ... 8 more Caused by: java.lang.ClassNotFoundException: *** Package 'javax.servlet' is imported by bundle 10 from bundle 0, but the exported package from bundle 0 does not contain the requested class 'javax.servlet.Servlet'. Please verify that the class name is correct in the importing bundle 10 and/or that the exported package is correctly bundled in 0. *** at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1670) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 15 more Caused by: java.lang.ClassNotFoundException: javax.servlet.Servlet at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.getClassByDelegation(ExtensionManager.java:670) at org.apache.felix.framework.searchpolicy.R4Wire.getClass(R4Wire.java:108) at org.apache.felix.framework.ModuleImpl.searchImports(ModuleImpl.java:1370) at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:683) at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1656) ... 17 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    2 times, 10 months ago
    Unknown user
    Once, 1 year ago
    2 times, 2 days ago
    4 times, 2 days ago
    2376 more bugmates