1. OpenJPA
  2. OPENJPA-702

MappingTool fails requires appropriate DESCSTAT parm value on DB2 for z/OS


    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.2.1, 1.3.0
    • Component/s: docs
    • Labels:
    • Environment:
      OpenJPA trunk, DB2 for z/OS V8, IBM JCC type 4 JDBC driver.


      When running with the IBM JCC driver to a DB2 on z/OS system the mapping tool may fail with the stack trace below if the DB2 DESCSTAT subsystem parameter is not set to 'YES'. This parameter controls whether column names are returned in a JDBC metadata query. Specifically, the mapping tool uses the JDBC-spec defined column names to query column metadata and that query will fail if DESCSTAT is set to 'NO'. By default DB2 on z/OS version 8 and later set the DESCSTAT parameter to 'YES'. However, if it gets set to 'NO' , explicitly or possibly via a DB migration, the mapping tool will fail.

      org.apache.openjpa.persistence.PersistenceException: [ibm]
      [db2][jcc][10150][10300] Invalid parameter: Unknown column name TABLE_SCHEM.
      at org.apache.openjpa.jdbc.meta.MappingTool.record(
      at org.apache.openjpa.jdbc.meta.MappingTool.record(
      at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerF
      at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory
      at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.
      at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFact
      at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(Enti
      at ...

      I will post a patch shortly that includes a documentation update for the DB2 known issues section of the doc.

      1. OPENJPA-702.patch
        1.0 kB
        Jeremy Bauer


        Jeremy Bauer created issue -
        Jeremy Bauer made changes -
        Field Original Value New Value
        Attachment OPENJPA-702.patch [ 12388855 ]
        Kevin Sutter made changes -
        Assignee Jeremy Bauer [ techhusky ]
        Jeremy Bauer made changes -
        Fix Version/s 1.3.0 [ 12313326 ]
        Fix Version/s 1.2.1 [ 12313328 ]
        Jeremy Bauer made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]


          • Assignee:
            Jeremy Bauer
            Jeremy Bauer
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: