0 Replies Latest reply on Jul 17, 2013 6:34 AM by superalex

    How to connect remotely to two different version of jboss?

    superalex

      hi,

      i have this annoying problem: my java application client (developed many years ago) is based on jboss 4.2 and java 1.5...i had to add new remote functionalities (which required java 1.6 or newer),  so i set up a new jboss (7.1.1) and deployed some modules..at this point I had to add to client app the jboss-client.jar in order to lookup the remote beans. so java client app has two library  in build path, jboss-client.jar (jboss 7) and jboss-client3.jar (jboss 4)..the problem is that sometimes I cannot lookup the jboss 7 beans, and the error is like it cannot see the jboss-client jar..in particular, if i launch the app from eclipse,all goes right...if i export a runnable jar and execute it, i have errors..i think that the two library make some kind of conflict but i don't know how to to find a way to separate them,or specify the correct jar to use..note that the problem appeared at the beginning of development,after that disappeared (after removing and adding the jboss 4 client jar from/to build path) but now it returned and i can't resolve it

       

      stack trace (i read on this forum that it'is caused by such kind of problem)

       

      javax.naming.NamingException: Failed to create remoting connection [Root exception is java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be ins
      tantiated: java.lang.NoSuchMethodError: org.jboss.logging.Logger.tracef(Ljava/lang/String;Ljava/lang/Object;)V]
              at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
              at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:121)
              at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
              at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
              at javax.naming.InitialContext.init(Unknown Source)
              at javax.naming.InitialContext.<init>(Unknown Source)
              at com.lisspa.serverAccess.utilty.Utility.getInitialContextNuovoJboss(Utility.java:97)
              at hac.telegestione.StatiReceive.topicSubscribe(StatiReceive.java:146)
              at hac.telegestione.StatiReceive.start(StatiReceive.java:160)
              at hac.telegestione.GestoreTelegestione.iniziaTelegestione(GestoreTelegestione.java:26)
              at hac.Index$3.actionPerformed(Index.java:1665)
              at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
              at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
              at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
              at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
              at javax.swing.AbstractButton.doClick(Unknown Source)
              at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
              at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
              at java.awt.Component.processMouseEvent(Unknown Source)
              at javax.swing.JComponent.processMouseEvent(Unknown Source)
              at java.awt.Component.processEvent(Unknown Source)
              at java.awt.Container.processEvent(Unknown Source)
              at java.awt.Component.dispatchEventImpl(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Window.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
              at java.awt.EventQueue.access$200(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)
      Caused by: java.util.ServiceConfigurationError: org.xnio.XnioProvider: Provider org.xnio.nio.NioXnioProvider could not be instantiated: java.lang.NoSuchMethodError: org.jboss.logging.Logger.tracef(Lja
      va/lang/String;Ljava/lang/Object;)V
              at java.util.ServiceLoader.fail(Unknown Source)
              at java.util.ServiceLoader.access$100(Unknown Source)
              at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
              at java.util.ServiceLoader$1.next(Unknown Source)
              at org.xnio.Xnio.doGetInstance(Xnio.java:187)
              at org.xnio.Xnio.getInstance(Xnio.java:146)
              at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73)
              at org.jboss.naming.remote.client.EndpointCache.get(EndpointCache.java:44)
              at org.jboss.naming.remote.client.InitialContextFactory.createEndpoint(InitialContextFactory.java:193)
              at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateEndpoint(InitialContextFactory.java:174)
              at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:138)
              at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:104)
              ... 47 more
      Caused by: 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(Unknown Source)
              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
              at java.lang.reflect.Constructor.newInstance(Unknown Source)
              at java.lang.Class.newInstance(Unknown Source)
              ... 57 more
      
      

      any hints??

       

       

      thanks in advance