3 Replies Latest reply on Oct 4, 2006 7:40 AM by Tim Fox

    MSSQL 2000 Problem with DLQ at startup.

    Markus Lutum Novice

      Hi out there!

      I am trying to use MSSQL Server 2000 with the Messaging RC5.
      I also use the persistence file mssql-persistence-service.xml.

      I have two problems:
      First the configuration:
      UPDATE_UNRELIABLE_CHANNELCOUNT=UPDATE JMS_MESSAGE M SET M.CHANNELCOUNT = M.CHANNELCOUNT - 1 WHERE M.MESSAGEID IN (SELECT MR.MESSAGEID FROM JMS_MESSAGE_REFERENCE MR WHERE MR.RELIABLE = 'N' AND MR.CHANNELID = ?)

      is invalid. When I put this in the query browser it reports an SQL Syntax error. I commented it out and the server startet!

      Second problem:
      Every time, when I have data in my DLQ and start the Server it reports:

      2006-10-04 12:12:27,562 DEBUG [org.jboss.messaging.core.plugin.JDBCPersistenceManager] Resetting message data. This may take several minutes for large queues/subscriptions...
      2006-10-04 12:12:27,562 DEBUG [org.jboss.messaging.core.plugin.JDBCPersistenceManager] Updating all reliable references to not loaded
      2006-10-04 12:12:27,593 ERROR [org.jboss.jms.server.plugin.JDBCChannelMapper] Failed to load queue state
      java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 7.
       at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
       at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
       at com.microsoft.jdbc.base.BaseResultSet.validateColumnIndex(Unknown Source)
       at com.microsoft.jdbc.base.BaseResultSet.getBinaryStream(Unknown Source)
       at org.jboss.resource.adapter.jdbc.WrappedResultSet.getBinaryStream(WrappedResultSet.java:339)
       at org.jboss.messaging.core.plugin.JDBCPersistenceManager.getBytes(JDBCPersistenceManager.java:4223)
      


      Looking at microsoft they say:
      (see http://support.microsoft.com/kb/824106/en-us )
      SYMPTOMS
      You have a Java application that uses JDBC to retrieve a ResultSet object by using the Microsoft SQL Server 2000 Driver for JDBC. When you try to read a column in the ResultSet, you may receive the following error message:
      
      java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 1.
      Note In this error message, the words "can not" are a misspelling for the word "cannot."
      
      The column number that the error message refers to is dependent on the schema of your ResultSet object.
       Back to the top
      
      CAUSE
      This error occurs with ResultSet objects that contain a BLOB column (for example, text, ntext, or image data types). The driver cannot return a BLOB column out of order because it does not cache all the content of BLOB data types because of size limitations.
      
      For any row in the ResultSet, you can read any column from left to right, and each column should be read only one time. If you try to read columns out of order, or if you re-read a column from the ResultSet, you may receive the error message that the "Symptoms" section describes.
      
      STATUS
      This behavior is by design.


      So, where is the error?