[net4j] ClassCastException when starting org.eclipse.net4j.util bundle in Equinox [message #497001] |
Thu, 12 November 2009 03:12  |
Eclipse User |
|
|
|
Dear newsgroup,
when trying to start the org.eclipse.net4j.util (version
2.0.0.v200906160348) bundle using the Equinox console, a cast exception
appears (see below). This is strange because net4j works when it is used
in a standalone fashion and when being part of an ordinary Eclipse
Plug-in (launched as an Eclipse application).
Is there anything regarding net4j I have to consider when launching it
within an Equinox container (as opposed to launching it as part of a
full-fledged Eclipse RCP)?
Here is the stack trace of the cast exception:
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090827
1 ACTIVE org.eclipse.core.contenttype_3.4.1.R35x_v20090826-0451
2 ACTIVE org.eclipse.core.runtime_3.5.0.v20090525
3 RESOLVED org.eclipse.net4j.util_2.0.0.v200906160348
osgi> start 3
org.osgi.framework.BundleException: Exception in
org.eclipse.net4j.internal.util.bundle.OM$Activator.start() of bundle
org.eclipse.net4j.util.
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassCastException:
org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
org.eclipse.net4j.internal.util.om.OSGiBundle
at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
... 14 more
Nested Exception:
java.lang.ClassCastException:
org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
org.eclipse.net4j.internal.util.om.OSGiBundle
at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Nested Exception:
java.lang.ClassCastException:
org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
org.eclipse.net4j.internal.util.om.OSGiBundle
at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
at
org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
at java.lang.Thread.run(Thread.java:619)
Many thanks in advance!
Frank
|
|
|
|
Re: [net4j] ClassCastException when starting org.eclipse.net4j.util bundle in Equinox [message #497072 is a reply to message #497061] |
Thu, 12 November 2009 08:00  |
Eclipse User |
|
|
|
Hi Eike,
thank you for your reply. Comments below...
On 11/12/2009 01:02 PM, Eike Stepper wrote:
> I've never seen this kind of issue. Through manual activation the
> sensible sequence of initializations seems to be messed up somehow. I'm
> not sure why you're trying to manually start the bundle since it's
> automatically activated on first access to any of its classes. Please
> elaborate.
I did try to automatically load all bundles. The manual start was just a
consequence of the automatic start failing.
Anyway, after reading your response, I restarted Eclipse and started the
product again in order to retry the automatic launching. Well, guess
what, everything worked like a charm. So this taught me a lesson about
restarting Eclipse before complaining about errors...
Thanks,
Frank
> Frank Grimm schrieb:
>> Dear newsgroup,
>>
>> when trying to start the org.eclipse.net4j.util (version
>> 2.0.0.v200906160348) bundle using the Equinox console, a cast exception
>> appears (see below). This is strange because net4j works when it is used
>> in a standalone fashion and when being part of an ordinary Eclipse
>> Plug-in (launched as an Eclipse application).
>>
>> Is there anything regarding net4j I have to consider when launching it
>> within an Equinox container (as opposed to launching it as part of a
>> full-fledged Eclipse RCP)?
>>
>> Here is the stack trace of the cast exception:
>>
>> Framework is launched.
>>
>> id State Bundle
>> 0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090827
>> 1 ACTIVE org.eclipse.core.contenttype_3.4.1.R35x_v20090826-0451
>> 2 ACTIVE org.eclipse.core.runtime_3.5.0.v20090525
>> 3 RESOLVED org.eclipse.net4j.util_2.0.0.v200906160348
>>
>> osgi> start 3
>> org.osgi.framework.BundleException: Exception in
>> org.eclipse.net4j.internal.util.bundle.OM$Activator.start() of bundle
>> org.eclipse.net4j.util.
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:806)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by: java.lang.ClassCastException:
>> org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
>> org.eclipse.net4j.internal.util.om.OSGiBundle
>> at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
>> ... 14 more
>> Nested Exception:
>> java.lang.ClassCastException:
>> org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
>> org.eclipse.net4j.internal.util.om.OSGiBundle
>> at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
>> at java.lang.Thread.run(Thread.java:619)
>> Nested Exception:
>> java.lang.ClassCastException:
>> org.eclipse.net4j.internal.util.om.LegacyBundle cannot be cast to
>> org.eclipse.net4j.internal.util.om.OSGiBundle
>> at org.eclipse.net4j.internal.util.bundle.OM$Activator.start(OM .java:67)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1 .run(BundleContextImpl.java:783)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tartActivator(BundleContextImpl.java:774)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:755)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:352)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:280)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:272)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandPro vider._start(FrameworkCommandProvider.java:253)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkCommandInt erpreter.execute(FrameworkCommandInterpreter.java:155)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.do command(FrameworkConsole.java:303)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.co nsole(FrameworkConsole.java:288)
>> at
>> org.eclipse.osgi.framework.internal.core.FrameworkConsole.ru n(FrameworkConsole.java:224)
>> at java.lang.Thread.run(Thread.java:619)
>>
>> Many thanks in advance!
>> Frank
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03289 seconds