1 Reply Latest reply on Dec 21, 2005 9:53 AM by Laurent Duperval

    Error under heavy load: Unable to convert between org.jboss.

    Laurent Duperval Newbie

      HI,

      I create a (temporary) queue and an object to store message data to my database. This usually works well. However, whent I subject it to heavy(?) load, I get errors like this:

      2005-12-21 09:31:42,477 INFO [STDOUT] [ JMSLogger:: sendMessage: Exception while sending the LogMessage Could not store message: 456 msg=455 hard NOT_STORED NON_PERSISTENT queue=QUEUE.AsynchronousLogQueue priority=9 lateClone=false hashCode=22529898; - nested throwable: (java.sql.SQLException: Unable to convert between org.jboss.mq.SpyObjectMessage and JAVA_OBJECT.)]
      2005-12-21 09:31:42,477 INFO [STDOUT] org.jboss.mq.SpyJMSException: Could not store message: 456 msg=455 hard NOT_STORED NON_PERSISTENT queue=QUEUE.AsynchronousLogQueue priority=9 lateClone=false hashCode=22529898; - nested throwable: (java.sql.SQLException: Unable to convert between org.jboss.mq.SpyObjectMessage and JAVA_OBJECT.)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1225)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.MessageCache.saveToStorage(MessageCache.java:385)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.MessageReference.makeSoft(MessageReference.java:311)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.MessageCache.validateSoftReferenceDepth(MessageCache.java:332)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.MessageCache.addInternal(MessageCache.java:142)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.MessageCache.add(MessageCache.java:112)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:130)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:402)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:378)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:136)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:153)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:270)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:136)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.il.uil2.ServerSocketManagerHandler.handleMsg(ServerSocketManagerHandler.java:86)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:356)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
      2005-12-21 09:31:42,477 INFO [STDOUT] at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      2005-12-21 09:31:42,477 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
      2005-12-21 09:31:42,477 INFO [STDOUT] Caused by: java.sql.SQLException: Unable to convert between org.jboss.mq.SpyObjectMessage and JAVA_OBJECT.
      2005-12-21 09:31:42,477 INFO [STDOUT] at net.sourceforge.jtds.jdbc.Support.convert(Support.java:449)
      2005-12-21 09:31:42,477 INFO [STDOUT] at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setObjectBase(JtdsPreparedStatement.java:275)
      2005-12-21 09:31:42,477 INFO [STDOUT] at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setObject(JtdsPreparedStatement.java:529)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:652)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.pm.jdbc2.PersistenceManager.setBlob(PersistenceManager.java:837)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:775)
      2005-12-21 09:31:42,477 INFO [STDOUT] at org.jboss.mq.pm.jdbc2.PersistenceManager.saveToStorage(PersistenceManager.java:1211)
      2005-12-21 09:31:42,477 INFO [STDOUT] ... 17 more
      2005-12-21 09:31:42,477 INFO [STDOUT] [ LogService::sendMessage: The message successfully sent ]
      


      The only way to fix this seems to be to restart JBoss.

      Does anyone know what is happening?

      This is the code I use to test my queue:


      int repeat = Integer.parseInt(request.getParameter("repeat"));
       String logType = request.getParameter("logtype");
       if (logType != null && logType.length() != 0) {
       for (int i = 0; i < repeat; i++) {
       Class c = Logger.class;
       Class[] parameterTypes = new Class[] { String.class, String.class };
       Method logMethod;
       Object[] arguments = new Object[] { "short" + i, "long" + i };
       logMethod = c.getMethod(logType, parameterTypes);
       logMethod.invoke(logger, arguments);
       }
       }
      


      Thank you,

      L