Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Class loader problem with headless application in runtime workbench
Class loader problem with headless application in runtime workbench [message #147088] Tue, 21 October 2003 05:31 Go to next message
Eclipse UserFriend
I am having a problem locating a class in a plugin when loading the class
specified as the entry class for a plugin that contributes to
org.eclipse.core.runtime.applications when launching in the runtime
workbench.

Lets call the application launch plugin A and the dependent plugin B.

The attempt to load the main class for A fails when it first tries to
reference a class from plugin B. Since I am using the runtime workbench, I
am under the impression that I don't need to create jars for my plugins. Is
this correct.

In the plugin.xml for A, B is marked as required. B also exports
everything.

B is a library plugin and does not contribute to any Eclipse extension
points.

The log file is attached. In this stacktrace A is
org.eclipse.stellation.remote.server and B is
org.eclipse.stellation.repos.msghandler.server.

!SESSION Oct 21, 2003
05:11:44.62 ----------------------------------------------
java.version=1.4.2
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -pdelaunch -data e:\runtime-workspace -feature
org.eclipse.platform -dev bin -os win32 -ws win32 -arch x86 -nl
en_US -noupdate -consolelog -debug --debug 3 --database
mysql+stellation -configuration
file:e:/StellationRefactorForWVCM-1/.metadata/.plugins/org.e clipse.pde.core/e__runtime-workspace/platform.cfg -
install file:E:/Eclipse-M4/eclipse/
!ENTRY org.eclipse.core.runtime 4 2 Oct 21, 2003 05:11:44.62
!MESSAGE Plug-in org.eclipse.stellation.remote.server was unable to load
class org.eclipse.stellation.remote.server.RepositoryServer.
!STACK 0
java.lang.NoClassDefFoundError:
org/eclipse/stellation/repos/msghandler/server/Service
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.getConstructor(Class.java:1019)
at
org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
n(PluginDescriptor.java:731)
at
org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
Descriptor.java:200)
at
org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
ssLoader.java:109)
at
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
Self(PluginClassLoader.java:181)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
(DelegatingURLClassLoader.java:485)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:882)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:862)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:128)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:179)
at
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
sion(ConfigurationElement.java:103)
at
org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(Interna
lPlatform.java:573)
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:324)
at
org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLo
ader.java:471)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:854)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
at org.eclipse.core.launcher.Main.run(Main.java:765)
at org.eclipse.core.launcher.Main.main(Main.java:599)
!ENTRY org.eclipse.core.runtime 4 2 Oct 21, 2003 05:11:44.93
!MESSAGE Plug-in org.eclipse.stellation.remote.server was unable to load
class org.eclipse.stellation.remote.server.RepositoryServer.
!STACK 0
java.lang.NoClassDefFoundError:
org/eclipse/stellation/repos/msghandler/server/Service
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.getConstructor(Class.java:1019)
at
org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
n(PluginDescriptor.java:731)
at
org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
Descriptor.java:200)
at
org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
ssLoader.java:109)
at
org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
Self(PluginClassLoader.java:181)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
(DelegatingURLClassLoader.java:485)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:882)
at
org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
URLClassLoader.java:862)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:128)
at
org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
(PluginDescriptor.java:179)
at
org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
sion(ConfigurationElement.java:103)
at
org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(Interna
lPlatform.java:573)
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:324)
at
org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLo
ader.java:471)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:854)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
at org.eclipse.core.launcher.Main.run(Main.java:765)
at org.eclipse.core.launcher.Main.main(Main.java:599)
!SESSION ------------------------------------------------------------ -------
---
!ENTRY org.eclipse.core.launcher 4 0 Oct 21, 2003 05:11:44.125
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.reflect.InvocationTargetException
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:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
at org.eclipse.core.launcher.Main.run(Main.java:765)
at org.eclipse.core.launcher.Main.main(Main.java:599)
Caused by: java.lang.IllegalArgumentException: Application not found:
org.eclipse.stellation.remote.server.repository.
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:856)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
... 7 more

Thanks in advance for any help

