This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243416 - breakpoint in debug test ignored in maven project/debugger not leaving starting state
Summary: breakpoint in debug test ignored in maven project/debugger not leaving starti...
Status: RESOLVED INCOMPLETE
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 17:20 UTC by kalle1
Modified: 2014-07-16 07:32 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
~/.netbeans/8.0/var/log/messages.log (299.32 KB, application/x-octet-stream)
2014-03-31 17:20 UTC, kalle1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalle1 2014-03-31 17:20:40 UTC
Created attachment 146442 [details]
~/.netbeans/8.0/var/log/messages.log

When I debug certain tests of maven projects (with the build in debug test task from context menu of the test class), the debugger never leaves the state "starting", the tests continue in the background (e.g. fail) ignoring the breakpoint (e.g. before the failure statement). In the log (following with tail -f ) I can see the following exception:
<output>
INFO [org.netbeans.modules.j2ee.jboss4.JBDeploymentManager]
java.lang.ClassNotFoundException: org.dom4j.io.SAXReader
	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:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
Caused: java.lang.NoClassDefFoundError: org/dom4j/io/SAXReader
	at org.jboss.deployment.spi.factories.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:147)
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.getDeploymentManager(JBDeploymentManager.java:244)
Caused: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: Classpath is incomplete
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.getDeploymentManager(JBDeploymentManager.java:247)
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.access$200(JBDeploymentManager.java:99)
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager$2.call(JBDeploymentManager.java:193)
Caused: java.util.concurrent.ExecutionException
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager$2.call(JBDeploymentManager.java:199)
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.invokeLocalAction(JBDeploymentManager.java:266)
	at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.executeAction(JBDeploymentManager.java:187)
[catch] at org.netbeans.modules.j2ee.jboss4.JBDeploymentManager.getTargets(JBDeploymentManager.java:769)
	at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargetMap(ServerInstance.java:558)
	at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getTargets(ServerInstance.java:516)
	at org.netbeans.modules.j2ee.deployment.impl.ServerInstance._retrieveTarget(ServerInstance.java:1830)
	at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.access$1000(ServerInstance.java:116)
	at org.netbeans.modules.j2ee.deployment.impl.ServerInstance$DebuggerStateListener$1.run(ServerInstance.java:1955)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
</output>
In projects where debugging tests works as expected, I do not see this exception!

I've been trying to create an example project for 1 hour now, but I don't find the reason. Can somebody take care of this issue with the stack (and the log attached)?

This issue is reproducible on a fresh installation in a Ubuntu 13.10 VM. The log refers to my current installation (there no differences).
Comment 1 kalle1 2014-04-02 13:03:28 UTC
Issue seems to unrelated to the exception below. When I use OpenJDK 7u51 with all packages installed in Ubuntu 13.10, it works. 

Behavior is the same with Oracle JDK 8 and JDK 7u51.
Comment 2 kalle1 2014-04-03 15:31:23 UTC
Ok, it must be related to something else. Now I can't debug and the behavior is the same which I described in the initial report. When I open NetBeans the first time after reboot with OpenJDK 7 (and only with this one) I get a warning ~ "The IDE detected a deadlock. It is strongly recommended to restart". Debugging once worked after I did this, later no more.
Comment 3 kalle1 2014-04-03 15:33:36 UTC
Sorry for spaming, but there's no editing button :( 

The debugger console shows that breakpoints are not submitted (makes sense because the debugger never leaves starting state).
Comment 4 Martin Entlicher 2014-04-11 15:05:05 UTC
Hopefully a full thread dump http://wiki.netbeans.org/GenerateThreadDump will show us where it is stuck and why debugger does not leave the starting state.
Please generate a full thread dump when it's stuck starting and attach it here.
Thanks.
Comment 5 kalle1 2014-04-14 15:01:47 UTC
After adding 
<code>
<debug>true</debug>				<debuglevel>lines,vars,source</debuglevel>
</code>
and setting <tt>forkCount</tt> property of maven-surefire-plugin (2.7) to value != 0 it works. Maybe the debugger could scan these settings and warn if they are incompatible with the debugger or is this a bug? Do you still need the thread dump?
Comment 6 Jan Peska 2014-07-16 07:32:29 UTC
Thread dump could be still useful, please attach it and reopen the bug