0 Replies Latest reply on Jun 11, 2014 6:04 AM by stanleythepirate

    JBOSS No such Method found

    stanleythepirate

      Below is the exception i get when i try to send message to the jboss server 6.1 EAP with message header

      I have added all the below jars

      jboss-client, jboss-ejb-client-1.0.8.Final, hornetq-jms-2.2.7.Final, hornetq-core-client-java5, jboss-remoting-3.2.11.ga, xnio-api-3.0.7.GA, hornetq-core, jms, jboss-remote-naming-1.0.5.Final, jboss-logging-3.1.0.cr2, jbossall-client

      Exception

      java.lang.NoSuchMethodError: org.jboss.logging.Logger.tracef(Ljava/lang/String;Ljava/lang/Object;)V at org.xnio.nio.NioXnio.<init>(NioXnio.java:76) at org.xnio.nio.NioXnioProvider.<clinit>(NioXnioProvider.java:34) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:373) Caused: java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated

      All of my code are correct and Below is the source code i am using to create connection

      Environment Properties env = new Properties(); Servername=hostName_ip+":"+port; env.put(Context.INITIAL_CONTEXT_FACTORY, INITIAL_CONTEXT_FACTORY); env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); env.put("java.naming.provider.url",Servername); env.put(Context.SECURITY_PRINCIPAL, System.getProperty("username", queue_User)); env.put(Context.SECURITY_CREDENTIALS, System.getProperty("password", queue_Passwd));

      Initial context InitialContext ctx = new InitialContext(env);The exception line refers to this statement InitialContext

      Creating connection factory

      String connectionFactoryString = System.getProperty("connection.factory", DEFAULT_CONNECTION_FACTORY);
      fty = (ConnectionFactory) ctx.lookup(DEFAULT_CONNECTION_FACTORY);

      Creating connection connection = fty.createConnection(System.getProperty("username", queue_User), System.getProperty("password", queue_Passwd));

      Creating session session = connection.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);