QRe: ClassNotLoadedException in Eclipse debugger [message #258885] |
Sun, 01 March 2009 23:39 |
Eclipse User |
|
|
|
"Russell Bateman" <russ@windofkeltia.com> wrote in message
news:ee35b7a553137cfc7c50ccca96a1d1bf$1@www.eclipse.org...
> 1. I'm not certain this is the right forum.
> 2. I will be happy to file a bug should it prove necessary.
> 3. I apologize for cross-posting this to JavaRanch; I probably should have
> posted it here first.
> 4. One of the places I found a reference to this problem via Google was in
> an Eclipse forum, however, the circumstances may not be mine and the
> poster found a work-around; so far, I have not.
>
> This only happens when I attempt to run my JUnit test in the debugger. It
> does not happen when I run my JUnit test without debugger nor does it
> happen in a production run of my greater product.
>
> What I see:
>
> "org.eclipse.debug.core.DebugException:
> com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred
> while retrieving component type of array."
>
> As the first line of my test (not in setUp(), but in the first line of
> "real" code), I have:
>
> 1. public void TestQuickUser() 2. { 3. GQUser[] smacko = new
> GQUser[ 0 ]; <-------------
> 4. ProgGlobals.setJUnitTest( true ); 5. . 6. . 7. .
>
> GQUser is a class in another of the five smallish projects that make up my
> application. In the project of which my JUnit test is a part of, I get it
> via a JAR. Once I step past that statement, however, and I click on smacko
> in the (debugger) Variables pane to see its value, the value appears as
> (the exception) noted above.
>
> This happens regardless of whether I put this code in my test method or in
> setUp().
>
> I've Googled this and found 9 results--several people have seen this, some
> in exactly my same circumstances. Only 2 of them are interesting in that
> they have answers and neither shows any real explanation or an encouraging
> solution. One answer is by someone who completely gives up. The other one
> waffles. I've also asked around a bit here, but none of my acquaintances
> have ever seen it.
>
> It would appear that the catastrophe in this is limited to ever wanting to
> examine GQUser in the debugger. If I put in print statements, it appears
> that things are working; it's just a disaster that I cannot look at this
> in the debugger, that's all, but this class is used all over.
>
> While my example is created to simplify what's happening (which it does
> very nicely), I have a class, ProgGlobals, that must instantiate several
> pieces of static final data of this class in order to function. I am
> unable to see a way to program around it and I can't examine the sanity of
> any of those initializations (nor subsequent assignments, uses, etc.).
>
> Thanks for reading this and for any comments made.
I'm adding eclipse.tools.jdt to the newsgroups list, because that's where
the JDT debug folks hang out.
I assume you've read, and scratched your head over the possible significance
of, the javadoc (e.g.
http://www.potu.com/man/java/guide/jpda/jdi/com/sun/jdi/Clas sNotLoadedException.html)
of the exception itself, which gives some clues but no answers.
Have you looked through the bugs in Bugzilla? I searched there for
"ClassNotLoadedException" in comments (after filtering for the Eclipse/JDT
component) and found several hits but I didn't look at them in detail.
Are you able to determine anything special about GQUser? E.g., if you made
a similar test method that started with assigning an array of some other
type, does the problem still repro?
What version of Eclipse are you running, and what version of the JRE are you
running it on?
Are there any errors in your error log (Window -> Show View -> PDE
Runtime -> Errors, or just look at .metadata/.log)?
|
|
|
Powered by
FUDForum. Page generated in 0.02479 seconds