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 240812 - Cannot apply code changes when debugging maven project (can press the button, nothing happens)
Summary: Cannot apply code changes when debugging maven project (can press the button,...
Status: RESOLVED DUPLICATE of bug 248628
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 189565 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-01-22 10:53 UTC by sdlarsen
Modified: 2015-06-16 14:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (199.87 KB, text/plain)
2014-01-22 10:53 UTC, sdlarsen
Details
A test project (5.75 KB, application/x-zip-compressed)
2014-07-25 11:58 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdlarsen 2014-01-22 10:53:33 UTC
Product Version = NetBeans IDE 8.0 Beta (Build 201401141042)
Operating System = Linux version 3.13.0-gentoo-r1 running on amd64
Java; VM; Vendor = 1.7.0_45
Runtime = OpenJDK 64-Bit Server VM 24.45-b08
Comment 1 sdlarsen 2014-01-22 10:53:36 UTC
Created attachment 144240 [details]
IDE log
Comment 2 Martin Entlicher 2014-07-25 11:54:10 UTC
This must be some problem in Maven support.

The fixClasses() is correctly called from:

org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.fixClasses(JPDADebuggerImpl.java:479)
org.netbeans.modules.maven.debug.DebuggerChecker.reload(DebuggerChecker.java:364)
org.netbeans.modules.maven.debug.DebuggerChecker.doReload(DebuggerChecker.java:213)
org.netbeans.modules.maven.debug.DebuggerChecker.checkRunConfig(DebuggerChecker.java:165)
org.netbeans.modules.maven.execute.PrereqCheckerMerger$Impl.checkRunConfig(PrereqCheckerMerger.java:87)
org.netbeans.modules.maven.api.execute.RunUtils.run(RunUtils.java:103)
org.netbeans.modules.maven.ActionProviderImpl.invokeAction(ActionProviderImpl.java:308)
org.netbeans.modules.maven.ActionProviderImpl$2.run(ActionProviderImpl.java:280)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

but the class content is the original file. When I look at the class file (in this case mavenproject5/target/classes/com/mycompany/mavenproject5/AppClass.class), the file's time stamp is not updated after source file modifications. Therefore we apply the old class file.

Even when I close debugger and execute the project again, still the old code is executed. :-(
Comment 3 Martin Entlicher 2014-07-25 11:58:03 UTC
Created attachment 148313 [details]
A test project

Attaching a project I've tested the issue with.
Add a breakpoint inside runToChange() method and after suspend, change the text in System.out.println. After apply code changes, notice that the timestamp of mavenproject5/target/classes/com/mycompany/mavenproject5/AppClass.class (which is uploaded in DebuggerChecker) is not changed.
Comment 4 Martin Entlicher 2014-07-30 22:17:03 UTC
*** Bug 189565 has been marked as a duplicate of this bug. ***
Comment 5 Tomas Stupka 2015-06-16 14:30:59 UTC
perhaps this is caused by the same problem as described in issue #248628

feel free to reopen in case you are able to reproduce with a current dev build

*** This bug has been marked as a duplicate of bug 248628 ***