“XNIO001001: No XNIO provider found” error when deploying to Wildfly using Cargo Java API

1,017 views
Skip to first unread message

pa...@pholding.co.uk

unread,
Jun 12, 2015, 8:59:40 AM6/12/15
to codehau...@googlegroups.com
Hi
 

I am working on a Jenkins plugin which manages the deployment of EAR files to Java EE containers using the Codehaus Cargo Java API, however I've hit an issue when using the API to deploy to a remote Wildfly container. The code works fine when deploying to other containers such as Glassfish, but when attempting to deploy the EAR file to a Wildfly container the error message "XNIO001001: No XNIO provider" found is returned.

 

This issue occurs when trying to deploy to Wildfly 8.1 and 8.2 running on Windows and Ubuntu. I've also checked the Wildfly server log but it doesn't contain anything related to this issue.

 

What can do I to prevent the "XNIO001001: No XNIO provider found" error when deploying to a Wildfly container?

 

The code I've written to deploy the EAR file is as follows:

public void redeploy(String containerId, String deployFile, String hostname, String username, String password) {

  DeployableFactory deployableFactory = new DefaultDeployableFactory();
  Deployable deployable = deployableFactory.createDeployable(containerId, deployFile, DeployableType.EAR);

  ConfigurationFactory configurationFactory = new DefaultConfigurationFactory();
  Configuration configuration = configurationFactory.createConfiguration(containerId, ContainerType.REMOTE, ConfigurationType.RUNTIME);
  configuration.setProperty("cargo.hostname",hostname);
  configuration.setProperty("cargo.remote.username", username);
  configuration.setProperty("cargo.remote.password", password);

  ContainerFactory containerFactory=new DefaultContainerFactory();
  Container container = containerFactory.createContainer(containerId, ContainerType.REMOTE, configuration);

  DeployerFactory deployerFactory = new DefaultDeployerFactory();
  Deployer deployer = deployerFactory.createDeployer(container);

  deployer.redeploy(deployable);
}

When containerId is set to "wildfly8x" the error message "XNIO001001: No XNIO provider found" is returned along with the following stacktrace:

org.codehaus.cargo.util.CargoException: Cannot deploy deployable org.codehaus.cargo.container.deployable.EAR[hello-world-ear-0.0.1-SNAPSHOT.ear]
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:216)
    at org.codehaus.cargo.container.spi.deployer.AbstractDeployer.redeploy(AbstractDeployer.java:245)
    at org.jenkinsci.plugins.cargo.CargoDeployer.redeploy(CargoDeployer.java:56)
    at org.jenkinsci.plugins.cargo.DeployerRedeploy.perform(DeployerRedeploy.java:97)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1769)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Caused by: java.lang.IllegalArgumentException: XNIO001001: No XNIO provider found
    at org.xnio.Xnio.doGetInstance(Xnio.java:238)
    at org.xnio.Xnio.getInstance(Xnio.java:193)
    at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:112)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:124)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
    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.executeAsync(AbstractModelControllerClient.java:101)
    at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:50)
    at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)
    at org.codehaus.cargo.tools.jboss.JBossDeployer.executeAction(JBossDeployer.java:144)
    at org.codehaus.cargo.tools.jboss.JBossDeployer.deploy(JBossDeployer.java:84)
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:212)
    ... 12 more
java.lang.IllegalArgumentException: XNIO001001: No XNIO provider found
    at org.xnio.Xnio.doGetInstance(Xnio.java:238)
    at org.xnio.Xnio.getInstance(Xnio.java:193)
    at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:112)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient.getOrCreateChannel(RemotingModelControllerClient.java:124)
    at org.jboss.as.controller.client.impl.RemotingModelControllerClient$1.getChannel(RemotingModelControllerClient.java:67)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)
    at org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)
    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.executeAsync(AbstractModelControllerClient.java:101)
    at org.jboss.as.controller.client.helpers.standalone.impl.ModelControllerClientServerDeploymentManager.executeOperation(ModelControllerClientServerDeploymentManager.java:50)
    at org.jboss.as.controller.client.helpers.standalone.impl.AbstractServerDeploymentManager.execute(AbstractServerDeploymentManager.java:79)
    at org.codehaus.cargo.tools.jboss.JBossDeployer.executeAction(JBossDeployer.java:144)
    at org.codehaus.cargo.tools.jboss.JBossDeployer.deploy(JBossDeployer.java:84)
    at org.codehaus.cargo.container.jboss.JBoss5xRemoteDeployer.deploy(JBoss5xRemoteDeployer.java:212)
    at org.codehaus.cargo.container.spi.deployer.AbstractDeployer.redeploy(AbstractDeployer.java:245)
    at org.jenkinsci.plugins.cargo.CargoDeployer.redeploy(CargoDeployer.java:56)
    at org.jenkinsci.plugins.cargo.DeployerRedeploy.perform(DeployerRedeploy.java:97)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.model.Build$BuildExecution.post2(Build.java:185)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1769)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
 

In the pom.xml file for my plugin I've included the following dependencies

<dependency>
  <groupId>org.codehaus.cargo</groupId>
  <artifactId>cargo-core-container-wildfly</artifactId>
  <version>1.4.14</version>
</dependency>
<dependency>
  <groupId>org.codehaus.cargo</groupId>
  <artifactId>cargo-core-container-jboss</artifactId>
  <version>1.4.14</version>
</dependency>
<dependency>
  <groupId>org.wildfly</groupId>
  <artifactId>wildfly-controller-client</artifactId>
  <version>8.2.0.Final</version>
</dependency>

S. Ali Tokmen

unread,
Jun 12, 2015, 11:56:00 AM6/12/15
to codehau...@googlegroups.com
Hi Paul

As per http://stackoverflow.com/questions/13295837/accessing-ejb-deployed-in-jboss-7-0-1-from-another-client you need to add xnio-nio-3.0.3.GA.jar to your classpath.

Did you try that?

Thank you

S. Ali Tokmen
http://ali.tokmen.com/
http://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/1e49438b-297a-4068-b56f-c772e452f10d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Paul Holding

unread,
Jun 12, 2015, 2:50:09 PM6/12/15
to codehau...@googlegroups.com
Hi

I've already got xnio-api-3.3.0.Final.jar and xnio-nio-3.3.0.Final.jar in my classpath but I have tried using xnio-nio-3.0.3.GA.jar as you suggested however the same problem still occurs.

Kind Regards

Paul

--
You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/jjRpyFvMI8A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/557B0109.3080008%40alishomepage.com.

S. Ali Tokmen

unread,
Jun 16, 2015, 1:39:35 PM6/16/15
to codehau...@googlegroups.com
Hi Paul

In our integration tests, we actually simply take all JARs in the modules directory - See code on https://github.com/codehaus-cargo/cargo/blob/master/core/samples/java/src/test/java/org/codehaus/cargo/sample/java/RemoteDeploymentTest.java

Perhaps you can start with this, and then remove JARs one by one to see what happens and find out the minimal set required.
Reply all
Reply to author
Forward
0 new messages