0 Replies Latest reply on Sep 19, 2002 8:48 PM by miha

    JMS persistance in Postgres without MDB?

    miha


      Hello,

      I am trying to write a JMS client that will persist messages in PostgreSQL DB, but I do not want to use a MDB (I understand that MDB is not a JMS API requirement, but rather a JBoss specific feature).
      My client works fine if I persist messages in the file system. When I try to persist them in PostgreSQL I get this error message on the server side:
      WARN [org.jboss.mq.il.oil.OILServerILService] Client request resulted in a server exception:
      WARN [org.jboss.mq.il.oil.OILServerILService] Client request resulted in a server exception:
      org.jboss.mq.SpyJMSException: Could not store message: 0
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:655)
      at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:41)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:228)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:375)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:135)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:155)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:206)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:233)
      at java.lang.Thread.run(Thread.java:536)
      linked exception is:
      No class found for
      org.jboss.mq.SpyTextMessage.
      at org.postgresql.Connection.putObject(Connection.java:663)
      at org.postgresql.jdbc2.PreparedStatement.setObject(PreparedStatement.java:536)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.setObject(LocalPreparedStatement.java:625)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:685)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:642)
      at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:41)
      at org.jboss.mq.server.JMSTopic.addMessage(JMSTopic.java:228)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:397)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:375)
      at org.jboss.mq.server.JMSServerInterceptorSupport.addMessage(JMSServerInterceptorSupport.java:135)
      at org.jboss.mq.security.ServerSecurityInterceptor.addMessage(ServerSecurityInterceptor.java:155)
      at org.jboss.mq.server.TracingInterceptor.addMessage(TracingInterceptor.java:206)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:233)
      at java.lang.Thread.run(Thread.java:536)


      and this message on the client side:
      Exception occurred: org.jboss.mq.SpyJMSException: Could not store message: 0

      I think my DB settings are correct, since the jms_messages and jms_transactions gets created when i start jboss.
      O do not understand why I get a "linked exception is:
      No class found for org.jboss.mq.SpyTextMessage.
      at org.postgresql.Connection.putObject(Connection.java:663)" .

      I thought it is a classpath problem, but I do not see it.

      Can anyone please give me a hint?
      Did anyone manage to persist messages in a DB without usng MDB? (My TextListener implements only MessageListener).

      I am using jboss-3.0.0 with tomcat-4.0.3

      Thanks a lot!