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.
steps to reproduce 1. register GF 2. create an ent app with a web app sub project that targets the GF domain registered in step 1. 3. use clean on the ent app project. 4. start the GF domain 5. Use the Ent App project's Run item. See the attached stack traces.
Created attachment 54962 [details] the stack traces...
looks like it is related to the code changes being discussed here: http://www.netbeans.org/servlets/BrowseList?list=nbdev&by=thread&from=827178
Created attachment 54999 [details] initial cut at a patch
I added the following patch to my build... and I cannot reproduce the failed deployment. There is a new warning trace, but the deployment is successful. WARNING: externally created folder: /Users/vbk/NetBeansProjects/EnterpriseApplication52/EnterpriseApplication52-war/dist at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.getFileObject(FolderObj.java:120) at org.openide.filesystems.FileObject.getFileObject(FileObject.java:667) at org.openide.filesystems.FileUtil.createFolder(FileUtil.java:423) at org.openide.filesystems.FileUtil.createData(FileUtil.java:488) at org.openide.filesystems.FileUtil.createData(FileUtil.java:220) at org.netbeans.spi.project.support.ant.PropertyUtils.resolveFileObject(PropertyUtils.java:572) at org.netbeans.spi.project.support.ant.AntProjectHelper.resolveFileObject(AntProjectHelper.java:1112) at org.netbeans.modules.web.project.ProjectWebModule.getFileObject(ProjectWebModule.java:276) at org.netbeans.modules.web.project.ProjectWebModule.getArchive(ProjectWebModule.java:270) at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule.getArchive(J2eeModule.java:169) at org.netbeans.modules.j2ee.earproject.ProjectEar$IT.<init>(ProjectEar.java:378) at org.netbeans.modules.j2ee.earproject.ProjectEar$IT.<init>(ProjectEar.java:367) at org.netbeans.modules.j2ee.earproject.ProjectEar.getArchiveContents(ProjectEar.java:195) at org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule.getArchiveContents(J2eeModule.java:180) at org.netbeans.modules.j2ee.deployment.impl.InitialServerFileDistributor.distribute(InitialServerFileDistributor.java:118) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.initialDistribute(TargetServer.java:186) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:518) at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:148) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
Does it really fail or just print warning and info exception?
Patch looks wrong. Bug is probably in j2ee.ant.Deploy which should use FileObject/System.refresh before working with Filesystems API on possibly externally modified files.
without my patch: deployment fails, warning and info stack traces. with my patch: deployment is successful, warning stack trace. Patch wrong: I agree. I was showing a what worked for me... not a final solution. Moving patch out to j2ee.ant.Deploy: That code isn't directly calling toFileObject()... it seems like you are asking all the clients of spi/project/support/ant/AntProjectHelper.java to compensate for an unguarded use of toFileObject() in spi/project/support/ant/PropertyUtils.java....
Changing code in j2ee.ant.Deploy: Do you mean I should add another/different refresh call to the execute method? There is already one in that method... before the call to toFileObject() in PropertyUtils.java... See: line 96 of http://www.netbeans.org/source/browse/j2eeserver/ant/antsrc/org/netbeans/modules/j2ee/ant/Deploy.java?annotate=1.21
Maybe you need to refresh the whole filesystem.
Please see issue #125090, it describes similar problem and Radek Matous fixed behavior of FileUtil.toFileObject() to work the same way as before the change. Please, get a new build and try the testcase again to see if it's still reproducible. Thanks.
I just did a full update and tried it... it appears that Radek's change did not resolve the issue in AntProjectHelper.resolveFileObject().
resolveFileObject() method used shortcut way to resolve FileObject in some cases, now it uses only backward compatible way. For details see also issue #125090. Checking in PropertyUtils.java; /cvs/ant/project/src/org/netbeans/spi/project/support/ant/PropertyUtils.java,v <-- PropertyUtils.java new revision: 1.41; previous revision: 1.40 done
yup