Here is my code, like i say before i want to unwrap my connection but get an error
Code:jdbcTemplate.execute(new ConnectionCallback() { public Object doInConnection(Connection c) throws SQLException, DataAccessException { if (c.isWrapperFor(PGConnection.class)) { c.unwrap(PGConnection.class); } return null; } });
Errors:
I use:Code:2009-06-02 11:19:56,619 ERROR [org.mortbay.log] [main] failed org.mortbay.jetty.servlet.Context@12943ac{/sync,null} java.lang.AbstractMethodError: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.isWrapperFor(Ljava/lang/Class;)Z at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.jdbc.core.JdbcTemplate$CloseSuppressingInvocationHandler.invoke(JdbcTemplate.java:1283) at $Proxy0.isWrapperFor(Unknown Source) at org.jumpmind.symmetric.db.postgresql.PostgreSqlDbDialect$1.doInConnection(PostgreSqlDbDialect.java:63) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:342)
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.4.1) (6b14-1.4.1-0ubuntu10)
OpenJDK Client VM (build 14.0-b08, mixed mode, sharing)
and
postgresql-8.2-504.jdbc3.jar driver
Helpme
PD: excuses my bad english


Reply With Quote
