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 253630 - (yet) unneccessary deployments while deploy on save is off
Summary: (yet) unneccessary deployments while deploy on save is off
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 8.0.2
Hardware: PC Windows 8 x64
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
: 244057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-21 20:52 UTC by ymajoros
Modified: 2015-08-20 10:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ear's nb-config (1.36 KB, text/xml)
2015-07-21 20:52 UTC, ymajoros
Details
ear's pom.xml (3.31 KB, text/xml)
2015-07-21 20:52 UTC, ymajoros
Details
war's nb-config (2.48 KB, text/xml)
2015-07-21 20:52 UTC, ymajoros
Details
war's pom.xml (4.45 KB, text/xml)
2015-07-21 20:53 UTC, ymajoros
Details
ide log with flags (174.37 KB, application/octet-stream)
2015-08-19 05:48 UTC, ymajoros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ymajoros 2015-07-21 20:52:05 UTC
Created attachment 154776 [details]
ear's nb-config

I have an EAR project (maven), itself packaging an EJB jar and 2 wars (JSF / JAX-RS).

CoS is enabled on each project, DoS is disabled.

Sometimes, Netbeans starts trying to deploy stuff (EAR or WAR) when I save some file.

Some lines that could be relevant in my IDE log:

WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [org.openide.filesystems.Ordering]: Not all children in Projects/Actions/ marked with the position attribute: [net.sf.efhnbm.ExploreFromHere.instance], but some are: [org-netbeans-modules-projectimport-eclipse-core-UpdateProjectAction.shadow, org-netbeans-modules-versioning-core-ProjectMenuItem.instance, org-netbeans-modules-vagrant-ui-actions-VagrantAction.shadow]
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [glassfish-eecommon]: Deployment plan not supported in GlassfishConfiguration.save()
WARNING [org.glassfish.tools.ide]: Error processing component "Gestemps-ear  <ear, webservices, web, ejb>  "

I'll attach a couple of files that could be relevant too.
Comment 1 ymajoros 2015-07-21 20:52:31 UTC
Created attachment 154777 [details]
ear's pom.xml
Comment 2 ymajoros 2015-07-21 20:52:55 UTC
Created attachment 154778 [details]
war's nb-config
Comment 3 ymajoros 2015-07-21 20:53:10 UTC
Created attachment 154779 [details]
war's pom.xml
Comment 4 ymajoros 2015-07-21 20:55:28 UTC
FYI, this happens seemingly randomly. When it does happen, saving some file triggers redeployment. Restarting Netbeans fixes it for some time.
Comment 5 Petr Hejl 2015-07-30 08:40:00 UTC
That's strange. Is it at least semi-reproducible?
Comment 6 ymajoros 2015-07-30 09:33:18 UTC
Yes: when it does happen, it will stay for some time and each time I save a file, some redeployment occurs (WAR or EAR, it depends).

After seeing some other bugzilla issues regarding unnecessary redeployments, and sometimes their stack traces, I'm wondering if it just redeploys if some error occurs. Exception-swallowing catch clause? Guess there is some other root cause which triggers this.

Could someone have a look at the code that's involved in deciding if a redeployment is needed after save? Is there something like that there?
Comment 7 Petr Hejl 2015-08-06 10:14:14 UTC
Can you also share the IDE log?
http://wiki.netbeans.org/FaqLogMessagesFile
Comment 8 Petr Hejl 2015-08-06 12:08:51 UTC
Is deploy on save disabled for EAR only or is it disabled for submodules as well?
Comment 9 Petr Hejl 2015-08-06 12:43:46 UTC
Can't reproduce this. Could it be caused by separate war/ejb deployment you may have performed?
Comment 10 Petr Hejl 2015-08-06 12:46:51 UTC
Try also running the IDE with this additional parameter:
-J-Dorg.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager.level=0
So we may have more accurate information.
Comment 11 Petr Hejl 2015-08-06 12:49:34 UTC
*** Bug 244057 has been marked as a duplicate of this bug. ***
Comment 12 ymajoros 2015-08-06 13:12:07 UTC
Thanks for finding the duplicate. I was quite sure it did exist, but couldn't find it.

I'll try with -J-Dorg.netbeans.modules.maven.j2ee.level=0 

I don't think there is anything unusual. Maybe edited nb-config files long ago, but I don't think they are unusual right now (see attachments).

