Lazy loading interceptor should skip class finalizer?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Lazy loading interceptor should skip class finalizer?

Arkadi Shishlov
I'm seeing the following exception in Tomcat logs with MyBatis 3.0.2:

java.sql.SQLRecoverableException: Io exception: Socket closed
        at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:
101)
        at
oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:
112)
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
173)
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
229)
        at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
458)
        at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:
493)
        at
oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:
3428)
        at
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.close(DelegatingConnection.java:
247)
        at
org.apache.tomcat.dbcp.dbcp.PoolableConnection.reallyClose(PoolableConnection.java:
122)
        at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.destroyObject(PoolableConnectionFactory.java:
628)
        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.invalidateObject(GenericObjectPool.java:
1247)
        at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.invalidateObject(AbandonedObjectPool.java:
125)
        at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.removeAbandoned(AbandonedObjectPool.java:
158)
        at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:
77)
        at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:
106)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:
1044)
        at
org.apache.ibatis.executor.loader.ResultLoader.newExecutor(ResultLoader.java:
86)
        at
org.apache.ibatis.executor.loader.ResultLoader.selectList(ResultLoader.java:
69)
        at
org.apache.ibatis.executor.loader.ResultLoader.loadResult(ResultLoader.java:
49)
        at org.apache.ibatis.executor.loader.ResultLoaderMap
$LoadPair.load(ResultLoaderMap.java:63)
        at
org.apache.ibatis.executor.loader.ResultLoaderMap.load(ResultLoaderMap.java:
32)
        at
org.apache.ibatis.executor.loader.ResultLoaderMap.loadAll(ResultLoaderMap.java:
42)
        at org.apache.ibatis.executor.loader.ResultObjectProxy
$EnhancedResultObjectProxyImpl.intercept(ResultObjectProxy.java:51)
        at lv.alise.junda.mybatis.bo.Laboratory$$EnhancerByCGLIB$
$537d728d.finalize(<generated>)
        at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
        at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
        at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
        at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:
160)

While reason for original /Io exception: Socket closed exception/ is
unclear, it uncovers another problem - ResultObjectProxy.intercept()
fetches data at object finalization time.
Looks like bug to me..?
Reply | Threaded
Open this post in threaded view
|

Re: Lazy loading interceptor should skip class finalizer?

Clinton Begin
Administrator
Yes, it should ignore the finalizer.  Can you log this in the issue tracker?

Thanks much,
Clinton

On Mon, Sep 13, 2010 at 7:01 PM, Arkadi <[hidden email]> wrote:
I'm seeing the following exception in Tomcat logs with MyBatis 3.0.2:

java.sql.SQLRecoverableException: Io exception: Socket closed
       at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:
101)
       at
oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:
112)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
173)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
229)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
458)
       at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:
493)
       at
oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:
3428)
       at
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.close(DelegatingConnection.java:
247)
       at
org.apache.tomcat.dbcp.dbcp.PoolableConnection.reallyClose(PoolableConnection.java:
122)
       at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.destroyObject(PoolableConnectionFactory.java:
628)
       at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.invalidateObject(GenericObjectPool.java:
1247)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.invalidateObject(AbandonedObjectPool.java:
125)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.removeAbandoned(AbandonedObjectPool.java:
158)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:
77)
       at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:
106)
       at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:
1044)
       at
org.apache.ibatis.executor.loader.ResultLoader.newExecutor(ResultLoader.java:
86)
       at
org.apache.ibatis.executor.loader.ResultLoader.selectList(ResultLoader.java:
69)
       at
org.apache.ibatis.executor.loader.ResultLoader.loadResult(ResultLoader.java:
49)
       at org.apache.ibatis.executor.loader.ResultLoaderMap
$LoadPair.load(ResultLoaderMap.java:63)
       at
org.apache.ibatis.executor.loader.ResultLoaderMap.load(ResultLoaderMap.java:
32)
       at
org.apache.ibatis.executor.loader.ResultLoaderMap.loadAll(ResultLoaderMap.java:
42)
       at org.apache.ibatis.executor.loader.ResultObjectProxy
$EnhancedResultObjectProxyImpl.intercept(ResultObjectProxy.java:51)
       at lv.alise.junda.mybatis.bo.Laboratory$$EnhancerByCGLIB$
$537d728d.finalize(<generated>)
       at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
       at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
       at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
       at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:
160)

While reason for original /Io exception: Socket closed exception/ is
unclear, it uncovers another problem - ResultObjectProxy.intercept()
fetches data at object finalization time.
Looks like bug to me..?

Reply | Threaded
Open this post in threaded view
|

Re: Lazy loading interceptor should skip class finalizer?

Clinton Begin
Administrator
fixed in trunk already.  check it out and build if you'd like it immediately.



On Mon, Sep 13, 2010 at 8:22 PM, Clinton Begin <[hidden email]> wrote:
Yes, it should ignore the finalizer.  Can you log this in the issue tracker?

Thanks much,
Clinton


On Mon, Sep 13, 2010 at 7:01 PM, Arkadi <[hidden email]> wrote:
I'm seeing the following exception in Tomcat logs with MyBatis 3.0.2:

java.sql.SQLRecoverableException: Io exception: Socket closed
       at
oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:
101)
       at
oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:
112)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
173)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
229)
       at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:
458)
       at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:
493)
       at
oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:
3428)
       at
org.apache.tomcat.dbcp.dbcp.DelegatingConnection.close(DelegatingConnection.java:
247)
       at
org.apache.tomcat.dbcp.dbcp.PoolableConnection.reallyClose(PoolableConnection.java:
122)
       at
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.destroyObject(PoolableConnectionFactory.java:
628)
       at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.invalidateObject(GenericObjectPool.java:
1247)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.invalidateObject(AbandonedObjectPool.java:
125)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.removeAbandoned(AbandonedObjectPool.java:
158)
       at
org.apache.tomcat.dbcp.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:
77)
       at
org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:
106)
       at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:
1044)
       at
org.apache.ibatis.executor.loader.ResultLoader.newExecutor(ResultLoader.java:
86)
       at
org.apache.ibatis.executor.loader.ResultLoader.selectList(ResultLoader.java:
69)
       at
org.apache.ibatis.executor.loader.ResultLoader.loadResult(ResultLoader.java:
49)
       at org.apache.ibatis.executor.loader.ResultLoaderMap
$LoadPair.load(ResultLoaderMap.java:63)
       at
org.apache.ibatis.executor.loader.ResultLoaderMap.load(ResultLoaderMap.java:
32)
       at
org.apache.ibatis.executor.loader.ResultLoaderMap.loadAll(ResultLoaderMap.java:
42)
       at org.apache.ibatis.executor.loader.ResultObjectProxy
$EnhancedResultObjectProxyImpl.intercept(ResultObjectProxy.java:51)
       at lv.alise.junda.mybatis.bo.Laboratory$$EnhancerByCGLIB$
$537d728d.finalize(<generated>)
       at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
       at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
       at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
       at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:
160)

While reason for original /Io exception: Socket closed exception/ is
unclear, it uncovers another problem - ResultObjectProxy.intercept()
fetches data at object finalization time.
Looks like bug to me..?


Reply | Threaded
Open this post in threaded view
|

Re: Lazy loading interceptor should skip class finalizer?

Arkadi Shishlov
Indeed no more errors in log with current snapshot.