|
|
|
|
|
Re: java.lang. NoClassDefFoundError [message #496820 is a reply to message #496799] |
Wed, 11 November 2009 13:50 |
Benjamin Muskalla Messages: 338 Registered: July 2009 |
Senior Member |
|
|
Hi,
you cannot access classes that are not part of any bundle due to the
classloader architecture of OSGi. Please convert your project to a
bundle and add is as dependency to your plugin.
Regards,
Ben
salamat wrote:
> Hi,
> yes. everything is OK with the OSGI dependencies. the problem is that
> the class hallo normally java class (not plug-in)
>
> java.lang.NoClassDefFoundError: Test/hallo
> at Test_RCP.Application.createUI(Application.java:23)
> at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU
> I(EntryPointManager.java:92)
> at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT
> LifeCycle.java:231)
> at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont
> roller.run(RWTLifeCycle.java:119)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: Test.hallo
> at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter
> nal(BundleLoader.java:494)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:410)
> at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund
> leLoader.java:398)
> at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa
> dClass(DefaultClassLoader.java:105)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> ... 5 more
> ss
>
> Framework is launched.
>
> id State Bundle
> 0 ACTIVE org.eclipse.osgi_3.5.1.R35x_v20090806
> 1 ACTIVE org.eclipse.equinox.registry_3.4.100.v20090520-1800
> 2 ACTIVE javax.servlet_2.5.0.v200806031605
> 3 ACTIVE org.mortbay.jetty.util_6.1.15.v200905182336
> 4 ACTIVE com.ibm.icu.base_4.0.1.v20090415
> 5 ACTIVE org.eclipse.rap.jface_1.2.1.20090813-1453
> 6 ACTIVE
> org.eclipse.core.databinding.property_1.2.0.M20090708-0800a
> 7 ACTIVE org.eclipse.core.contenttype_3.4.0.v20090429-1800
> 8 ACTIVE org.eclipse.equinox.http.registry_1.0.200.v20090520-1800
> 9 ACTIVE org.mortbay.jetty.server_6.1.15.v200905151201
> 10 ACTIVE org.eclipse.equinox.http.servlet_1.0.200.v20090520-1800
> 11 ACTIVE org.eclipse.core.databinding.beans_1.2.0.I20090525-2000
> 12 ACTIVE org.eclipse.rap.rwt_1.2.1.20090813-1453
> Fragments=23
> 13 ACTIVE org.eclipse.equinox.app_1.2.0.v20090520-1800
> 14 ACTIVE
> org.eclipse.core.databinding.observable_1.2.0.I20090604-2000
> 15 ACTIVE org.eclipse.osgi.services_3.2.0.v20090520-1800
> 16 ACTIVE org.eclipse.core.commands_3.5.0.I20090525-2000
> 17 ACTIVE org.eclipse.rap.ui.views_1.2.1.20090813-1453
> 18 ACTIVE org.eclipse.core.jobs_3.4.100.v20090429-1800
> 19 ACTIVE org.eclipse.rap.ui.workbench_1.2.1.20090813-1453
> 20 ACTIVE org.eclipse.core.databinding_1.2.0.I20090604-2000
> 21 ACTIVE org.eclipse.equinox.preferences_3.2.300.v20090520-1800
> 22 ACTIVE Test_RCP_1.0.0.qualifier
> 23 RESOLVED org.eclipse.rap.rwt.q07_1.2.0.20090813-1453
> Master=12
> 24 ACTIVE org.eclipse.rap.jface.databinding_1.2.1.20090813-1453
> 25 ACTIVE org.eclipse.core.expressions_3.4.100.v20090429-1800
> 26 ACTIVE org.eclipse.equinox.http.jetty_2.0.0.v20090520-1800
> 27 ACTIVE org.eclipse.core.runtime_3.5.0.v20090525
> 28 ACTIVE org.eclipse.equinox.common_3.5.0.v20090520-1800
> 29 ACTIVE org.apache.commons.logging_1.0.4.v200904062259
> 30 ACTIVE org.eclipse.rap.ui_1.2.1.20090813-1453
>
> Benjamin Muskalla wrote on Wed, 11 November 2009 05:44
>> Hi,
>>
>> did you check if you use the proper OSGi way to define your
>> dependencies? (see first answer)
>>
>> salamat wrote:
>> > Hallo,
>> > > Hier is my stacktrace:
>> > at least a stacktrace would be useful.
>> java.lang.NoClassDefFoundError: > Test/hallo
>> > at Test_RCP.Application.createUI(Application.java:23)
>> > at
>> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU >
>> I(EntryPointManager.java:92)
>> > at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT >
>> LifeCycle.java:231)
>> > at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont >
>> roller.run(RWTLifeCycle.java:119)
>> > at java.lang.Thread.run(Unknown Source)
>> > Caused by: java.lang.ClassNotFoundException: Test.hallo
>> > at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter >
>> nal(BundleLoader.java:494)
>> > at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund >
>> leLoader.java:410)
>> > at
>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund >
>> leLoader.java:398)
>> > at
>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa >
>> dClass(DefaultClassLoader.java:105)
>> > at java.lang.ClassLoader.loadClass(Unknown Source)
>> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>> > ... 5 more
>> > > the class Test is in another project than the project of RCP
>> > > thank u
>> > Benjamin Muskalla wrote on Wed, 11 November 2009 05:03
>> >> Hey,
>> >>
>> >> at least a stacktrace would be useful. NoClassDefFoundError can be
>> >> anything.
>> >> Regarding what you describe it sounds a little bit like you didn't
>> >> manage your dependencies trough OSGi (eg. Require-Bundle / >>
>> Import-Package) but rather with raw classpath depedencies. Running >>
>> your project on RAP you have use proper OSGi mechanisms.
>> >>
>> >>
>> >> Regards,
>> >> Ben
>> >>
>> >> salamat wrote:
>> >> > Hallo,
>> >> > > I have the plug-in "Hello world" as own project. in the same >>
>> workspace I > have another project. I try to call in the project >>
>> "Hello World" the > class from the other project and agree error: >>
>> java.lang. > NoClassDefFoundError :(
>> >> > has somebody idee?
>> >> > > > thx
>> >>
>> >>
>> >> -- >> Benjamin Muskalla | EclipseSource Karlsruhe
>> >> http://www.eclipsesource.com | http://twitter.com/eclipsesource
>> > >
>>
>> --
>> Benjamin Muskalla | EclipseSource Karlsruhe
>> http://www.eclipsesource.com | http://twitter.com/eclipsesource
>
>
--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds