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.
Netbeans Beta 1(Build 200709041200) Java: 1.6.0_01; WinXP Glassfish V2 b58d -Third (incremental) deployment of a j2ee1.5 project ended with a "build failed, check server log" C:\Documents and Settings\Krystyna Polomski\My Documents\NetBeansProjects\WebApplication441\nbproject\build- impl.xml:562: Deployment error: null See the server log for details. BUILD FAILED (total time: 0 seconds) -Checked the server log, I saw no errors (attaching) -Checked messages.log, saw: java.lang.NullPointerException at org.netbeans.modules.j2ee.deployment.impl.TargetModule.findTarget(TargetModule.java:106) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:339) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:109) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:446) [catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:126) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:255) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129) INFO [org.netbeans.modules.editor.settings.storage.SettingsProvider]: Won't provide any settings for text/base It's been deprecated, use MimePath.EMPTY instead.
Created attachment 48104 [details] Server log
Created attachment 48105 [details] IDE messages.log
-workaround by re-starting the appserver from glassfish node in Services tab -this is consistently reproducible on second or third incremental deployment -(Noting: both glassfish 58d and NB beta1 installed and run with jdk1.6.0_01)
corrected some of the entries
additional details about the project would be useful. attaching the projects would be really useful.
Nothing special about the project: the simplest one page VWP ee5 project with two or three components on it will produce the error. No databases involved. I will prepare and attach a simple such project. (I had originally seen this issue with a 2 page navigation project.)
Created attachment 48188 [details] VWP ee5 project
Directions: -open and deploy project just attached - first deployment will work ok -drop any Basic component (or simply move one of the existing components on designer screen) and re-deploy >Build will fail -restart glassfish and redeploy - this will work
I am able to replicate the behavior. I am also able to get the project to successfully 'undeploy and deploy' after encountering this issue WITHOUT restarting, which makes the issue less critical (to me). still investigating, but I am tempted to lower the priority on this, since the w-a is to "try again"
on line 106... either instance is null or the return value of instance.getServerTarget(targetName) is null... a null check might be useful somewhere in findTarget()...
-Note: Duplicated this on Solaris 10. beta 1 09050000 build. Took two re-deploys to recover.
I'm unable to reproduce on this configuration: Linux 2.6.20-16-generic jdk 1.5.0_11 Glassfish V2 b58d NetBeans cvs build
I'm unable to reproduce even on this configuration: Linux 2.6.20-16-generic jdk 1.6.0_00 Glassfish V2 b58d NetBeans cvs build Are there any specific steps not mentioned in desc9? I'm using "undeploy and deploy" from context menu, after making change in the jsp page.
I had figured this was a windows only type of issue... a strange case of the file locking issues. if this is happening in other contexts, that is good news... Since I have lots of Unix based builds and do not have an machine configured to do NetBeans development that is running Windows....
-I am working within a VWP project environment which you can open and use to deploy. Important, I am not undeploying. I am only doing deployment and re-deployment (what is known as incremental deployment) via toolbar Green arrow. It does not require an undeploy action. After project is initially deployed, make a change to the project, and press green arrow to deploy again.
Now I am able to reproduce (on linux) - well just in a few cases. For me there does not exist reliable scenario to reproduce. Even in the case it fails the next deployment will pass. I think we should consider lowering priority to P3 (with further investigation).
I am able to reproduce this issue with NB full 200709060000 and AS b58f-fcs on the WinXP. For me the deployment does not work in 9 of 10 cases for all types of projects (WebApp, EJB ...). Moreover it reproducible even for the empty WebApp project just created from wizard and not changed.
I prepared modified j2ee plugin with some additional logging. Andrey, please copy it to enterprise4/modules directory (replacing the original one). After that please run netbeans with additional parameter -J-Dorg.netbeans.modules.j2ee.deployment.level=0. Try to reproduce the exception and upload the file var/log/messages.log from the userdir. At least this should help us to find which variable is null.
Created attachment 48302 [details] j2eeserver module with additional logging
I downloaded and installed the latest NB 200709060000 with the bundled AS and reproduced this issue with your jar. See attached IDE log.
Created attachment 48305 [details] IDE log with replaced jar
Created attachment 48307 [details] IDE log with replaced jar
So, now I reproduced this issue on the different 2 PCs (WinXP on both) and different AS versions.
I've just add some more logging and I was lucky with reproduction (once). Here is the interesting fragment: FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Instance URL: [/home/sickboy/servers/glassfishv2b58d]deployer:Sun:AppServer::localhost:4848 FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: IDE deployed module: [/home/sickboy/servers/glassfishv2b58d]deployer:Sun:AppServer::localhost:4848 FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: IDE deployed module name: server FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Available modules ids from server 0 FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Map does not contain WebApplication454_localhost:4848_server FINER [org.netbeans.modules.j2ee.deployment.impl.TargetModule]: Finding target FINER [org.netbeans.modules.j2ee.deployment.impl.TargetModule]: Instance is GlassFish V2 FINER [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: Getting ServerTarget for server FINER [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: Called getTargetMap() by exec_null_3 at 1189109044722 FINER [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: Fresh targets fetched from server, its count is 0 FINER [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: Updating target map with new one with size 0 FINER [org.netbeans.modules.j2ee.deployment.impl.TargetModule]: Target is null INFO [global] java.lang.NullPointerException at org.netbeans.modules.j2ee.deployment.impl.TargetModule.findTarget(TargetModule.java:112) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.processLastTargetModules(TargetServer.java:367) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.init(TargetServer.java:112) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:474) [catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:126) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:82) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:255) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:438) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129) Note the lines: FINER [org.netbeans.modules.j2ee.deployment.impl.TargetServer]: Available modules ids from server 0 and FINER [org.netbeans.modules.j2ee.deployment.impl.ServerInstance]: Fresh targets fetched from server, its count is 0 Considering this it seems to be some strange situation when the appserver plugin returns empty array when requesting getAvailableModules(). Consequently it even returns empty list of targets (call to getTargets()) - and because the list of targets is empty it does not contain the intended target for deployment -> NPE. Could be some synchronization issue in appserver plugin, j2ee server or both. Vince, may be you could trace what is happening inside the appserver plugin in this situation?
it looks like this is related changes for issue 102770 I am testing changes that resolve this side-effect, but preserves the fix to 102770.
need to synchronize around access to secureStatusHasBeenChecked
http://serverplugins.netbeans.org/source/browse/serverplugins/sun/appsrv81/src/org/netbeans/modules/j2ee/sun/ide/dm/SunDeploymentManager.java?r1=1.41&r2=1.42
*** Issue 115093 has been marked as a duplicate of this issue. ***
Krystyna, andrey, please can you verify the solution?
Verified FIXED in trunk build with VWP 1.4 and 1.5 type projects. For beta1, we should note that issue is fixed in the trunk/beta2. NetBeans IDE Dev (Build 070910) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb). Glassfish - v2 (b58g)
*** Issue 115795 has been marked as a duplicate of this issue. ***
It would be great to post a binary patch for this issue. I guess beta 2 will be released after a month, so people who work on enterprise projects will be frustrated. It's really time consuming to restart server every time you need to deploy ear.
I agree with the last comment. This one bug will stop me from even starting to use NB 6.0 Beta 1. I guess I will just have to stick with the daily builds :(
Created attachment 49004 [details] patched jar for beta 1 users
*** Issue 116358 has been marked as a duplicate of this issue. ***
*** Issue 116604 has been marked as a duplicate of this issue. ***
*** Issue 116638 has been marked as a duplicate of this issue. ***