Tuesday, November 20, 2012

Eclipse Is Back


That's a new one, served fresh in a modal popup close to my face: 
An internal error occurred during: "Launching TestTemplate".
java.lang.NullPointerException
Restart, clean, refresh, nothing helped so far. Is it something in the code itself? Weird. Only other symptoms: 'misplaced' breakpoint (due to quick edit somehow) can't be removed, and no new breakpoints can be added anywhere.

Getting new issues from Eclipse is getting old.

---

(Expletive deleted), this is annoying. Deleted various project files. Open/Closed project, committed all uncommitted, tried the trick "Disable-Enable Dependencies" described in earlier posts, et-f5g-cetera. No go.

---

Found a clue: after deleting the contents of target/, the classes/ and test-classes/ folders are recreated, but they don't get populated. Is it my deletion of the .settings project files, or is it the original problem?

...no, the .settings/ files are actually back (org.eclipse.jdt.core.prefs, org.maven.ide.eclipse.prefs).

---

Two more clues: the process roster has a large number of zombie-like processes in it. When they are terminated, they take a long time, then both die, and a dialog "Termination Failed" is shown.

And shifting to 'Run' instead of 'Debug As..' I get this:


Exception in thread "main" java.lang.NoClassDefFoundError: org/pub/TemplateTest
Caused by: java.lang.ClassNotFoundException: org.pub.TemplateTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Yeah, if the build isn't working, that's not totally weird.

It's interesting that this causes the debugger to not be able to connect to the child process! Is it that it fails so fast, that there's no time? Or does it depend on a working classpath? Would be interesting to know...

---

Solution: rename the project. Don't ask me why it works. My guess is that some cache or setting is associated with the project name.

Repugnant shit...

No comments:

Post a Comment