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...
Cheers,
Erwin
On Jun 2, 2013, at 10:55 PM, Erwin Hogeweg wrote:
> Hi,
>
> I am not sure if this should be in the Equinox forum or in this mailing list
> 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,
>
> Erwin
>
> ----- The Exception -----
> !ENTRY com.acme.north.web 4 0 2013-06-02 21:29:18.791
> !MESSAGE FrameworkEvent ERROR
> !STACK 0
> 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(AbstractBundle.java:172)
> ...
> Caused by: java.lang.ClassNotFoundException:
> com.acme.north.web.internal.NewActivator
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
> ... 12 more
> Root exception:
> java.lang.ClassNotFoundException: com.acme.north.web.internal.NewActivator
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
> ...
>
> ------- build.properties -------
> source.. = src/main/java/,\
> src/main/resources
> bin.includes = META-INF/,\
> .,\
> src/main/resources/,\
> src/main/java/,\
> OSGI-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,
> com.acme.north.model.entities.auth,
> com.acme.north.model.entities.common,
> com.acme.north.model.entities.community,
> com.acme.north.model.entities.profile,
> com.acme.north.model.exceptions,
> com.acme.north.service.interfaces,
> javax.persistence,
> org.apache.commons.logging,
> org.eclipse.jface.dialogs,
> org.osgi.framework;version="[1.5,2)",
> org.osgi.service.component;version="1.1.0",
> org.osgi.service.http;version="[1.2,2)",
> org.osgi.util.tracker;version="[1.4,2)"
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
> Export-Package: com.acme.north.web
> Require-Bundle: org.eclipse.rap.rwt;bundle-version="2.0.0",
> org.eclipse.rap.jface;bundle-version="2.0.0",
> javax.servlet;bundle-version="2.5.0",
> 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 {
>
> @Override
> public void start(BundleContext bundleContext) throws Exception {
> System.out.println("Starting the bundle...");
> }
>
> @Override
> public void stop(BundleContext bundleContext) throws Exception {
> System.out.println("Stopping now...");
> }
> }
>
> Kind Regards,
>
> Erwin
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev