Hello! I encountered an issue when trying to use the jbos-as-maven-plugin to deploy on a remote JBoss AS server. I use something akin to :
<plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>7.4.Final</version> <configuration> <hostname>10.1.2.3</hostname> <port>9999</port> <username>admin</username> <password>xxx</password> <filename>${project.build.finalName}.ear</filename> <name>backend</name> <skip>false</skip> </configuration> </plugin> And I get the following error : Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal deploy-artifact on null. Reason: I/O Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }' at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:155) at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:111) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 23 more Caused by: java.lang.IllegalStateException: I/O Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }' at org.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:241) at org.jboss.as.plugin.common.AbstractServerConnection.getClient(AbstractServerConnection.java:156) at org.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:133) at org.jboss.as.plugin.deployment.AbstractDeployment.validate(AbstractDeployment.java:167) at org.jboss.as.plugin.deployment.DeployArtifact.validate(DeployArtifact.java:75) at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:133) ... 26 more Caused by: java.io.IOException: java.lang.IllegalArgumentException: destination address may not be null at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129) at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71) at org.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:234) ... 31 more Caused by: java.lang.IllegalArgumentException: destination address may not be null at org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:139) at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:296) at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251) at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349) at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:337) at org.jboss.as.protocol.ProtocolChannelClient.connect(ProtocolChannelClient.java:114) at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:124) at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing.getChannel(ManagementClientChannelStrategy.java:166) at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:146) at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67) at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:111) at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:94) at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236) at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141) at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127) ... 33 more The error is caused by the fact that the IP address I provide in the <hostname> configuration entry does not have a reverse DNS name associated with it. A quick workaround is to add a name for it in my local hosts file and everything works fine. Also, when using the jboss-cli everything works fine. I tracked the hostname parameter in the code and I think that the issue is in the following line of org.jboss.as.controller.client.impl.ClientConfigurationImpl: return new ClientConfigurationImpl(address.getHostName(), port, handler, null, null, createDefaultExecutor(), true); The plugin gets an InetAddress which works fine, but when entering this line we try to get the hostname (which does not exist) and we get nothing back. This is then used later to construct the URI: configuration.setUri(new URI("remote://" + formatPossibleIpv6Address(client.getHost()) + ":" + client.getPort())); And finally we get the exception shown above. I'm not familiar enough with the code to try an provide a patch but I wanted at least to communicate the issue. Hope this helps, Dominique _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user