Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » BundleException: Activator for bundle is invalid, but everything appears to be in place.(org.osgi.framework.BundleException due to ClassNotFoundException)
BundleException: Activator for bundle is invalid, but everything appears to be in place. [message #1061569] Mon, 03 June 2013 02:45 Go to next message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009

I am not sure if this should be in the OSGi mailing list or in this forum so I post it in both locations. Please ignore if you feel this is the wrong location.

In an OSGi Framework application, that has been working for months, I, all of a sudden, get the BundleExceptions below. I have cleaned projects, cleared the configuration area, restarted the machine, reverted back all changes to a known working revision, created a completely new Activator from scratch. All to no avail.

If I inspect the bundle jar (after exporting as pluging) everything appears to be there, and in the right location.

It appears to me that either Eclipse (4.2) is truly confused, or something is seriously broken. I have no idea how to fix it though. I mucked around with Bundle-Classpath in the manifest, but that didn't seem to have an effect either. Again, this project used to work just fine.

Does anyone have an idea what is going on here, and how to fix this?

I have included the relevant parts of the project below.

Your help is greatly appreciated.

Kind Regards,


----- The Exception -----
!ENTRY com.acme.north.web 4 0 2013-06-02 21:29:18.791
!MESSAGE FrameworkEvent ERROR
org.osgi.framework.BundleException: The activator com.acme.north.web.internal.NewActivator for bundle com.acme.north.web is invalid
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(
Caused by: java.lang.ClassNotFoundException: com.acme.north.web.internal.NewActivator
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
	... 12 more
Root exception:
java.lang.ClassNotFoundException: com.acme.north.web.internal.NewActivator
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(

------- -------
source.. = src/main/java/,\
bin.includes = META-INF/,\
src.excludes = src/test/java/
bin.excludes = target/classes/.svn/

----- MANIFEST.MF -----
Manifest-Version: 1.0
Bundle-Version: 1.0.1.qualifier
Bundle-Name: Acme Web
Bundle-ManifestVersion: 2
Bundle-SymbolicName: com.acme.north.web;singleton:=true
Bundle-Classpath: .
Bundle-Activator: com.acme.north.web.internal.NewActivator
Import-Package: com.acme.north.model.entities,
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.acme.north.web
Require-Bundle: org.eclipse.rap.rwt;bundle-version="2.0.0",

----- NewActivator -----
package com.acme.north.web.internal;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class NewActivator implements BundleActivator {

    public void start(BundleContext bundleContext) throws Exception {
    	System.out.println("Starting the bundle...");

    public void stop(BundleContext bundleContext) throws Exception {
    	System.out.println("Stopping now...");
Re: BundleException: Activator for bundle is invalid, but everything appears to be in place. [message #1061780 is a reply to message #1061569] Tue, 04 June 2013 01:43 Go to previous message
Erwin Hogeweg is currently offline Erwin HogewegFriend
Messages: 37
Registered: July 2009
Problem solved.

After another day of head scratching I tried, just for fun and giggles, to change the default output from <bundlename>/target/classes to <bundlename>/bin, and lo and behold, the Exception disappeared and the bundle starts again.

I have no idea what happened here, and I am not ready yet to try to figure that out either... too afraid I will end up dead in the water again.

Wanted to share the information though, in case somebody else runs into the same issue.


Previous Topic:Exporting OSGI product export with target
Next Topic:Bridge between Spring and Equinox
Goto Forum:

Current Time: Sun Oct 17 04:41:42 GMT 2021

Powered by FUDForum. Page generated in 0.02213 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top