Jonathan Gossage
Re: Class loader problem with headless application in runtime workbench [message #147989 is a reply to message #147088] Wed, 22 October 2003 18:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: John_Arthorne.oti.com_

Does either plugin define any package prefixes in their library
declarations? Example:

<runtime>
<library name="resources.jar">
<export name="*"/>
<packages prefixes="org.eclipse.core"/>
</library>
</runtime>

In this case, even if resources.jar contains org.foo.Baz, it won't be
found because it doesn't match the declared prefixes.
--

Jonathan Gossage wrote:
> I am having a problem locating a class in a plugin when loading the class
> specified as the entry class for a plugin that contributes to
> org.eclipse.core.runtime.applications when launching in the runtime
> workbench.
>
> Lets call the application launch plugin A and the dependent plugin B.
>
> The attempt to load the main class for A fails when it first tries to
> reference a class from plugin B. Since I am using the runtime workbench, I
> am under the impression that I don't need to create jars for my plugins. Is
> this correct.
>
> In the plugin.xml for A, B is marked as required. B also exports
> everything.
>
> B is a library plugin and does not contribute to any Eclipse extension
> points.
>
> The log file is attached. In this stacktrace A is
> org.eclipse.stellation.remote.server and B is
> org.eclipse.stellation.repos.msghandler.server.
>
> !SESSION Oct 21, 2003
> 05:11:44.62 ----------------------------------------------
> java.version=1.4.2
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Command-line arguments: -pdelaunch -data e:\runtime-workspace -feature
> org.eclipse.platform -dev bin -os win32 -ws win32 -arch x86 -nl
> en_US -noupdate -consolelog -debug --debug 3 --database
> mysql+stellation -configuration
> file:e:/StellationRefactorForWVCM-1/.metadata/.plugins/org.e clipse.pde.core/e__runtime-workspace/platform.cfg -
> install file:E:/Eclipse-M4/eclipse/
> !ENTRY org.eclipse.core.runtime 4 2 Oct 21, 2003 05:11:44.62
> !MESSAGE Plug-in org.eclipse.stellation.remote.server was unable to load
> class org.eclipse.stellation.remote.server.RepositoryServer.
> !STACK 0
> java.lang.NoClassDefFoundError:
> org/eclipse/stellation/repos/msghandler/server/Service
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
> at java.lang.Class.getConstructor0(Class.java:1922)
> at java.lang.Class.getConstructor(Class.java:1019)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
> n(PluginDescriptor.java:731)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
> Descriptor.java:200)
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
> ssLoader.java:109)
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
> Self(PluginClassLoader.java:181)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
> (DelegatingURLClassLoader.java:485)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:882)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:862)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:128)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:179)
> at
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
> sion(ConfigurationElement.java:103)
> at
> org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(Interna
> lPlatform.java:573)
> 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:324)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLo
> ader.java:471)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
> a:854)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> 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:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
> at org.eclipse.core.launcher.Main.run(Main.java:765)
> at org.eclipse.core.launcher.Main.main(Main.java:599)
> !ENTRY org.eclipse.core.runtime 4 2 Oct 21, 2003 05:11:44.93
> !MESSAGE Plug-in org.eclipse.stellation.remote.server was unable to load
> class org.eclipse.stellation.remote.server.RepositoryServer.
> !STACK 0
> java.lang.NoClassDefFoundError:
> org/eclipse/stellation/repos/msghandler/server/Service
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:16 10)
> at java.lang.Class.getConstructor0(Class.java:1922)
> at java.lang.Class.getConstructor(Class.java:1019)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.internalD oPluginActivatio
> n(PluginDescriptor.java:731)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.doPluginA ctivation(Plugin
> Descriptor.java:200)
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.activate Plugin(PluginCla
> ssLoader.java:109)
> at
> org.eclipse.core.internal.plugins.PluginClassLoader.internal FindClassParents
> Self(PluginClassLoader.java:181)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.find ClassParentsSelf
> (DelegatingURLClassLoader.java:485)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:882)
> at
> org.eclipse.core.internal.boot.DelegatingURLClassLoader.load Class(Delegating
> URLClassLoader.java:862)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:128)
> at
> org.eclipse.core.internal.plugins.PluginDescriptor.createExe cutableExtension
> (PluginDescriptor.java:179)
> at
> org.eclipse.core.internal.plugins.ConfigurationElement.creat eExecutableExten
> sion(ConfigurationElement.java:103)
> at
> org.eclipse.core.internal.runtime.InternalPlatform.loaderGet Runnable(Interna
> lPlatform.java:573)
> 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:324)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.getRunnabl e(InternalBootLo
> ader.java:471)
> at
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
> a:854)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> 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:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
> at org.eclipse.core.launcher.Main.run(Main.java:765)
> at org.eclipse.core.launcher.Main.main(Main.java:599)
> !SESSION ------------------------------------------------------------ -------
> ---
> !ENTRY org.eclipse.core.launcher 4 0 Oct 21, 2003 05:11:44.125
> !MESSAGE Exception launching the Eclipse Platform:
> !STACK
> java.lang.reflect.InvocationTargetException
> 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:324)
> at org.eclipse.core.launcher.Main.basicRun(Main.java:299)
> at org.eclipse.core.launcher.Main.run(Main.java:765)
> at org.eclipse.core.launcher.Main.main(Main.java:599)
> Caused by: java.lang.IllegalArgumentException: Application not found:
> org.eclipse.stellation.remote.server.repository.
> at
> org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
> a:856)
> at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
> ... 7 more
>
> Thanks in advance for any help
>
> Jonathan Gossage
>
>
Re: Class loader problem with headless application in runtime workbench [message #148058 is a reply to message #147989] Thu, 23 October 2003 04:04 Go to previous message
Eclipse UserFriend
It turns out that it was a problem with circular dependencies between the
two plugins that I had missed. It would be nice if the root cause had been
mentioned in the log because it would have saved several hours of
head-scratching.

Regards

Jonathan Gossage

"John Arthorne" <John_Arthorne@oti.com_> wrote in message
news:3F970048.10009@oti.com_...
> Does either plugin define any package prefixes in their library
> declarations? Example:
>
> <runtime>
> <library name="resources.jar">
> <export name="*"/>
> <packages prefixes="org.eclipse.core"/>
> </library>
> </runtime>
>
> In this case, even if resources.jar contains org.foo.Baz, it won't be
> found because it doesn't match the declared prefixes.
> --
>
Previous Topic:Insert text into currently selected editor window
Next Topic:Eclipse as end-user application
Goto Forum:
  


Current Time: Mon May 12 12:11:43 EDT 2025

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

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

Back to the top