You'll find some IDE log of when it happens in my first post. I'll attach more complete ones once I'm back coding, normally in a few days.

Didn't ever deploy WAR/EJB separately, but Netbeans does try sometimes after I save some file.

Deploy on save is deployed in ear / war /ejb. It should be visible in attached nb-config, I guess.
Comment 13 Petr Hejl 2015-08-06 13:54:27 UTC
Pleas also add a second parameter:
-J-Dorg.netbeans.modules.j2ee.deployment.impl.DeployOnSaveManager.level=0
not just only 
-J-Dorg.netbeans.modules.maven.j2ee.level=0 

Thanks.
Comment 14 Petr Hejl 2015-08-17 13:04:10 UTC
Did this happen again recently? Any more details (IDE logs) would help. Thanks.
Comment 15 ymajoros 2015-08-19 05:48:47 UTC
Created attachment 155444 [details]
ide log with flags
Comment 16 ymajoros 2015-08-19 05:49:42 UTC
Happening again. I attached the logs, with given NB flags.

Additional hint: when stopped on breakpoint, unnecessary deployments seem to fail immediately.
Comment 17 Petr Hejl 2015-08-19 09:06:11 UTC
(In reply to ymajoros from comment #16)
> Happening again. I attached the logs, with given NB flags.
> 
> Additional hint: when stopped on breakpoint, unnecessary deployments seem to
> fail immediately.

Do you remember some basic steps you did? Such as Run, Run, change web.xml, Debug...

I'm investigating the log and the code.
Comment 18 Petr Hejl 2015-08-19 09:15:14 UTC
(In reply to ymajoros from comment #16)
> Happening again. I attached the logs, with given NB flags.
> 
> Additional hint: when stopped on breakpoint, unnecessary deployments seem to
> fail immediately.

Is it actually deploying anything? Or you just assume that based on the status bar? Does it show "Deploying" or "Updating". I don't see any successfull DoS event in the fresh IDE log.
Comment 19 Petr Hejl 2015-08-19 11:10:18 UTC
Ok I found at least one possible case when this could happen and fixed it. It would be great if you could test the dev build once integration message appears here.

web-main f9a8e2c68bb5.

The reproducible case was:
1) Run app with DoS off (DoS state MODULE_NOT_DEPLOYED)
2) Debug it
3) App stopped at breakpoint
4) Change source (DoS state SERVER_STATE_UNSUPPORTED)
5) Continue with the app (release breakpoint, detach JPDA)
6) Change source (DoS state MODULE_UPDATED)

The IDE is now in the state where it do DoS. Now with the fix the DoS in step 6) is still MODULE_NOT_DEPLOYED.
Comment 20 ymajoros 2015-08-19 14:54:23 UTC
Great work :-)

This had been hiding for years. Indeed, your explanation seems to make sense, and the trigger could be exactly what I'm doing. I'll check the latest build as soon as it's available.

Thanks!
Comment 21 ymajoros 2015-08-19 14:57:07 UTC
Should I add that I almost always run in debug mode? ;-)
Comment 22 Quality Engineering 2015-08-20 01:26:16 UTC
Integrated into 'main-silver', will be available in build *201508200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f9a8e2c68bb5
User: Petr Hejl <phejl@netbeans.org>
Log: #253630 - (yet) unneccessary deployments while deploy on save is off
Comment 23 ymajoros 2015-08-20 06:50:57 UTC
New build is downloading.

I can already confirm that I can reproduce the problem at will too with the steps you gave.

Anyway, I'm wondering: why do we ever arrive at "4) Change source (DoS state SERVER_STATE_UNSUPPORTED)"? Shouldn't there be a new state to support debugging?
Comment 24 Petr Hejl 2015-08-20 08:10:19 UTC
(In reply to ymajoros from comment #23)
> New build is downloading.
> 
> I can already confirm that I can reproduce the problem at will too with the
> steps you gave.
> 
> Anyway, I'm wondering: why do we ever arrive at "4) Change source (DoS state
> SERVER_STATE_UNSUPPORTED)"? Shouldn't there be a new state to support
> debugging?

Well it is just an internal state not perfectly accurate. Debugging is supported in general. Same for MODULE_NOT_DEPLOYED which does not necessarily mean the module is not deployed, just for example not being DoS enabled etc.
Comment 25 ymajoros 2015-08-20 10:11:23 UTC
Just checked the new version, and it's solved! Thanks :-)