0
votes

just another question for my osgi project. I get this error code:

!SESSION 2015-10-26 10:50:01.671 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_60 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE Command-line arguments: -dev file:C:/Users/Dennis/workspace/.metadata/.plugins/org.eclipse.pde.core/delicomFirstOSGIPlugin/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console

!ENTRY de.delicom.testosgi 4 0 2015-10-26 10:50:02.318 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Error loading bundle activator. at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:711) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318) at org.eclipse.osgi.container.Module.doStart(Module.java:571) at org.eclipse.osgi.container.Module.start(Module.java:439) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) Caused by: java.lang.ClassNotFoundException: de.delicom.testosgi.Activator.java cannot be found by de.delicom.testosgi_1.0.0.qualifier at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344) at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:754) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:706) ... 11 more Root exception: java.lang.ClassNotFoundException: de.delicom.testosgi.Activator.java cannot be found by de.delicom.testosgi_1.0.0.qualifier at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344) at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:754) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:706) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318) at org.eclipse.osgi.container.Module.doStart(Module.java:571) at org.eclipse.osgi.container.Module.start(Module.java:439) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2015-10-26 10:50:02.322 !MESSAGE Bundle de.delicom.testosgi_1.0.0.qualifier [11] is not active.

My Manifest looks like:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Testosgi
Bundle-SymbolicName: de.delicom.testosgi
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: de.delicom.testosgi.Activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.osgi.framework;version="1.3.0"
Bundle-ClassPath: . ,
 soapui-4.0.1.0.jar,
 xmlbeans-2.6.0.jar,
 xmlbeans-xpath-2.6.0.jar,
 src/
Bundle-ActivationPolicy: lazy

The external jar's i've added to Buildpath and Classpath. They are also in the referenced libaries.

Anyone have an idea? Thank you

1
"java.lang.ClassNotFoundException: de.delicom.testosgi.Activator.java " Why does it say ".java" in there? Should just be a class name. Your manifest seems okay as posted. Maybe an old version still deployed/cached?Thilo
it is my first installation of osgi. I get also an "java.lang.IllegalStateException: Workbench has not been created yet." error. Do you have any idea what happend there? I don't know why there is ".java" in there.creative235
Search all your files for "Activator.java".Thilo
Yes there is an Activator.java file in my workspace in the src folder. Sorry i'm a comple noob with osgi :/creative235

1 Answers

0
votes

>org.osgi.framework.BundleException: Error loading bundle activator this is typical run-time error if you forget define "bin/" (or "target/..") folder in your project: META-INF/MANIFEST.MF :

Bundle-ClassPath: target/classes,  **<<<---- here is it !**
 libs/log4j-1.2.16.jar,
 libs/slf4j-api-1.6.0.jar,
 libs/slf4j-log4j12-1.6.0.jar,
 libs/commons-io-2.4.jar
Bundle-Activator: com.senatov.smapperApp.Activator