com.ibm.db2.jcc.am.SqlException: [jcc][50053][12310][4.19.56] T2zOS exception: [jcc][T2zos]T2zosCicsApi.checkApiStatus: Thread is not CICS-DB2 compatible: CICS_REGION_BUT_API_DISALLOWED ERRORCODE=-4228, SQLSTATE=null

  1. 0

    Hibernate connecting to DB2 at application startup on WAS Liberty on CICS

    Stack Overflow | 3 months ago | Gediminas Rimsa
    com.ibm.db2.jcc.am.SqlException: [jcc][50053][12310][4.19.56] T2zOS exception: [jcc][T2zos]T2zosCicsApi.checkApiStatus: Thread is not CICS-DB2 compatible: CICS_REGION_BUT_API_DISALLOWED ERRORCODE=-4228, SQLSTATE=null
  2. 0

    A type 2 driver uses native code to connect to the database without a password when connecting on the local server. This is useful for deployments as it does not expose the password or require password management through another tool. I suggest modifying the getURL call to the following: public String getURL( String hostname, String port, String databaseName ) { if ( getAccessType() == DatabaseMeta.TYPE_ACCESS_ODBC ) { return "jdbc:odbc:" + databaseName; } else { // if we are running on the local host then try to use the // native type 2 driver, else use a type 4. // type 2 drivers can connect without user credentials. String localhost = ""; String fullhost = ""; try { localhost = InetAddress.getLocalHost().getHostName(); fullhost = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { } if (hostname != null && ( hostname.trim().length() == 0 || hostname.equals("localhost") || hostname.equals(localhost) || hostname.equals(fullhost))) return "jdbc:db2:" + databaseName; else return "jdbc:db2://" + hostname + ":" + port + "/" + databaseName; } } I have tested this locally and the type 2 connection works. You do however have to address the use of java.library.path in spoon.sh so it can load the JNDI, but I opened another defect for that. Without that you would get: com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][4.19.26] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path: ERRORCODE=-4472, SQLSTATE=null at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.am.kd.a(Unknown Source) at com.ibm.db2.jcc.t2.a.a(Unknown Source) at com.ibm.db2.jcc.t2.T2Configuration.<clinit>(Unknown Source) at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source) at com.ibm.db2.jcc.DB2Driver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:664) I still suggest doing this change apart from that as it is easy to manage spoon.sh vs managing a java class change.

    Pentaho BI Platform Tracking | 2 months ago | Adam Swartz
    com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][4.19.26] Failure in loading native library db2jcct2, java.lang.UnsatisfiedLinkError: no db2jcct2 in java.library.path: ERRORCODE=-4472, SQLSTATE=null
  3. 0

    Error while reading image data:SqlException: [jcc][10120][11936][4.11.77] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null

    tagwith.com | 1 year ago
    org.apache.wicket.WicketRuntimeException: Error while reading image data at org.apache.wicket.markup.html.image.resource.BlobImageResource.getImageData (BlobImageResource.java:102)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    WebSphere India Blog - $utils.escapeHTML($model.weblog.websiteAssocs.get(0).assocName)

    ibm.com | 2 months ago
    com.ibm.db2.jcc.am.SqlException: [jcc][t4][10120][10898][3.65.131] Invalid operation: result set is closed. ERRORCODE=-4470, SQLSTATE=null
  6. 0

    Error while reading image data:SqlException: [jcc][10120][11936][4.11.77] Invalid operation: Lob is closed. ERRORCODE=-4470, SQLSTATE=null

    Stack Overflow | 2 years ago | Siddhu S
    org.apache.wicket.WicketRuntimeException: Error while reading image data at org.apache.wicket.markup.html.image.resource.BlobImageResource.getImageData (BlobImageResource.java:102)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.ibm.db2.jcc.am.SqlException

      [jcc][50053][12310][4.19.56] T2zOS exception: [jcc][T2zos]T2zosCicsApi.checkApiStatus: Thread is not CICS-DB2 compatible: CICS_REGION_BUT_API_DISALLOWED ERRORCODE=-4228, SQLSTATE=null

      at com.ibm.db2.jcc.am.kd.a()
    2. IBM DB2
      kd.a
      1. com.ibm.db2.jcc.am.kd.a(Unknown Source)[db2jcc4.jar:?]
      1 frame