Community
Participate
Working Groups
Using I20070410-1043, I got a DebugException when trying to display an array with a null value. The array contained one element that is null. The error in the display panel was: org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred while retrieving component type of array
What was in the array? Does not happen for a simple test case such as an array of (big) Integer objects with some null entries.
It was an array of Annotation. I debugged some code in the apt support.
Have you seen this again Olivier? Might be just a fluke with the VM not loading the class in time, in which case it will be nearly impossible to track down.
I got it again, but I could never end up with a reproducable case.
I got it again. "Error The method toArray(Object[]) in the type Collection is not applicable for the arguments ()". It seems that I have a reproducable test case (at least on my machine). 1) Apply the patch I'll send you shortly. 2) Put a breakpoint line 1967 in org.eclipse.jdt.internal.compiler.batch.Main 3) Run the Compile class that I will send you 4) When you hit the breakpoint, try to display the bootclasspath variable. 5) If it works, go to the return statement and do a "Run to line" and look at the variable value again. 6) It always shows this error for me.
This is using I20070522-0010.
It seems to be related to the fact that on the breakpoint the array is empty and I tried to expand it.
Closing as INVALID. The problem comes from the fact that the source locations of the corresponding launching configuration contained a project that defined a subset of the class libraries. In this subset, I had a java.util.Collection interface that didn't defined the toArray() method. Once I removed the project from the list of project in the source locations, it worked as expected. Is it possible to warn the user about this? I was expecting the classes to come from the current VM, not the source locations. Without debugging it, I would have never been able to understand my mistake.
*** Bug 354906 has been marked as a duplicate of this bug. ***