Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@1a4bc7

java.sql.SQLException: Connection is not associated with a managed connection.org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionJDK5@1a4bc7 at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:81) at org.jboss.resource.adapter.jdbc.WrappedStatement.lock(WrappedStatement.java:64) at org.jboss.resource.adapter.jdbc.WrappedStatement.getMaxRows(WrappedStatement.java:372) at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:298)

java.sql.SQLException: The statement is closed. at org.jboss.resource.adapter.jdbc.WrappedStatement.checkState(WrappedStatement.java:888) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setString(WrappedPreparedStatement.java:467) at org.hibernate.type.StringType.set(StringType.java:49) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:154)
java.sql.SQLException: Unable to obtain lock in 60 seconds: org.jboss.resource.adapter.jdbc.local.LocalManagedConnection@238ac5 at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:267) at org.jboss.resource.adapter.jdbc.WrappedConnection.lock(WrappedConnection.java:79) at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:237)
괜히 시키지도 않은짓을 하고 그랴! 다행히 http://community.jboss.org/wiki/WhatDoesTheMessageDoYourOwnHousekeepingMean 를 찾아보니 이걸 무효화하는 설정이 있다.. JBoss 5.x 버전에서는 deploy/jca-jboss-beans.xml 를 살펴보면 된다.
<!– Whether to track unclosed connections and close them –> <property name=”debug”>false</property>
[tip] 혹시 설정을 변경한 뒤 아래와 같은 에러가 발생한다면?
Caused by: java.sql.SQLException: Connection handle has been closed and is unusable
persistence.xml에 아래와 같은 설정을 추가하라.
<property name=”hibernate.connection.release_mode” value=”after_transaction” />
[/tip] ]]>

Related Posts