We use Jboss 5.0 with an oracle db and a standard jboss-messaging deployment.
Irregularly, a queue is unable to start and (therefore) bind itself in JNDI. This has something to do with (I think) corrupt messages which prevent the queue from starting: the exception we see is
java.sql.SQLException: Invalid column index
The error happens very irregularly (like I said), and we haven't been able to really reproduce it yet. However, it seems to happen when a jboss server is killed dirty while messages are being processed.
Deleting all messages directly in the db (delete from jbm_msg / delete from jbm_msg_ref) resolves the problem, but unfortunately it also removes other queue's messages.
So the question is, either:
- is there a way to sql-delete only the offending queue's messages, or
- is there a more elegant way to recover from corrupt messages (remember, the queue does not even start)