Jboss error Thread trying to unlock when accessing resultSet

758 views Asked by At

Currently I encountered "java.lang.Throwable: Thread trying to unlock" on Jboss EAP 5.2 when try to get data from resultset ResultSet.getDate(). I have no clue why this is happening. Can anyone provide some possible causes of this?

2015-06-01 08:35:18,543 18619353 WARN  [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] (ajp-0.0.0.0-8109-7:) Owner is null
2015-06-01 08:35:18,544 18619354 WARN  [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory] (ajp-0.0.0.0-8109-7:) Thread trying to unlock
java.lang.Throwable: Thread trying to unlock
     at java.lang.Thread.getStackTrace(Thread.java:1568)
     at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.unlock(BaseWrapperManagedConnection.java:318)
     at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.broadcastConnectionError(BaseWrapperManagedConnection.java:455)
     at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.connectionError(BaseWrapperManagedConnection.java:432)
     at org.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:886)
     at org.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:857)
     at org.jboss.resource.adapter.jdbc.WrappedResultSet.checkException(WrappedResultSet.java:1947)
     at org.jboss.resource.adapter.jdbc.WrappedResultSet.getDate(WrappedResultSet.java:559)

Thanks David

1

There are 1 answers

0
user3422290 On

It turns out the issue is caused by the query

SELECT '07/14/1987' as  birthday FROM person WHERE name = 'david';

The birthday is hardcoded as string and at backend, we are try to use

Date bDay = rs.getDate('birthday');  

This caused the issue.

Thanks David