| View previous topic :: View next topic |
| Author |
Message |
smoczyna
Joined: 08 Jan 2009 Posts: 34
|
Posted: Thu Mar 22, 2012 9:23 am Post subject: Debugging problem |
|
|
I have a problem with debugging my projects since updating the GlassFish to the latest version (at least I believe so), the error when trying to debug:
| Code: |
java.lang.NoClassDefFoundError: com/sun/jdi/Bootstrap
at org.netbeans.api.debugger.jpda.AttachingDICookie.findAttachingConnector(AttachingDICookie.java:250)
at org.netbeans.api.debugger.jpda.AttachingDICookie.create(AttachingDICookie.java:123)
at org.netbeans.api.debugger.jpda.JPDADebugger.attach(JPDADebugger.java:280)
at org.netbeans.modules.debugger.jpda.ant.JPDAConnect$1.run(JPDAConnect.java:228)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
Caused by: java.lang.ClassNotFoundException: com.sun.jdi.Bootstrap starting from ModuleCL@22cf60[org.netbeans.api.debugger.jpda] with possible defining loaders null and declared parents [ModuleCL@1ee8942[org.openide.loaders], ModuleCL@19d8f01[org.netbeans.spi.viewmodel], ModuleCL@1e9296a[org.netbeans.api.java.classpath], ModuleCL@13ed32a[org.netbeans.modules.java.source], ModuleCL@bb314f[org.openide.nodes], org.netbeans.MainImpl$BootClassLoader@19bf7d0, ModuleCL@310d66[org.netbeans.modules.projectapi], ModuleCL@c8fecc[org.netbeans.api.debugger], ModuleCL@68b9f[org.netbeans.modules.parsing.api]]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 6 more
Caused by: java.lang.ClassNotFoundException: com.sun.jdi.Bootstrap
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
... 7 more
BUILD FAILED (total time: 0 seconds)
|
Does anybody know possible reasons of this?[/code] |
|
| Back to top |
|
 |
gannet
Joined: 20 Apr 2012 Posts: 5
|
Posted: Fri Apr 20, 2012 1:37 am Post subject: |
|
|
Hi,
I have the exact same error messages occurring and nothing is fixing it.
Only difference is I am using a Tomcat server.
It was working fine the one day and the very next it just stopped working.
I had canceled an automatic java update that morning but other than that nothing worth mentioning.
I have tried everything to fix:
- Delete all breakpoints.
- Debug the catalina.bat script.
- Updated Tomcat.
- Updated Netbeans.
- Updated Java.
- Seems to be unable to locate the tools.jar file in the JAVA_HOME or the bootstrap.jar file in the CATALINA_HOME. Not sure? Moved both files around and restarted several times with no luck.
- Also tried starting the jpda (debugger) against tomcat manually using the command:
"bin\catalina jpda start" from the tomcat root directory. It started fine this way. Leads me to believe there is a issue in Netbeans Connection to Tomcat. Maybe sending the incorrect arguments to the catalina.bat script?
Was also wondering if Windows itself is getting in the way, by restricting access to the shared memory or socket used at startup?
Did you have any luck finding a solution? |
|
| Back to top |
|
 |
gannet
Joined: 20 Apr 2012 Posts: 5
|
Posted: Tue Apr 24, 2012 6:09 am Post subject: Fixed prob |
|
|
After a lot of mucking around I found that it was caused by an upgrading my web projects Jaxb jars to version 2.
I think it was causing a conflict with the Jaxb now built into java. I got around this issue by rolling back the jar files to version 1. This included rolling back the endorsed version of the jaxb jars I had added in an attempt to overwrite Javas built in version of jaxb. i.e. java_home\jre\lib\endorsed\jaxb-api.jar
Netbeans did a lovely job of telling me absolutely nothing about the conflict and instead just failing when the debugger was being attached. This made it really hard to find out what actually went wrong. Built beautifully just would not debug. Eventually wouldn't run either.
Hope this helps. |
|
| Back to top |
|
 |
Artur Rataj Posted via mailing list.
|
Posted: Wed Apr 25, 2012 8:04 am Post subject: Debugging problem |
|
|
I had a similar problem, and I have initially thought that these are some native jogl libraries that make Netbeans instable, including especially debugging. It turned out, that the cause was Jaxb2's xjc task. Now I have the commented it out from build.xml, and run it only when needed from the command line.
| Quote: | Netbeans did a lovely job of telling me absolutely nothing about the conflict
|
Is not it some jdk problem, rather than NB's one? |
|
| Back to top |
|
 |
gannet
Joined: 20 Apr 2012 Posts: 5
|
Posted: Thu Apr 26, 2012 12:31 am Post subject: Blame game |
|
|
lol,
Your quite right Artur the problem is probably on the JDk side of things. NB is just the messenger.
Was just making a frustrated joke when I said that. Should probably not take it out on the messenger.  |
|
| Back to top |
|
 |
gannet
Joined: 20 Apr 2012 Posts: 5
|
Posted: Mon Apr 30, 2012 4:27 am Post subject: Re: Debugging problem |
|
|
[quote="Artur Rataj"]Now I have the commented it out from build.xml, and run it only when needed from the command line.
Hi Artur,
I got around the problem of building the jaxb code by swapping to using java's internal jaxb classes instead of using ones I manually downloaded. See ant task below. I added the task to the build.xml file and removed references to manually downloaded jaxb files. Works fine. Netbeans behaves itself as well, debugger no longer fails and Netbeans JVM does not fail to exit, when I close NB anymore.
<property name="proj.root.dir" value="./src" />
<exec executable="${java.home}/../bin/xjc.exe">
<arg value="-d"/>
<arg value="${proj.root.dir}"/>
<arg value="-p"/>
<arg value="example.java.xml.objects"/>
<arg value="resources/*.xsd"/>
</exec>
This might stop you from having to remember to build jaxb using the command line. Every time you update your xsd's. |
|
| Back to top |
|
 |
gannet
Joined: 20 Apr 2012 Posts: 5
|
Posted: Thu Nov 08, 2012 11:56 pm Post subject: Debugger not attaching again for a different reason |
|
|
Once again I have faced the problem with the debugger not attaching when running in debug mode in Netbeans.
This time the error message was a bit different but again failing at:
"connect-client-debugger: "
What I found this time was that in upgrading from Netbeans 7.1 to 7.2 the debugger was broken.
Turned out after lots of head scratching that the project.properties file needed the following two lines commented out (removed):
debug.client=true
debug.server=true
Just set them to:
#debug.client=true
#debug.server=true
Netbeans seems to have changed how they make use of these fields in 7.2, if you leave them in your web servers project.properties file you cannot attach a debugger. |
|
| Back to top |
|
 |
|