Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » BundleActivator invalid
BundleActivator invalid [message #111551] Fri, 06 June 2008 00:10 Go to next message
Eclipse User
Originally posted by: tavoaqp.gmail.com

This is a multi-part message in MIME format.
--------------090305050005080301070001
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi everybody
I'm working on a RAP project for which I have defined a BundleActivator
to load application-wide resources like object pooling for business objects.
I run the project inside Eclipse as an OSGi framework and it runs fine.
When I deploy it as a WAR in a Tomcat server and try to access the
application it says the entrypoint doesnt exists.

As far as I know, this error happens when something went wrong before
entering the entrypoint. Checking the logs from Tomcat I get the
following stack trace (part of it):

!SESSION 2008-06-05 20:40:13.980
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR

!ENTRY org.mytest.main 4 0 2008-06-05 20:40:13.980
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: The activator
org.mytest.main.Activator for bundle org.mytest.main is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)

......

at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
Caused by: java.lang.ClassNotFoundException: org.mytest.main.Activator
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)

Although the Activator implements BundleActivator it shows this error,
besides it ran as an OSGi framework in Eclipse.
Can anybody please give a hand with this??!! I'm really desperate.

Best Regards
Gustavo

--------------090305050005080301070001
Content-Type: text/plain;
name="stacktrace.txt"
Content-Transfer-Encoding: base64
Content-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YWwuY29yZS5TdGFydExldmVsTWFuYWdlci5kaXNw YXRjaEV2ZW50
KFN0YXJ0TGV2ZWxNYW5hZ2VyLmphdmE6NDg5KQ0KCWF0IG9yZy5lY2xpcHNl Lm9zZ2kuZnJh
bWV3b3JrLmV2ZW50bWdyLkV2ZW50TWFuYWdlci5kaXNwYXRjaEV2ZW50KEV2 ZW50TWFuYWdl
ci5qYXZhOjIxMSk=
--------------090305050005080301070001--
Re: BundleActivator invalid [message #111563 is a reply to message #111551] Fri, 06 June 2008 03:24 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon Kaegi
Messages: 381
Registered: July 2009
Senior Member
How did you create your bundle? Via "export" in the IDE or ...?
You might want to crack open your bundle and make sure all of the various
class files are where you expect.

HTH
-Simon

"Gustavo" <tavoaqp@gmail.com> wrote in message
news:g29vd3$2s2$1@build.eclipse.org...
> Hi everybody
> I'm working on a RAP project for which I have defined a BundleActivator
> to load application-wide resources like object pooling for business
> objects.
> I run the project inside Eclipse as an OSGi framework and it runs fine.
> When I deploy it as a WAR in a Tomcat server and try to access the
> application it says the entrypoint doesnt exists.
>
> As far as I know, this error happens when something went wrong before
> entering the entrypoint. Checking the logs from Tomcat I get the
> following stack trace (part of it):
>
> !SESSION 2008-06-05 20:40:13.980
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_04
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR
>
> !ENTRY org.mytest.main 4 0 2008-06-05 20:40:13.980
> !MESSAGE
> !STACK 0
> org.osgi.framework.BundleException: The activator
> org.mytest.main.Activator for bundle org.mytest.main is invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
>
> .....
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
> Caused by: java.lang.ClassNotFoundException: org.mytest.main.Activator
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>
> Although the Activator implements BundleActivator it shows this error,
> besides it ran as an OSGi framework in Eclipse.
> Can anybody please give a hand with this??!! I'm really desperate.
>
> Best Regards
> Gustavo
>


------------------------------------------------------------ --------------------


> !SESSION 2008-06-05
> 20:40:13.980 -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_04
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR
>
> !ENTRY com.bayesforecast.wise 4 0 2008-06-05 20:40:13.980
> !MESSAGE
> !STACK 0
> org.osgi.framework.BundleException: The activator
> org.mytest.main.Activator for bundle org.mytest.main is invalid
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1074)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:616)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:299)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:489)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
> Caused by: java.lang.ClassNotFoundException: org.mytest.main.Activator
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:139)
> ... 10 more
> Root exception:
> java.lang.ClassNotFoundException: org.mytest.main.Activator
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:139)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
> at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1074)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:616)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:299)
> at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:489)
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
Re: BundleActivator invalid [message #111584 is a reply to message #111563] Fri, 06 June 2008 17:43 Go to previous message
Eclipse User
Originally posted by: tavoaqp.gmail.com

Hi Simon
I created my bundle using an ANT script available from project
org.eclipse.rap.demo.feature. The script runs fine too, I mean, it is
compiling all the required bundles.
Also, in Tomcat all the bundles are installed and active (except for
mine which is just RESOLVED).

My bundle serves as a framework for other bundles to create extension
points. I also created a second bundle that extends the first one

These two bundles are included in the WAR file too.

Within the Activator from the first bundle I check if the second bundle
defines a XML file and then I try to load it (this is an extension point).
When I debug that line inside a RAP Application Run Configuration, it
works fine, but when I test it inside an OSGi Framework Run
Configuration that line becomes a bug.

I'm using class FileLocator to find the XML file inside that second
bundle. I also tried Bundle.findEntries and nothing.

This a piece of my source code:

elements = reg .getConfigurationElementsFor("org.mytest.main.xmlsource");
String contributor = null;
if (elements.length > 0) {
contributor = elements[0].getContributor().getName();
sourceBundle = Platform.getBundle(contributor);
String xmlFileName = null;

// getting extensions for xmlsource
xmlFileName = elements[0].getAttribute("filename");
if (xmlFileName == null)
throw new RuntimeException(
"The XML file name is not specified");
else {
URL[] fileURL = FileLocator.findEntries(sourceBundle,
new Path(xmlFileName));
if (fileURL.length>0)
fileURL[0].openStream();
else
throw new RuntimeException(
"A strange problem happened: I can't open the
XML file!");


Just in case, the XML file is being included with the binary build in
the second bundle.

Hope you can help me.

Thanks.

Gustavo


Simon Kaegi escreveu:
> How did you create your bundle? Via "export" in the IDE or ...?
> You might want to crack open your bundle and make sure all of the various
> class files are where you expect.
>
> HTH
> -Simon
>
> "Gustavo" <tavoaqp@gmail.com> wrote in message
> news:g29vd3$2s2$1@build.eclipse.org...
>> Hi everybody
>> I'm working on a RAP project for which I have defined a BundleActivator
>> to load application-wide resources like object pooling for business
>> objects.
>> I run the project inside Eclipse as an OSGi framework and it runs fine.
>> When I deploy it as a WAR in a Tomcat server and try to access the
>> application it says the entrypoint doesnt exists.
>>
>> As far as I know, this error happens when something went wrong before
>> entering the entrypoint. Checking the logs from Tomcat I get the
>> following stack trace (part of it):
>>
>> !SESSION 2008-06-05 20:40:13.980
>> -----------------------------------------------
>> eclipse.buildId=unknown
>> java.version=1.6.0_04
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR
>>
>> !ENTRY org.mytest.main 4 0 2008-06-05 20:40:13.980
>> !MESSAGE
>> !STACK 0
>> org.osgi.framework.BundleException: The activator
>> org.mytest.main.Activator for bundle org.mytest.main is invalid
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
>>
>> .....
>>
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
>> Caused by: java.lang.ClassNotFoundException: org.mytest.main.Activator
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>>
>> Although the Activator implements BundleActivator it shows this error,
>> besides it ran as an OSGi framework in Eclipse.
>> Can anybody please give a hand with this??!! I'm really desperate.
>>
>> Best Regards
>> Gustavo
>>
>
>
> ------------------------------------------------------------ --------------------
>
>
>> !SESSION 2008-06-05
>> 20:40:13.980 -----------------------------------------------
>> eclipse.buildId=unknown
>> java.version=1.6.0_04
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_BR
>>
>> !ENTRY com.bayesforecast.wise 4 0 2008-06-05 20:40:13.980
>> !MESSAGE
>> !STACK 0
>> org.osgi.framework.BundleException: The activator
>> org.mytest.main.Activator for bundle org.mytest.main is invalid
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:146)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
>> at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1074)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:616)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:299)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:489)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread .run(EventManager.java:321)
>> Caused by: java.lang.ClassNotFoundException: org.mytest.main.Activator
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>> at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:139)
>> ... 10 more
>> Root exception:
>> java.lang.ClassNotFoundException: org.mytest.main.Activator
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>> at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:313)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:227)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:139)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:980)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:346)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resu me(AbstractBundle.java:355)
>> at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBun dle(Framework.java:1074)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.r esumeBundles(StartLevelManager.java:616)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.i ncFWSL(StartLevelManager.java:508)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d oSetStartLevel(StartLevelManager.java:299)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.d ispatchEvent(StartLevelManager.java:489)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEve nt(EventManager.java:211)
>
>
Previous Topic:easybeans and equinox
Next Topic:Eclipse Plug-in Project vs. Plug-in in Target Platform
Goto Forum:
  


Current Time: Fri Sep 19 21:58:27 GMT 2014

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

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