1 Reply Latest reply on Jul 20, 2007 6:16 AM by Tim Fox

    Database Problems

    Alex Chatziparaskewas Newbie

      Hi

      More problems...

      I installed JBoss 4.2.0, JBM 1.4.0CR1, and tried to follow the installation instructions (the manual one) as closely as possible.

      1) JBM_MSG_REF Table
      When using SQLServer 2005 and Postgres 8.2.4 right after installing the database and the option turned on for JBoss Messaging to create the necessary tables. The first time JBoss is started, the JBM_MSG_REF table is not created for some reason. Only after stopping and restarting JBoss again is it created. I reckon some database gimick related to the foreign key relationship between the JBM_MSG table and the JBM_MSG_REF table.

      2007-07-20 11:01:10,656 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] Failed to execute: CREATE TABLE JBM_MSG_REF (CHANNEL_ID BIGINT, MESSAGE_ID BIGINT REFERENCES JBM_MSG(MESSAGE_ID), TRANSACTION_ID BIGINT, STATE CHAR(1), ORD BIGINT, PAGE_ORD BIGINT, DELIVERY_COUNT INTEGER, SCHED_DELIVERY BIGINT, PRIMARY KEY(CHANNEL_ID, MESSAGE_ID))
      org.postgresql.util.PSQLException: ERROR: relation "jbm_msg" does not exist


      2) 'assuming deadlock detected'
      I have two machines. One XP laptop, and Windows 2003 Server (dual core!). On both I installed SQLServer 2005 and Postgres 8.2.4. On both machines I have identical (copy & paste) versions of JBoss 4.2.0/JBM 1.4.0CR1 running. The problem is now: While the XP box works fine, as soon as I start sending messages to the Windows 2003 box, I get SQL exceptions of the kind (SQLSERVER): java.sql.BatchUpdateException: com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__JBM_MSG_R__MESSA__09C96D33". The conflict occurred in database "master", table "dbo.JBM_MSG", column 'MESSAGE_ID'. Same when using Postgres, simply with a different exception. The interesting part now is, that after much troubles I was able to tell SQLSERVER to only run on one CPU (the bios does not support switching off one core, but interestingly SQLSERVER has some built in functionality for this). After that everything worked perfectly.

      Regards
      Alex