1 Reply Latest reply on Nov 18, 2004 8:37 AM by ckmod

    HAJMS: SpyJMSException after fail-over of master node

    ckmod

      Hi,

      we are using a cluster of 2 jboss 3.2.6 server running hajms. Everything works fine until the master node is shutdown. The other server is taking over and starts the jms server correctly.
      But when I try to put a message in the queue I get the following error. Here is the code I use to put the message in the queue:
      QueueConnection con = null;
      QueueSession session = null;
      try
      {
      // Connection-Factory zur Queue aus JNDI-Tree holen
      con = this.queueConnectionFactory.createQueueConnection("guest", "guest");
      session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
      Queue queue = (Queue) ctx.lookup(this.queueName);
      QueueSender sender = session.createSender(queue);

      ObjectMessage message = session.createObjectMessage();
      message.setObject(obj);
      con.start();
      sender.send(message);
      session.commit();

      Help is greatly appreciated since we cannot deploy the cluster to our production environment because of this problem.

      Claus Kolb


      2004-11-18 14:26:55,140 ERROR [de.fs24.services.eai.j2ee.jms.JmsQueueHelper] JMS Queue-Fehler beim Einstellen des Objektes de.fs24.phv.eai.PHVEaiSessionBean$PhvProcessingMessage@ddc2c2

      org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.net.ConnectException: Connection refused: connect)

      at org.jboss.mq.Connection.authenticate(Connection.java:1168)

      at org.jboss.mq.Connection.(Connection.java:255)

      at org.jboss.mq.SpyConnection.(SpyConnection.java:55)

      at org.jboss.mq.SpyConnectionFactory.createConnection(SpyConnectionFactory.java:108)

      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:129)

      at de.fs24.services.eai.j2ee.jms.JmsQueueHelper.putObjectMessageInQueue(JmsQueueHelper.java:132)

      at de.fs24.phv.eai.PHVEaiSessionBean.generateAngebotMessage(PHVEaiSessionBean.java:265)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)

      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)

      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)

      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)

      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:111)

      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)

      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)

      at org.jboss.ejb.Container.invoke(Container.java:709)

      at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)

      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:324)

      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)

      at sun.rmi.transport.Transport$1.run(Transport.java:148)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)

      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

      at java.lang.Thread.run(Thread.java:534)

      Caused by: java.net.ConnectException: Connection refused: connect

      at java.net.PlainSocketImpl.socketConnect(Native Method)

      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)

      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)

      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)

      at java.net.Socket.connect(Socket.java:452)

      at java.net.Socket.connect(Socket.java:402)

      at java.net.Socket.(Socket.java:309)

      at java.net.Socket.(Socket.java:124)

      at javax.net.DefaultSocketFactory.createSocket(DashoA12275)

      at org.jboss.mq.il.uil2.UILServerIL.createConnection(UILServerIL.java:642)

      at org.jboss.mq.il.uil2.UILServerIL.getSocketMgr(UILServerIL.java:532)

      at org.jboss.mq.il.uil2.UILServerIL.authenticate(UILServerIL.java:334)

      at org.jboss.mq.Connection.authenticate(Connection.java:1160)

      ... 42 more

        • 1. install jboss4.0 occured errors when compiled jboss-4.0.0-sr
          ckmod

          java version is: build 1.5.0-rc-b63

          when i exectue the command:

          D:\jboss-4.0.4-src\build>ant


          it's show some information above:

          Buildfile: build.xml
          
          _buildmagic:init:
          Trying to override old definition of task property
          
          _buildmagic:init:local-properties:
          
          _buildmagic:init:buildlog:
          
          configure:
           [echo] groups: default
           [echo] modules: common,jmx,system,naming,aop,j2ee,transaction,server,deployment,security,messaging,connector,jaxrpc,jboss.net,webservice,remoting,cluster,varia,iiop,management,cache,tomcat,console,compatibility,aspects,media,hibernate
          
          init:
          
          _buildmagic:modules:most:
          
           ======================================================================
           == Executing 'most' in module 'common'...
           ==
          
          _buildmagic:init:
          Trying to override old definition of task libraryset
          Trying to override old definition of task execmodules
          Trying to override old definition of task resolveproperties
          Trying to override old definition of task resolver
          Trying to override old definition of task require
          Trying to override old definition of task _dump
          Trying to override old definition of task _puke
          Trying to override old definition of task moduleinit
          Trying to override old definition of task moduleconfig
          Trying to override old definition of task modulelibrary
          Trying to override old definition of task projectinfo
          Trying to override old definition of task library
          Trying to override old definition of task Ant
          Trying to override old definition of task moduleinfo
          Trying to override old definition of task projecthelp
          Trying to override old definition of task propertyfilter
          Trying to override old definition of task call
          Trying to override old definition of task property
          
          configure:
          
          _default:task-init:
          
          init:
          
          _buildmagic:build-bypass-checker:
          
          _buildmagic:build-bypass-notice:
          
          _buildmagic:build-bypass-check:
          
          jars:
          
          _buildmagic:init:
          
          init:
          
          _buildmagic:mbean-bypass-checker:
          
          _default:compile-mbean-sources:
          
          _default:compile-classes:
           [javac] Compiling 244 source files to D:\jboss-4.0.0-src\common\output\classes
          [execmodules] javac: target release 1.4 conflicts with default source release 1.5


          the build.log 's content is:


          configure:
           [echo] groups: default
           [echo] modules: common,jmx,system,naming,aop,j2ee,transaction,server,deployment,security,messaging,connector,jaxrpc,jboss.net,webservice,remoting,cluster,varia,iiop,management,cache,tomcat,console,compatibility,aspects,media,hibernate
          
          init:
          
          _buildmagic:modules:most:
          
           ======================================================================
           == Executing 'most' in module 'common'...
           ==
          
          _buildmagic:init:
          Trying to override old definition of task libraryset
          Trying to override old definition of task execmodules
          Trying to override old definition of task resolveproperties
          Trying to override old definition of task resolver
          Trying to override old definition of task require
          Trying to override old definition of task _dump
          Trying to override old definition of task _puke
          Trying to override old definition of task moduleinit
          Trying to override old definition of task moduleconfig
          Trying to override old definition of task modulelibrary
          Trying to override old definition of task projectinfo
          Trying to override old definition of task library
          Trying to override old definition of task Ant
          Trying to override old definition of task moduleinfo
          Trying to override old definition of task projecthelp
          Trying to override old definition of task propertyfilter
          Trying to override old definition of task call
          Trying to override old definition of task property
          
          configure:
          
          _default:task-init:
          
          init:
          
          _buildmagic:build-bypass-checker:
          
          _buildmagic:build-bypass-notice:
          
          _buildmagic:build-bypass-check:
          
          jars:
          
          _buildmagic:init:
          
          init:
          
          _buildmagic:mbean-bypass-checker:
          
          _default:compile-mbean-sources:
          
          _default:compile-classes:
           [javac] Compiling 244 source files to D:\jboss-4.0.0-src\common\output\classes
          [execmodules] javac: target release 1.4 conflicts with default source release 1.5
          
          BUILD FAILED
          
          D:\jboss-4.0.0-src\tools\etc\buildmagic\buildmagic.ent:411: Compile failed; see the compiler error output for details.
           at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
           at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
           at org.apache.tools.ant.Task.perform(Task.java:364)
           at org.apache.tools.ant.Target.execute(Target.java:341)
           at org.apache.tools.ant.Target.performTasks(Target.java:369)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
           at org.jboss.tools.buildmagic.task.CallTarget.execute(CallTarget.java:141)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
           at org.apache.tools.ant.Task.perform(Task.java:364)
           at org.apache.tools.ant.Target.execute(Target.java:341)
           at org.apache.tools.ant.Target.performTasks(Target.java:369)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
           at org.jboss.tools.buildmagic.task.Ant.execute(Ant.java:261)
           at org.jboss.tools.buildmagic.task.module.ExecuteModules$1.run(ExecuteModules.java:361)
           at org.jboss.tools.buildmagic.task.module.ExecuteModules.executeModule(ExecuteModules.java:376)
           at org.jboss.tools.buildmagic.task.module.ExecuteModules.execute(ExecuteModules.java:241)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
           at org.apache.tools.ant.Task.perform(Task.java:364)
           at org.apache.tools.ant.Target.execute(Target.java:341)
           at org.apache.tools.ant.Target.performTasks(Target.java:369)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
           at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
           at org.apache.tools.ant.Main.runBuild(Main.java:673)
           at org.apache.tools.ant.Main.startAnt(Main.java:188)
           at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
           at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)


          can anyone give me some ideas?