2007-04-19 19:00:12,640 DEBUG [org.jboss.mq.server.jmx.Queue.A] Starting jboss.mq.destination:service=Queue,name=A
2007-04-19 19:00:12,906 DEBUG [org.jboss.mq.server.jmx.Queue.A] Starting failed jboss.mq.destination:service=Queue,name=A
org.jboss.mq.SpyJMSException: Could not restore messages to destination : QUEUE.A; - nested throwable: (com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -351, SQLSTATE: 56084, SQLERRMC: 2)
at org.jboss.mq.pm.jdbc2.PersistenceManager.internalRestoreQueue(PersistenceManager.java:719)
at org.jboss.mq.pm.jdbc2.PersistenceManager.restoreQueue(PersistenceManager.java:565)
at org.jboss.mq.server.JMSQueue.<init>(JMSQueue.java:66)
at org.jboss.mq.server.jmx.Queue.startService(Queue.java:85)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
A little debugging on org.jboss.mq.pm.jdbc2.PersistenceManager.java shows the following query fails:
code snippets:
protected String SELECT_MESSAGE_KEYS_IN_DEST = "SELECT MESSAGEID FROM JMS_MESSAGES WHERE DESTINATION=?";
stmt = c.prepareStatement(SELECT_MESSAGE_KEYS_IN_DEST);
stmt.setString(1, dest.toString());
rs = stmt.executeQuery();
The following query when run manually on db2-7.2 works fine.
SELECT MESSAGEID FROM JMS_MESSAGES WHERE DESTINATION='QUEUE.A'
However the server throws a SQL error with error code SQLCODE: -351 which stands for:
db2 => ? SQL0351
SQL0351N An unsupported SQLTYPE was encountered in position
"<position-number>" of the output SQLDA (select
list).
Explanation: The element of the SQLDA at position
"<position-number>" is for a data type that either the
application requestor or the application server does not
support. If the application is not using the SQLDA directly,
"<position-number>" could represent the position of an element in
the select list or a parameter of a CALL statement.
The statement cannot be processed.
User Response: Change the statement to exclude the unsupported
data type. For a select statement, remove the names of any
columns in the select-list with the unsupported data type or use
a cast in the query to cast the column to a supported data
type.
sqlcode: -351
sqlstate: 56084
- relates to
-
JBPAPP-169 Error accesing persisted timer handles on db2 7.2
- Closed