Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2010
    Posts
    1

    Unanswered: Help getting further with error communicating to DB2

    I've deployed a mediation module on a WAS7 (running on Windows) which will try to send a simple sql statement to a db2 database. I've set up a data source on the WAS to the database, and when I test that connection, I get a positive response.

    When I invoke my mediation however I get this error

    Mediation primitive com.ibm.websphere.ce.cm.StaleConnectionException: DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=EXPLAIN;CURRENT DATE, TIME, TIMESTAMP, CURRENT_DATE, CURRENT_TIME, CUR, DRIVER=3.57.82DSRA0010E: SQL State = 42601, Error Code = -104 in module [Ljava.lang.Object;@1c811c81 was unable to obtain a connection to the database.

    The big mystery is that the mediation works great in my development environment, but not here in our test environment (with the same inputs to the mediation and the same data source setup).

    I've sniffed the network traffic from my development environment and from the test environment, and the sql statements sent differ.

    In my development environment, the SQL statement I want to send to the database is sent, but in the test environment, this is sent:

    select CURRENT CLIENT_ACCTNG, CURRENT CLIENT_APPLNAME, CURRENT CLIENT_USERID, CURRENT CLIENT_WRKSTNNAME, CURRENT DEGREE, CURRENT FUNCTION PATH, CURRENT MAINTAINED TABLE TYPES FOR OPTIMIZATION, CURRENT PACKAGE PATH, CURRENT REFRESH AGE, CURRENT SCHEMA, CURRENT SQLID, CURRENT EXPLAIN MODE, CURRENT EXPLAIN SNAPSHOT, CURRENT LOCK TIMEOUT, CURRENT QUERY OPTIMIZATION from SYSIBM.SYSDUMMY1

    which makes the db2 database return with: FADB2T.FEXPLAIN.CURRENT DATE, TIME, TIMESTAMP, CURRENT_DATE, CURRENT_TIME, CUR

    I've tried to locate what that database statement does, and it seems to be the special registers within DB2? (I don't know why it in test sends this statement?).

    When trying to get more trace from the test environment, I get the actual stacktrace:

    com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-514, SQLSTATE=26501, SQLERRMC=SQL_CURLN200C1, DRIVER=3.57.82
    at com.ibm.db2.jcc.am.bd.a(bd.java:679)
    at com.ibm.db2.jcc.am.bd.a(bd.java:60)
    at com.ibm.db2.jcc.am.bd.a(bd.java:127)
    at com.ibm.db2.jcc.am.km.c(km.java:2506)
    at com.ibm.db2.jcc.am.km.a(km.java:1990)
    at com.ibm.db2.jcc.t4.db.n(db.java:801)
    at com.ibm.db2.jcc.t4.db.i(db.java:258)
    at com.ibm.db2.jcc.t4.db.c(db.java:53)
    at com.ibm.db2.jcc.t4.t.c(t.java:44)
    at com.ibm.db2.jcc.t4.sb.i(sb.java:147)
    at com.ibm.db2.jcc.am.km.gb(km.java:1985)
    at com.ibm.db2.jcc.am.km.a(km.java:2866)
    at com.ibm.db2.jcc.am.km.a(km.java:628)
    at com.ibm.db2.jcc.am.jb.getJccSpecialRegisterPropert ies(jb.java:6985)
    at com.ibm.db2.jcc.am.ve.getJccSpecialRegisterPropert ies(ve.java:964)
    at com.ibm.ws.rsadapter.dbutils.impl.DB2UniversalUtil ityImpl.getJccSpecialRegisterProperties(DB2Univers alUtilityImpl.java:343)
    at com.ibm.ws.rsadapter.spi.InternalDB2UniversalDataS toreHelper.addDefaultHPExtendedProperties(Internal DB2UniversalDataStoreHelper.java:1987)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnec tion(WSRdbDataSource.java:2443)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactor yImpl.createManagedConnection(WSManagedConnectionF actoryImpl.java:1606)
    at com.ibm.ejs.j2c.FreePool.createManagedConnectionWi thMCWrapper(FreePool.java:2032)
    at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection (FreePool.java:1709)
    at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.ja va:2465)
    at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrappe r(ConnectionManager.java:1057)
    at com.ibm.ejs.j2c.ConnectionManager.allocateConnecti on(ConnectionManager.java:696)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConn ection(WSJdbcDataSource.java:668)
    at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConn ection(WSJdbcDataSource.java:635)
    at com.ibm.ws.sibx.mediation.primitives.dblookup.Data baseLookupMediation.mediate(DatabaseLookupMediatio n.java:791)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.performInvocation(JavaMediationPrimitiv e.java:653)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.invoke(JavaMediationPrimitive.java:360)
    at com.ibm.ws.sibx.scax.mediation.engine.MediationPri mitive.invokeConnections(MediationPrimitive.java:3 35)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.fireOutputTerminals(JavaMediationPrimit ive.java:759)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.performInvocation(JavaMediationPrimitiv e.java:673)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.invoke(JavaMediationPrimitive.java:360)
    at com.ibm.ws.sibx.scax.mediation.engine.MediationPri mitive.invokeConnections(MediationPrimitive.java:3 35)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.fireOutputTerminals(JavaMediationPrimit ive.java:759)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.performInvocation(JavaMediationPrimitiv e.java:673)
    at com.ibm.ws.sibx.scax.mediation.engine.JavaMediatio nPrimitive.invoke(JavaMediationPrimitive.java:360)
    at com.ibm.ws.sibx.scax.mediation.engine.SIBXJavaMedi ationPrimitive.invoke(SIBXJavaMediationPrimitive.j ava:107)
    at com.ibm.ws.sibx.scax.mediation.engine.MediationPri mitive.invokeConnections(MediationPrimitive.java:3 35)
    at com.ibm.ws.sibx.scax.mediation.engine.Input.invoke (Input.java:194)

    Most interesting is: com.ibm.ws.rsadapter.dbutils.impl.DB2UniversalUtil ityImpl.getJccSpecialRegisterProperties(DB2Univers alUtilityImpl.java:343)

    It seems this is the JccSpecialRegisterProperties? and when running that line of code, an exception is thrown (probably from the response to that query?)
    Why is the test environment sending this query which obviously buggs out? (I just want to send my own query to the database which obviously works)

    Is it possible to disable the JccSpecialRegisterProperties check somehow?

    Does anyone have any idea what the problem could be and any help to solve this is very much appreciated.

    I know this problem might be better suited for a websphere forum, but I would be very happy with some insight into the behavior of the getJccSpecialRegisterProperties, which only occurs in our test environment. What is the use of that, and why is it sent there?

    I'm having a hard time getting further with this problem and some db2 help from the db2 community would be very much appreciated.

    (attaching the detailed trace file)
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •