#17 IBM iSeries support

closed
nobody
None
5
2014-08-16
2005-12-07
Anonymous
No

I'm having the same problem as Stephanie ([ 1273023 ]
JTDS 1.1 driver does not support Connection.setTypeMap
(Map)) but I'm using IBM's JTOpen driver
(com.ibm.as400.access.AS400JDBCDriver) for connecting
to an as/400 database. From the JavaDocs for
AS400JDBCConnection.setType( Map map ) -
"Note: Distinct types are supported by DB2 UDB for
iSeries, but are not externalized by the IBM Toolbox
for Java JDBC driver. In other words, distinct types
behave as if they are the underlying type. Structured
types are not supported by DB2 UDB for iSeries.
Consequently, this driver does not support the type
map." and thus will always throw an SQLException.
Another thing is that the prepareStatement method is
not implemented either. So whenever I try to create
an automaticTestTable or try to test my connections I
get an SQLException as well... and there are probably
more that I will uncover in the coming days... I
realize these problems are all due to IBMs
implementation of their JDBC driver but some support
for it (like you did for Oracle Connections) would be
appreciated.

Thanks,
Ben Ludkiewicz

setMapType Exception:
DEBUG com.mchange.v2.c3p0.impl.NewPooledConnection - A
Throwable occurred while trying to reset the typeMap
property of our Connection to Collections.EMPTY_MAP!
java.sql.SQLException: The driver does not support
this function.
at
com.ibm.as400.access.JDError.throwSQLException
(JDError.java:389)
at
com.ibm.as400.access.AS400JDBCConnection.setTypeMap
(AS400JDBCConnection.java:3888)
at
com.mchange.v2.c3p0.impl.NewPooledConnection.reset
(NewPooledConnection.java:290)
at
com.mchange.v2.c3p0.impl.NewPooledConnection.markClosed
ProxyConnection(NewPooledConnection.java:247)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.close
(NewProxyConnection.java:93)
at
com.mchange.v1.db.sql.ConnectionUtils.attemptClose
(ConnectionUtils.java:41)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.initializeAutomaticTestTable
(C3P0PooledConnectionPoolManager.java:543)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.createPooledConnectionPool
(C3P0PooledConnectionPoolManager.java:421)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.getPool(C3P0PooledConnectionPoolManager.java:342)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.getPool(C3P0PooledConnectionPoolManager.java:360)
at
com.mchange.v2.c3p0.PoolBackedDataSource.getConnection
(PoolBackedDataSource.java:94)
at
org.hibernate.connection.C3P0ConnectionProvider.getConn
ection(C3P0ConnectionProvider.java:35)
at
org.hibernate.cfg.SettingsFactory.buildSettings
(SettingsFactory.java:72)
at
org.hibernate.cfg.Configuration.buildSettings
(Configuration.java:1463)
at
org.hibernate.cfg.Configuration.buildSessionFactory
(Configuration.java:1004)
at
lig.framework.dw.hibernate.HibernateSessionFactory.<cli
nit>(HibernateSessionFactory.java:34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
lig.framework.dw.requestprocessor.HibernateRequestProce
ssor.<clinit>(HibernateRequestProcessor.java:55)
at lig.framework.util.Test.main(Test.java:112)

preparedStatement Exception:
DEBUG
com.mchange.v2.c3p0.impl.DefaultConnectionTester -
Testing a Connection in response to an Exception:
java.sql.SQLException: [SQL0204] DPBEN in QSYS type
*LIB not found.
at
com.ibm.as400.access.JDError.throwSQLException
(JDError.java:650)
at
com.ibm.as400.access.JDError.throwSQLException
(JDError.java:621)
at
com.ibm.as400.access.AS400JDBCStatement.commonPrepare
(AS400JDBCStatement.java:1481)
at
com.ibm.as400.access.AS400JDBCPreparedStatement.<init>
(AS400JDBCPreparedStatement.java:185)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStateme
nt(AS400JDBCConnection.java:1880)
at
com.ibm.as400.access.AS400JDBCConnection.prepareStateme
nt(AS400JDBCConnection.java:1703)
at
com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStat
ement(NewProxyConnection.java:303)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.initializeAutomaticTestTable
(C3P0PooledConnectionPoolManager.java:532)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.createPooledConnectionPool
(C3P0PooledConnectionPoolManager.java:421)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.getPool(C3P0PooledConnectionPoolManager.java:342)
at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPoolManage
r.getPool(C3P0PooledConnectionPoolManager.java:360)
at
com.mchange.v2.c3p0.PoolBackedDataSource.getConnection
(PoolBackedDataSource.java:94)
at
org.hibernate.connection.C3P0ConnectionProvider.getConn
ection(C3P0ConnectionProvider.java:35)
at
org.hibernate.cfg.SettingsFactory.buildSettings
(SettingsFactory.java:72)
at
org.hibernate.cfg.Configuration.buildSettings
(Configuration.java:1463)
at
org.hibernate.cfg.Configuration.buildSessionFactory
(Configuration.java:1004)
at
lig.framework.dw.hibernate.HibernateSessionFactory.<cli
nit>(HibernateSessionFactory.java:34)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
lig.framework.dw.requestprocessor.HibernateRequestProce
ssor.<clinit>(HibernateRequestProcessor.java:55)
at lig.framework.util.Test.main(Test.java:112)

Discussion

  • Steve Waldman

    Steve Waldman - 2005-12-22

    Logged In: YES
    user_id=175530

    Hi. The specific issue you are seeing was resolved as of c3p0-0.9.0.2, but
    that release also introduced another issue for some drivers that don't support
    the typeMap and/or readOnly properties of a Connection. c3p0-0.9.0.3 has a
    fix for this annoying issue.

    Please do note that what you are seeing above is a DEBUG level message. That
    means c3p0 is noting the Exception for debug purposes, but it handles and
    recovers from the exception. In other words, even with c3p0-0.9.0.1, this
    issue does not present an actual problem, just some log messages that you
    can turn off by setting your logging level to c3p0 to INFO or higher. c3p0
    presumes most users log at INFO.

     
  • Steve Waldman

    Steve Waldman - 2005-12-22
    • status: open --> closed
     

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

Sign up for the SourceForge newsletter:





No, thanks