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.
I'm trying to deploy a message-driven bean on a remote GlassFish 3.1 server. This is the example described in http://download.oracle.com/javaee/6/tutorial/doc/bnchx.html and available from http://javaeetutorial.java.net. I'm running NetBeans and GF on Windows and trying to deploy both to Windows and to a Solaris system. I have gotten this to work on the command line. On the Solaris system, I have run "asadmin enable-secure-domain" to allow deployment from other systems. It doesn't work in NetBeans using the most recent nightly build (12/15). I have attached to the latest nightly build of GF, b34. In NetBeans, my local GF server is GlassFish Server 3.1, my remote one is GlassFish Server 3.1 (2). In NetBeans, I set the Run properties to use the remote server. If the GF server is already started on the remote system, then when I try to deploy to it, I get the following output: init: deps-jar: compile: library-inclusion-in-archive: dist-directory-deploy: pre-run-deploy: Starting GlassFish Server 3.1 (2) GlassFish Server 3.1 (2) Server cannot start. Port is occupied. In-place deployment at C:\tut-ws\javaeetutorial~svn\trunk\examples\jms\sendremote\replybean\build\jar Initializing... deploy?DEFAULT=C:\tut-ws\javaeetutorial~svn\trunk\examples\jms\sendremote\replybean\build\jar&name=replybean&force=true failed. Instance is not GlassFish Server 3.1 (2). C:\tut-ws\javaeetutorial~svn\trunk\examples\jms\sendremote\replybean\nbproject\build-impl.xml:590: The module has not been deployed. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:187) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor70.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:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154) BUILD FAILED (total time: 2 seconds) The server log from the remote system appears in a GlassFish Server 3.1 (2) tab, but there is no new content in it. If I stop the server on the remote system and then try to deploy, I get the same error that the server can't start because the port is occupied; but the server log in the GlassFish Server 3.1 (2) tab now is just a bunch of little squares. If I right-click the server name in the Services tab and select Start, nothing happens; no GlassFish Server 3.1 (2) tab appears at all. I think perhaps some of this functionality didn't work in GF till recently, so perhaps you are still trying to integrate it?
which JDK update are you using for NB on your Windows system? which JDK update are you using for GF on your Solaris system? I am cannot get a deploy to work from Mac onto Solaris. It appears to be due to http://java.net/jira/browse/GRIZZLY-915 My jdk on Solaris was update 13. My jdk on mac was update 22. I upgraded the solaris side to use JDK 6 update 23. After that, remote deployment appeared to work correctly.
I am using jdk1.6.0_22 on both the Windows and the Solaris systems. This is needed to make it work with Ant.
At which point did you run into trouble... Please reference the step from http://download.oracle.com/javaee/6/tutorial/doc/bnchx.html... I am very confused, because the output that you get tells me that the deploy is happening locally... Inplace deployment only happens on a LOCAL instance.... Could you attach the file <nbuserdir>/config/J2EE/InstalledServers/.nbattrs?
Created attachment 104415 [details] C:\Documents and Settings\chaase\.netbeans\dev\config\J2EE\InstalledServers\.nbattrs file
My bad, partly. I failed to follow my own instructions: I registered a local domain for the remote server, instead of a remote one as described in step 2f/g in "To Use Two Application Servers for the sendremote Example." But once I did that, I got a different error when I got to step 4j in "To Build, Package, Deploy, and Run the sendremote Modules Using NetBeans IDE": init: deps-jar: compile: library-inclusion-in-archive: dist-directory-deploy: pre-run-deploy: C:\tut-ws\javaeetutorial~svn\trunk\examples\jms\sendremote\replybean\nbproject\build-impl.xml:590: Deployment error: Starting of server GlassFish Server 3.1 (2) is not supported. Please, start the server manually. See the server log for details. at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:200) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor72.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:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397) at org.apache.tools.ant.Project.executeTarget(Project.java:1366) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1249) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:154) BUILD FAILED (total time: 0 seconds) I could not start the server manually from NetBeans; when I right-clicked, the Start menu selection was grayed out. And when I started the server on the Solaris system, then tried to deploy to it again, I got the same error. So I removed the server from NetBeans, stopped it on the Solaris system, then started it again on the Solaris system and tried to add it. This time I got an Unexpected Exception dialog: An org.openide.util.RequestProcessor$SlowItem exception has occurred. ... In my experience it does not work to try to report this using the Review and Report Problem button, so I didn't do that. Also, slowness is not the problem. The server appears to have been added. I cannot expand the node, however, and the Stop menu choice -- everything but Refresh, Remove, View Admin Console, and Properties, in fact -- is grayed out. (The node is always unexpandable, in my experience.) When I right-click and select Deploy, I get a dialog titled "Debug Port for GlassFish Server 3.1 (2)" that asks me to select a port. I go with the default (9009) and click OK. Then I get that same error again telling me to start the server manually. I have attached the C:\Documents and Settings\chaase\.netbeans\dev\config\J2EE\InstalledServers.nbattrs file.
With help from Vince, I figured out that I had forgotten to run asadmin enable-secure-admin when I restarted the server. This property does not seem to persist if you stop and restart the server, though this needs to be checked (I don't *think* I reinstalled the server but it's possible). The example now works in NetBeans as well as with Ant. Thanks for your help, Vince. I've resolved this as invalid (user error).