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 178050 - Deploy on Save does not work
Summary: Deploy on Save does not work
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: PC Other
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-03 01:04 UTC by bht
Modified: 2010-04-01 20:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase (zip file) (28.12 KB, application/octet-stream)
2009-12-03 03:05 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2009-12-03 01:04:33 UTC
NetBeans 6.8 RC1
GlassFish 2.1
Enterprise project with web and ejb module.


When saving and compiling a java class file, while the project is in debug mode, the class file is not deployed.

It happens often but I cannot fully reproduce this. When I can, then I will try to provide a test case.
Comment 1 bht 2009-12-03 03:05:57 UTC
Created attachment 92029 [details]
testcase (zip file)

This testcase reproduces on my computer.
It is an enterprise project with the EJB module removed.
Requires the Wicket plugin from 
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586
but it could well be that a test case can be made that does not use Wicket.

To reproduce:
- Clean and build the project.
- Debug the enterprise project.
- If it fails to run, then create directory build\lib by hand.
- When it runs in debug mode, on the index.html page, click on the link to page2
- In the source editor, modify Page2.java, the string "Hello" and save.
- Reload the page in the browser

Expected result: The page should change content
Actual result: The page does not change.

There is no message in the NetBeans status bar that would indicate deployment.
In contrast, if I change web.xml or index.html, then these changes are deployed.
Comment 2 Vince Kraemer 2009-12-03 14:20:15 UTC
I did some quick experiments on a 4GB/2.33 GHz Core 2 Duo MacBook Pro....

with an rc2 build that I pulled yesterday. GlassFish v2.1.1

Change a java file in a web app that is part of an ear: 35 seconds between pressing 'Save All' and seeing feedback that the deploy is taking place.

I did a couple trials like this.

Change a java file in a stand-alone web app:  33 seconds, save->start seeing deploy feedback

If I make these changes for apps that are deployed to v3, the response time is nearly instant (press save to visible feedback)

One other things that I noticed was the fact that there did not appear to be any activity on the machine after I pressed save...  

I did some thread dumps and found this...

"Thread-52" prio=5 tid=0x0000000153aac800 nid=0x14ec41000 runnable [0x000000014ec3f000]
   java.lang.Thread.State: RUNNABLE
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
	- locked <0x0000000106642118> (a java.io.BufferedInputStream)
	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
	- locked <0x0000000106642210> (a sun.net.www.protocol.http.HttpURLConnection)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
	at com.sun.enterprise.admin.jmx.remote.comm.ServletConnection.receive(ServletConnection.java:127)
	at com.sun.enterprise.admin.jmx.remote.comm.MBeanServerMessageConductor.invoke(MBeanServerMessageConductor.java:84)
	at com.sun.enterprise.admin.jmx.remote.internal.RemoteMBeanServerConnection.invoke(RemoteMBeanServerConnection.java:421)
	at com.sun.enterprise.deployapi.SunDeploymentManager.getDefaultHostPortUsingMBeans(SunDeploymentManager.java:665)
	at com.sun.enterprise.deployapi.SunDeploymentManager.getDefaultHostPort(SunDeploymentManager.java:644)
	at com.sun.enterprise.deployapi.SunDeploymentManager.getHostPort(SunDeploymentManager.java:579)
	at com.sun.enterprise.deployapi.SunDeploymentManager.addToTargetModuleIDs(SunDeploymentManager.java:458)
	at com.sun.enterprise.deployapi.SunDeploymentManager.getModules(SunDeploymentManager.java:384)
	at com.sun.enterprise.deployapi.SunDeploymentManager.getAvailableModules(SunDeploymentManager.java:328)
	at org.netbeans.modules.j2ee.sun.ide.dm.SunDeploymentManager.getAvailableModules(SunDeploymentManager.java:573)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getAvailableTMIDsMap(TargetServer.java:400)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.getDeploymentDirectoryModules(TargetServer.java:852)
	at org.netbeans.modules.j2ee.deployment.impl.TargetServer.notifyArtifactsUpdated(TargetServer.java:755)
	at org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager$DeployTask.notifyServer(DeployOnSaveManager.java:419)
	at org.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager$DeployTask.run(DeployOnSaveManager.java:354)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:637)
Comment 3 Vince Kraemer 2009-12-03 15:04:33 UTC
BHT: please confirm the version of GF where your app is being deployed.
Comment 4 bht 2009-12-03 16:16:20 UTC
The app is being deployed to GlassFish 2.1.
In the log, the only string containing "2.1" is:
TopLink, version: Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))
The title of the output tab is "GlassFish v2.1 *"

Often my computer is not connected to the net, so if GlassFish needs DNS or something to deploy then that might be a bad idea.

I would like to repeat that changes of other files e.g. index.html or web.xml are deployed mostly within a few seconds. I have also run other examples included in NetBeans that deploy fine.

Vince it is not quite clear to me whether you could reproduce this. You mention tests of other scenarios not this test case, but then you write "One other things that I noticed was the fact that there did not appear to be any activity on the machine after I pressed save..."

It is my feeling that this test case is very easy to reproduce, and I have never seen a deploy after saving page2.

I have not seen anywhere any recommendation to migrate to GlassFish V3. So if you think that I am using outdated software then please advise.

Many thanks
Comment 5 Vince Kraemer 2009-12-03 16:35:12 UTC
I was trying to see if the problem occurs without the debugger being involved.
Comment 6 Vince Kraemer 2010-04-01 20:45:14 UTC
I cannot reproduce the results that I had in December with NB 6.9 dev and GF 2.1.1... you may want to try it and update the issue if there is still a problem for you with that configuration.