Javalite Async事件处理失败,错误[客户端] -AMQ214008:无法处理数据包Java.lang.uns


    please anybody help to fix this issue?<br/>
    **I am getting issue [client] - AMQ214008: Failed to handle packet java.lang.UnsupportedOperationException while processing the command data in javalite async?**<br/>
            [2018-03-30 10:27:16,303] - [DEBUG] [client] - Calling close on session ClientSessionImpl [name=d13aa760-33d6-11e8-b4fb-844bf530b8f3, username=null, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@58e64301, metaData=(jms-session=,)]@6a6c5fb3 <br/>
            [2018-03-30 10:27:16,306] - [DEBUG] [server] - QueueImpl[name=jms.queue.eventQueue, postOffice=PostOfficeImpl [server=ActiveMQServerImpl::serverUUID=70d74287-3283-11e8-8a66-844bf530b8f3]]@39533a61 doing deliver. messageReferences=0 <br/>
            [2018-03-30 10:27:16,308] - [DEBUG] [client] - calling cleanup on ClientSessionImpl [name=d13aa760-33d6-11e8-b4fb-844bf530b8f3, username=null, closed=false, factory = org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl@58e64301, metaData=(jms-session=,)]@6a6c5fb3 <br/>
            [2018-03-30 10:27:16,335] - [DEBUG] [HttpAsyncRequestExecutor] - http-outgoing-0 [ACTIVE] [content length: 42355; pos: 42355; completed: true] <br/>
            [2018-03-30 10:27:16,336] - [DEBUG] [ThreadLocalRandom] - -Dio.netty.initialSeedUniquifier: 0xad1a1d5891abf66a <br/>
            **[2018-03-30 10:27:16,337] - [ERROR] [client] - AMQ214008: Failed to handle packet <br/>
            java.lang.UnsupportedOperationException<br/>
            at java.nio.ByteBuffer.array(Unknown Source)**<br/>
            at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.handleCompressedMessage(ClientConsumerImpl.java:600)<br/>
            at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.handleMessage(ClientConsumerImpl.java:532)<br/>
            at org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.handleReceiveMessage(ClientSessionImpl.java:824)<br/>
            at org.apache.activemq.artemis.spi.core.remoting.SessionContext.handleReceiveMessage(SessionContext.java:97)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.handleReceivedMessagePacket(ActiveMQSessionContext.java:712)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.access$400(ActiveMQSessionContext.java:111)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext$ClientSessionPacketHandler.handlePacket(ActiveMQSessionContext.java:755)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:594)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:368)<br/>
            at org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:350)<br/>
            at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1140)<br/>
            at org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnection$1.run(InVMConnection.java:183)<br/>
            at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:100)<br/>
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)<br/>
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)<br/>
            at java.lang.Thread.run(Unknown Source)<br/>
               <br/><br/>            

当我在独立项目中执行代码时,其工作正常。但是在tomcat服务器中运行相同的时,它抛出了上述 错误..?


源代码在下面 公共类TestCommand扩展命令 { 私人测试事件;

          public TestCommand(MsgEvent event) 
          {
          this.event = (TestEvent)event;
          }
          public TestCommand() 
          {
          } 
          @Override
          public void execute() 
          {   
              //code stuff
          }
      }
      <br/><br/>          
      async = new Async(filePath, false, new QueueConfig("eventQueue", new CommandListener(), threadCount));
          <br/>
      async.start();
      <br/>
      public void test(EventCommand ev)
      {
          async.send("eventQueue", ev);
      }       <br/>

库后库中加载到classpath

请有人帮助解决此问题?

证据向我表明,当在tomcat中执行此代码时,它使用的是与独立运行时的Java.nio.nio.nio.nio.nio实现(也许是由于Netty的不同版本(。引起异常的代码是调用java.nio.bytebuffer.array((,该代码不需要实现(即,在此处抛出unsupportedOperationException在此处有效(。这是通过Artemis 1.4提供的此提案在Artemis中处理的。也就是说,没有理由使用这种古老的Artemis。我建议您尽快升级到最新的2.5版本。

相关内容

  • 没有找到相关文章

最新更新