ModelControllerClient errors in Faban service. Provider org.xnio.nio.NioXnioProvider could not be instantiated: java.lang.NoSuchFieldError: TRACE
willreichert Oct 19, 2012 9:03 AMI am trying to setup a Faban Service that will start and stop Jboss AS7 Standalone as well as perform some administration using the ModelControllerClient. The code works when launched within Eclipse with the following Jar dependencies
./services/JbossAs7Service/lib/jboss-marshalling-1.3.14.GA-redhat-1.jar ./services/JbossAs7Service/lib/jboss-threads-2.0.0.GA-redhat-1.jar ./services/JbossAs7Service/lib/commons-cli-1.2-redhat-1.jar ./services/JbossAs7Service/lib/jboss-sasl-1.0.1.Final-redhat-1.jar ./services/JbossAs7Service/lib/jboss-remoting-3.2.8.GA-redhat-1.jar ./services/JbossAs7Service/lib/jboss-as-controller-client-7.1.2.Final-redhat-1.jar ./services/JbossAs7Service/lib/xnio-api-3.0.4.GA-redhat-1.jar ./services/JbossAs7Service/lib/jboss-as-protocol-7.1.2.Final-redhat-1.jar ./services/JbossAs7Service/lib/jboss-dmr-1.1.1.Final-redhat-1.jar ./services/JbossAs7Service/lib/jboss-logging-3.1.1.GA-redhat-1.jar ./services/JbossAs7Service/lib/JbossAs7Service.jar ./services/JbossAs7Service/lib/xnio-nio-3.0.4.GA-redhat-1.jar
However when the jars are bundled with the Service code and deployed to Faban the harness is unable to execute the ModelControllerClient because of the following exception:
java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated: java.lang.NoSuchFieldError: TRACE java.util.ServiceLoader fail 224 java.util.ServiceLoader access$100 181 java.util.ServiceLoader$LazyIterator next 370 java.util.ServiceLoader$1 next 438 org.xnio.Xnio doGetInstance 187 org.xnio.Xnio getInstance 146 org.jboss.remoting3.Remoting createEndpoint 73 org.jboss.as.controller.client.impl.RemotingModelControllerClient getOrCreateChannel 124 org.jboss.as.controller.client.impl.RemotingModelControllerClient$1 getChannel 67 org.jboss.as.protocol.mgmt.ManagementChannelHandler executeRequest 115 org.jboss.as.protocol.mgmt.ManagementChannelHandler executeRequest 98 org.jboss.as.controller.client.impl.AbstractModelControllerClient executeRequest 236 org.jboss.as.controller.client.impl.AbstractModelControllerClient execute 141 org.jboss.as.controller.client.impl.AbstractModelControllerClient executeForResult 127 org.jboss.as.controller.client.impl.AbstractModelControllerClient execute 71 org.service.JbossAs7Service getClient 245
The code for JbossAs7Service.getClient is the following:
private ModelControllerClient getClient(String host,int port,String username,String password,String securityRealm) throws UnknownHostException{ ModelControllerClient rtrn = null; InetAddress serverHost = InetAddress.getByName(host); ModelControllerClient unauthenticatedClient = ModelControllerClient.Factory .create(serverHost, port); try{ ModelNode testConnection = new ModelNode(); testConnection.get("operation").set("read-resource"); unauthenticatedClient.execute(testConnection); //this is line 245 <~~~~~~~~~~~~~~~~~~ rtrn = unauthenticatedClient; }catch(Exception e){ logger.log(Level.SEVERE, "Exception trying unauthenticated",e); rtrn = createClient(serverHost,port,username,password,securityRealm); } return rtrn; }
Any help in determining why the Provider cannot be instantiated or which class defines TRACE (or should define TRACE but apparently does not) would be greatly appriciated.