1 Reply Latest reply on Apr 21, 2006 4:54 PM by Tim Fox

    Problems with JMS table creation: SQLExceptions

    Anuj Shah Newbie


      I had things working till about last night. where I was trying to send a simple text message to a queue. I see something of the sort

      13:02:16,648 INFO [Queue] Queue[/queue/NCBIQueue] started, fullSize=75000, pageSize=2000, downCacheSize=1000

      in my server output and I am sure that the queue is available. Also I find that my message driven bean has been deployed correctly. But I never found a line that says that the server has started in so many seconds..

      When I looked deep into my server.log file I figured that there are innumerable SQL exceptions being caused of the form

      2006-04-21 13:02:15,539 DEBUG [org.jboss.jms.server.plugin.JDBCChannelMapper] Failed to create users table: CREATE TABLE JMS_USER (USERID VARCHAR(32) NOT NULL, PASSWD VARCHAR(32) NOT NULL, CLIENTID VARCHAR(128), PRIMARY KEY(USERID))
      java.sql.SQLException: Table already exists: JMS_USER in statement [CREATE TABLE JMS_USER]
      java.sql.SQLException: Table already exists: JMS_ROLE in statement [CREATE TABLE JMS_ROLE]

      and so on. None of my configuration files have changed from before. here's my messaging service.xml file that defines the queue.

      <?xml version="1.0" encoding="UTF-8"?>
       <mbean code="org.jboss.jms.server.destination.Queue"
       <mbean code="org.jboss.jms.server.destination.Queue"

      i can post my application jboss file but it's huge and since I get a line saying

      Deployed: file:/C:/jboss-4.0.3SP1/server/messaging/tmp/deploy/tmp58411brm.ear-contents/brm-server.jar

      I assume that should have deployed just fine and also my application works just fine except the messaging part.

      My MDB does not receive the message at all. Of course there's a problem with this since the message tables are not created correctly.

      Any clue as to how to solve this problem?


        • 1. Re: Problems with JMS table creation: SQLExceptions
          Tim Fox Master


          This is to be expected.

          If you have createTablesOnStartup (see getting started guide) set to true then the server will always attempt to create the tables on startup.

          If the tables already exist you will then get a SQLException which will logged at log level of debug and it will continue.

          Actually, exactly the same behaviour is exhibited by JBossMQ. If you don't want to create the tables on startup, set createTablesOnStartup to false, or set the log level of log4j to info or above and you won't see the stack traces ion the logs. They are harmless anyway.