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.
How to reproduce: 1) create new web project 2) deploy web app to Sun App Server 8 3) deploy same web app to Tomcat server 4) deployment fails with error: Annotation: Exception occurred in Request Processor java.lang.NullPointerException at org.netbeans.modules.j2ee.deployment.impl.TargetServer.saveRootTargetModules(TargetServer.java:500) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.handleCompletedDistribute(TargetServer.java:627) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.access$000(TargetServer.java:54) at org.netbeans.modules.j2ee.deployment.impl.TargetServer$DistributeEventHandler.handleProgressEvent(TargetServer.java:412) at org.netbeans.modules.tomcat5.progress.ProgressEventSupport.fireHandleProgressEvent(ProgressEventSupport.java:101) at org.netbeans.modules.tomcat5.TomcatManagerImpl.run(TomcatManagerImpl.java:487) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
We could add defensive check for null in TargetServer.handleCompletedDistribute() on returned value of po.getResultTargetModuleIDs(). But, we need to find out why (Tomcat?) plugin unexpectedly returns null for the call.
In case when I deploy any application to App server, then every attempt to deploy to Tomcat fails with this error. After restarting IDE the deployment to Tomcat works. In inverse case, i.e. firts deployment to Tomcat, then App Server I get this error: java.lang.IllegalStateException: org.netbeans.modules.tomcat5.WebappConfiguration at com.sun.enterprise.tools.studio.j2ee.incrdeploy.DirectoryDeployment.initialDeploy(DirectoryDeployment.java:380) at com.sun.enterprise.tools.studio.j2ee.incrdeploy.DirectoryDeploymentFacade.initialDeploy(DirectoryDeploymentFacade.java:82) at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:544) at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:95) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:56) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:301) at org.apache.tools.ant.Target.performTasks(Target.java:328) at org.apache.tools.ant.Project.executeTarget(Project.java:1215) at org.apache.tools.ant.Project.executeTargets(Project.java:1063) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:208) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:232) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125) Caused by: java.lang.ClassCastException: org.netbeans.modules.tomcat5.WebappConfiguration atcom.sun.enterprise.tools.studio.j2ee.incrdeploy.DirectoryDeployment.initialDeploy(DirectoryDeployment.java:337)
This inverse case stack show that switching (default?) target server does not change the return of: dtarget.getDeploymentConfigurationProvider().getDeploymentConfiguration(); It still returns the previous target server DC.
This bug makes it impossible closely testing App server's plugin. I increase priority.
Thanks for analyzes, Nam. I will take a look at this.
I am trying to reproduce this but I am getting errors from appserver plugin. I get the same error when I deploy a new project created with appserver being the default server as in case that I first deploy to tomcat and then change the target server to AS. It is very short so I will paste it in here: java.lang.NoSuchMethodError: com.sun.enterprise.tools.studio.j2ee.incrdeploy.DirDeployAction.initializeTargetModuleIDs(Ljava/lang/String;Lcom/sun/enterprise/deployment/Application;Ljavax/management/MBeanServerConnection;)V at com.sun.enterprise.tools.studio.j2ee.incrdeploy.DirDeployAction.run(DirDeployAction.java:163) at java.lang.Thread.run(Thread.java:534) C:\Documents and Settings\pb97924\WebApplication11\nbproject\build-impl.xml:233: org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment$DeploymentException: Deployment Error BUILD FAILED (total time: 1 second) please confirm this or let me know what you are seeing. Tx.
The error noted above was apparently caused by inconsistent version of plugin and s1as (b50). With b57 and newest plugin it works. The problem was in likely in configuration area and was fixed with other issues.
Verified