[jboss-user] [JBoss Messaging] New message: "Re: Problem at restart or redeploy with Postgresql"

Guillaume Bourgois do-not-reply at jboss.com
Fri Feb 12 11:19:10 EST 2010


User development,

A new message was posted in the thread "Problem at restart or redeploy with Postgresql":

http://community.jboss.org/message/526074#526074

Author  : Guillaume Bourgois
Profile : http://community.jboss.org/people/GuillaumeBourgois

Message:
--------------------------------------------------------------
Sorry, I forgot to translate that...
 
org.postgresql.util.PSQLException: The column index is out of range: 4, number of columns: 3
 
My JBM_MSG_REF table have 8 columns and all the rows looks like
 
|| message_id || channel_id || *transaction_id* || *state
*  || *ord* || *page_ord
*  || *delivery_count
*  || *sched_delivery
*  ||
| 5184808962719747 | 400 |  | "C" | 5184808962818051 | 
 | 0 | 0 |
 
 
But in JDBCPersistenceManager.java (jboss messaging 1.4.5.GA) we can find thoses instructions :
 
ps = conn.prepareStatement(getSQLStatement("LOAD_UNPAGED_REFS"));
 ps.setFetchSize(number);
ps.setLong(1, channelID);
rs = ps.executeQuery();
List<ReferenceInfo> refs = new ArrayList<ReferenceInfo>();
List<ReferenceInfo> refsToUpdate = new ArrayList<ReferenceInfo>();
int count = 0;
boolean inMemSwitch = false;
boolean nonPageFlag = true;
 
while (rs.next())
{
rs.getObject(4); *//Line 999 -> Raise exception*

 
[...]
 
map.put("LOAD_UNPAGED_REFS","SELECT MESSAGE_ID, DELIVERY_COUNT, SCHED_DELIVERY, PAGE_ORD FROM JBM_MSG_REF WHERE STATE = 'C' " + "AND CHANNEL_ID = ? ORDER BY ORD");
 
 
So that request is called, return 4 columns (indexes 0,1,2,3), then a useless instruction "rs.getObject(4);" try to get an object in an inexistant fourth column.
 
Am I right ?
 
 
 
 
 


--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/526074#526074




More information about the jboss-user mailing list