#96 PreparedStatement.isClosed() thrown AbstractMethodError

v1.0 (example)
closed
nobody
None
5
2014-10-05
2011-07-15
Anonymous
No

Calling isClosed method on a PreparedStatement results in an AbstractMethodError. I am using c3p0 in conjunction with Spring and the PreparedStatement is a NewProxyPreparedStatement. The version of c3p0 is 0.9.1.2

java.lang.AbstractMethodError: com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.isClosed()Z
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.bull.javamelody.JdbcWrapper$StatementInvocationHandler.invoke(JdbcWrapper.java:186)
at net.bull.javamelody.JdbcWrapper$DelegatingInvocationHandler.invoke(JdbcWrapper.java:251)
at $Proxy12.isClosed(Unknown Source)
at com.acteksoft.common.util.sql.ActekPreparedStatement.isClosed(ActekPreparedStatement.java:2437)
at com.acteksoft.common.util.DefaultDatabaseWorker$2.in(DefaultDatabaseWorker.java:153)
at com.acteksoft.common.util.jdbc.DataSourceConnectionProvider$1.doInConnection(DataSourceConnectionProvider.java:62)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:341)

Discussion

  • Mog

    Mog - 2014-08-07

    Also ResultSet.isClosed()

    Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.simontuffs.onejar.Boot.run(Boot.java:340)
    at com.simontuffs.onejar.Boot.main(Boot.java:166)
    Caused by: java.lang.AbstractMethodError: com.mchange.v2.c3p0.impl.NewProxyResultSet.isClosed()Z
    at com.yp.valuemgmt.db.NationalTargets.next(NationalTargets.java:39)
    at com.yp.valuemgmt.NationalRule$$anonfun$loadDB$1.apply(NationalRule.scala:161)
    at com.yp.valuemgmt.NationalRule$$anonfun$loadDB$1.apply(NationalRule.scala:156)
    at gumpdb.GumpDB$$anonfun$withConnection2$1.apply(GumpDB.scala:85)
    at org.squeryl.dsl.QueryDsl$class._using(QueryDsl.scala:46)
    at org.squeryl.dsl.QueryDsl$class.using(QueryDsl.scala:38)
    at org.squeryl.PrimitiveTypeMode$.using(PrimitiveTypeMode.scala:40)
    at gumpdb.GumpDB$.withConnection2(GumpDB.scala:81)
    at gumpdb.GumpDB$.withConnection(GumpDB.scala:75)
    at com.yp.valuemgmt.NationalRule.loadDB(NationalRule.scala:156)
    at com.yp.valuemgmt.Refresh$$anonfun$main$1.apply(Refresh.scala:89)
    at com.yp.valuemgmt.Refresh$$anonfun$main$1.apply(Refresh.scala:72)
    at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:105)
    at com.yp.valuemgmt.Refresh$.main(Refresh.scala:72)
    at com.yp.valuemgmt.Refresh.main(Refresh.scala)

     
  • Steve Waldman

    Steve Waldman - 2014-10-05

    This is fixed in the c3p0 0.9.5 series, which supports all JDBC4 methods.

     
  • Steve Waldman

    Steve Waldman - 2014-10-05
    • status: open --> closed
    • Group: --> v1.0 (example)
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks