Exceptions at startup of application [message #444099] |
Thu, 09 February 2006 15:55 |
Eclipse User |
|
|
|
Originally posted by: hakan222.gmail.com
Hello,
When running my application in debugmode i noticed that a lot of
exceptions are thrown. In this case I have added ClassNotFoundException
as breakpoint and launch my RCP. Before my application is launched I get
this exception:
Thread [main] (Suspended (exception ClassNotFoundException))
ClassLoader.findBootstrapClass(String) line: not available [native method]
Launcher$ExtClassLoader(ClassLoader).findBootstrapClass0(Str ing) line: 891
Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: 301
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 299
Launcher$AppClassLoader.loadClass(String, boolean) line: 268
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 251
Launcher$AppClassLoader(ClassLoader).loadClassInternal(Strin g) line: 319
The string it is looking for is: org.eclipse.core.launcher.Main
When I resume the next exception is:
Thread [main] (Suspended (exception ClassNotFoundException))
URLClassLoader$1.run() line: 200 [local variables unavailable]
AccessController.doPrivileged(PrivilegedExceptionAction<T>,
AccessControlContext) line: not available [native method]
Launcher$ExtClassLoader(URLClassLoader).findClass(String) line: 188
Launcher$ExtClassLoader(ClassLoader).loadClass(String, boolean) line: 306
Launcher$AppClassLoader(ClassLoader).loadClass(String, boolean) line: 299
Launcher$AppClassLoader.loadClass(String, boolean) line: 268
Launcher$AppClassLoader(ClassLoader).loadClass(String) line: 251
Launcher$AppClassLoader(ClassLoader).loadClassInternal(Strin g) line: 319
And this goes on for quite a while when resuming.
So the question is how I can avoid all this exceptions? Even when I run
the "Hello RCP" application I get them.
Thanks in advance
Håkan
|
|
|
|
Re: Exceptions at startup of application [message #444107 is a reply to message #444102] |
Thu, 09 February 2006 18:57 |
Eclipse User |
|
|
|
Originally posted by: hakan222.gmail.com
Paul Webster wrote:
> While I'm not sure, I think you really don't want to break on
> ClassNotFoundException until your system is up in a stable state ... the
> first time every class is referenced, you get a CNFE and then the JVM
> loads the class ... that means A LOT of exceptions.
>
> Better to set a breakpoint at a known state, and the activate the CNFE
> breakpoint.
>
> Later,
> PW
Thanks Paul,
I didn't know that you got a CNFE the first time every class is loaded.
Made a quick simple java program and it behaved the same way. You learn
something new every day ;)
/ Håkan
|
|
|
Powered by
FUDForum. Page generated in 0.05755 seconds