1

I trying to use WildFly 9.0.1 server to run a Java web application. I created a new project and select the wildfly server as well as hibernate. When I try running the server,

I get the following error:

WildFly Application Server Started
Distributing /Users/davey/NetBeansProjects/WebApplication1/dist/WebApplication1.war to [org.netbeans.modules.javaee.wildfly.WildflyDeploymentManager$1@5e97ba27]
java.lang.reflect.InvocationTargetException
/Users/davey/NetBeansProjects/WebApplication1/nbproject/build-impl.xml:1052: The module has not been deployed.
See the server log for details.

Line 1052 of build-impl.xml has the following:

<target depends="init,-init-cos,compile,compile-jsps,-do-compile-single-jsp,-pre-dist,-do-tmp-dist-with-manifest,-do-tmp-dist-without-manifest,-pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,-post-run-deploy,-do-update-breakpoints" name="run-deploy"/>
<target if="netbeans.home" name="-run-deploy-nb">
       [THIS IS LINE 1052]  <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
</target>

And in the info log, I see this output, not sure how it's related, but looks like netbeans throws this and asks me to report the error to netbeans.

java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
    at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:319)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
    at ...asynchronous invocation...(Unknown Source)
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:272)
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:253)
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:351)
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:339)
    at org.jboss.as.protocol.ProtocolConnectionUtils.connect(ProtocolConnectionUtils.java:83)
    at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:114)
Caused: java.net.ConnectException: WFLYPRT0053: Could not connect to remote://localhost:9999. The connection failed
    at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:122)
    at org.jboss.as.protocol.ProtocolConnectionManager$EstablishingConnection.connect(ProtocolConnectionManager.java:257)
    at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:71)
    at org.jboss.as.protocol.mgmt.FutureManagementChannel$Establishing.getChannel(FutureManagementChannel.java:212)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:146)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:65)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:147)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:122)
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:263)
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:168)
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:147)
Caused: java.io.IOException
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:149)
    at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:75)
Caused: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.netbeans.modules.javaee.wildfly.ide.commands.WildflyClient.executeOnModelNode(WildflyClient.java:261)
    at org.netbeans.modules.javaee.wildfly.ide.commands.WildflyClient.undeploy(WildflyClient.java:523)
Caused: java.io.IOException
    at org.netbeans.modules.javaee.wildfly.ide.commands.WildflyClient.undeploy(WildflyClient.java:529)
    at org.netbeans.modules.javaee.wildfly.ide.commands.WildflyClient.deploy(WildflyClient.java:541)
[catch] at org.netbeans.modules.javaee.wildfly.WildflyDeploymentManager.distribute(WildflyDeploymentManager.java:189)
    at org.netbeans.modules.j2ee.deployment.impl.TargetServer.deploy(TargetServer.java:683)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:246)
    at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166)
    at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor372.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    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:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

EDIT

When I use the GlassFish Server instead, everything works just fine

Sevan
  • 669
  • 1
  • 5
  • 18
SamAko
  • 3,485
  • 7
  • 41
  • 77
  • There are very few infirmation on the subject. I guess you are trying to remote deploy an application and it seems you are using a wrong port 9000 on jboss. – Marcinek Nov 21 '15 at 10:32
  • Hi, I'm not remote deploying, I'm just trying to run it locally after creating the app in netbeans. – SamAko Nov 21 '15 at 10:41
  • Your error indicates you're trying to use 9999. Maybe its a netbeans bug, but the wildfly management port is 9990. Try using that port # instead. – John Ament Nov 22 '15 at 15:16
  • That's weird, I haven't made any changes, I just setup wildfly and tried running a project. However, I'll see if I can find the right configuration to edit. Thanks :) – SamAko Nov 22 '15 at 23:07
  • 2
    Which version of Netbeans do you use ? If you are on 8.0.2 it is not compatible with WildFly 9, try either the unofficial plugin from the plugin portal or upgrade to NetBeans 8.1 – ehsavoie Nov 23 '15 at 08:10
  • @ehsavoie I'm on 8.0.2. I'll upgrade to 8.1 and try again. Thanks :) – SamAko Nov 23 '15 at 11:28
  • @ehsavoie Thanks a million. you saved me hours of pain. I upgraded to Netbeans 8.1 like you suggested, and everything's working fine now. thanks again :) – SamAko Nov 23 '15 at 12:09

0 Answers0