score:27
Basically it means the class loader has not loaded the GridSquare[] class. That being said it sounds like a bug in the debugger in some way. The breakpoint association with the code seems to be slightly broken. Either you need to recompile to get the line numbers in sync or some other issue is going on. At that point in the code (after the assignment) it needs to be loaded. Unless getSquares actually returns a subclass (GridSquareSubclass[]) at which point the JVM may not have loaded it because it doesn't need it (yet).
score:-3
I faced the same problem, i just created a public static void main method, created object of same type and Run As java Application, i then removed main method, it now works fine.
score:-1
By initializing GridSquare will solve the problem. squares =new GridSquare();
score:0
I have seen this happen in Eclipse when you have a subclass's class variables hiding a parent class's variables. Somehow that confuses Eclipse (and generally is a bad idea anyway :). For example:
class A {
private String a;
}
class B extends A {
public String a;
}
score:0
//Give a SIZE to the array:
GridSquare[] squares = GridSquare[this.theGrid.size()];
//Fill each element of the array with the object constructor to avoid the null value
for(int i=0; i<this.theGrid.size(); i++){
squares[i] = new GridSquare();
squares[i] = this.theGrid.getSquares(14, 18, 220, 222);
}
score:1
I ran into this error because I was running a unit test on code that uses reflection. I had made a special class for testing all the features of the code. Junit apparently uses a separate classloader for test classes (which makes perfect sense) so my code was not able to use reflection on that class. The stack trace I got was extremely generic (java.lang.InstantiationException) but when I checked in debug mode there was more detail on the Exception object itself (org.eclipse.debug.core.DebugException: com.sun.jdi.ClassNotLoadedException) which led me to this conclusion.
So I moved the special class to the main classloader (by moving the file from src/test/java to src/main/java) and it worked fine. I don't like this solution but I cannot figure out an alternative. In my case it's not a big deal but I can see how this might be a concern for others.
Source: stackoverflow.com
Related Query
- How do I deal with a ClassNotLoadedException while debugging?
- how to access a text file while debugging with eclipse CDT
- How to ignore class methods in the same line while debugging with Eclipse?
- How to execute some function in eclipse while debugging a java program?
- How to deal with missing src/test/java source folder in Android/Maven project?
- Android app crashes with SIGABRT Signal 6 only while Eclipse debugging
- How to skip loops while debugging Java code?
- How to set up the Eclipse for remote C debugging with gdbserver?
- How to turn off DataNucleus Enhancer while working with Google App Engine
- How to do remote debugging with Eclipse CDT without gdbserver?
- How to deal with Camel Case for Eclipse Templates?
- How to setup remote debugging with Eclipse and PyDev
- How to come out of while loop during debugging
- How to deal with Eclipse CDT+Cygwin?
- How to make my project compatible with different sdk versions while using features for an specific version
- how do you make getResourceAsStream work while debugging Java in Eclipse?
- How to terminate android application while debugging in eclipse
- On Linux, Debugging a C++ application with gdb in Eclipse CDT, how to input something to stdin?
- How to disable eclipse switching to debug view while debugging
- How to fix ssh authentication error while working with Eclipse and Git
- How to deal with 'Incompatible Java Versions running 0' in Eclipse Window Builder?
- How to change value of a HashMap while debugging in eclipse
- What is the deal with the unicode character 首(U+9996) and how java/mysql deal with it and its friends?
- How to see symbols of system libraries of android SDK, while debugging in Eclipse?
- How to deal with unresolved inclusion in eclipse in c++
- How do I deal with a persistent problem of Eclipse hanging on my workspace?
- How to add Arguments while debugging php scripts in Eclipse?
- How to Jump to the next tag while working with Eclipse or Aptana Studio?
- Force return with a specific value while debugging in Eclipse CDT
- How to deal best with SVN and local changes, that should not be committed?
More Query from same tag
- How to hide the CVS related information on the Source files in Eclipse?
- Android AVD not showing anything. only "ANDROID" in the middle of the screen
- Unable to draw in processing language when I integrated it with Eclipse
- java.lang.UnsatisfiedLinkError: /tmp/tmplib/libVisionProxy.so: /tmp/tmplib/libVisionProxy.so
- The JOptionPane in eclipse is extremely tiny
- Boolean value changes when run
- How do I have to configure Eclipse to show me only direct members of a type in an autocomplete proposal?
- CSS not finding JavaFX rules
- Subversion Synchronize View in Webstorm
- osgi with eclipse maven and maven-bundle-plugin
- UML tool for reverse engineering an eclipse project
- Google APIs Client Library for Java (google-api-java-client) -- Maven vs. Importing JARs
- Share data between views (ViewPart) Equinox
- Eclipse CDT: Skip make/build before Debug/Run
- Java program with startupparameters in eclipse
- Eclipse RCP view will not update when editor data is modified
- The method getString(int) is undefined for the type Apps
- Eclipse won't open a file
- GCC C++ Linker section on FC13
- Deleting Git repository has deleted my project
- How to use File Explorer on a rooted device?
- How can I import all unimported classes in Scala IDE?
- Is there a way to produce list of all classes/methods (without implementation) and save as a text file using eclipse?
- java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
- How do i import javafx in eclipse?
- Setting an attribute to launch configuration in eclipse
- Package gets distributed while importing a project into Eclipse
- Eclipse Wizard plugin executes code for all pages at once
- Eclipse AVD :- I cant create an Android 4.3 virtual emulator
- ResourceHandler stop hosting files with jetty 9 - 404 not found error (works fine with jetty 8)