openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chintan4181 <chintan4...@gmail.com>
Subject may be OpenJPA limitation
Date Tue, 07 Jun 2011 15:59:08 GMT
Hi,

I am using openJPA 2.0 in WAS 7.0. Our application talks with mulitple
persisten unit. One of them is DB2. When i am trying find record using
primary key, i am getting below error.  Data type of primary key of User
entity is BigInt in DB2 and corrosponding java type in entity is long.

<openjpa-2.0.0-r422266:935683 fatal general error>
org.apache.openjpa.persistence.PersistenceException: DB2 SQL Error:
SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DBSCHEMA.USER, DRIVER=4.8.87
{prepstmnt 969619915 SELECT t0.AUDIT_LDAP_DN, t0.AUDIT_TIMESTAMP,
t0.AUDIT_USER, t0.BIRTH_DATE, t0.FIRST_NAME, t0.identifier, t0.LAST_NAME,
t0.STATUS_CODE, t0.TYPE_CODE FROM User t0 WHERE t0.USER_ID = ?  optimize for
1 row [params=(long) 2]} [code=-204, state=42704]SQLCA OUTPUT[Errp=SQLNQ1FC,
Errd=-2145779603, 0, 0, 0, -10, 0]

DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DBSCHEMA.USER,
DRIVER=4.8.87

DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098,
SQLERRMC=2;-204;42704;DBSCHEMA.USER, DRIVER=4.8.87

DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098,
SQLERRMC=2;-204;42704;DBSCHEMA.USER, DRIVER=4.8.87

FailedObject: com.foo.jpa.entities.User-2 [org.apache.openjpa.util.LongId]
[java.lang.String]

      at
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4827)

      at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4787)

      at
org.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:563)

      at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)

      at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:86)

      at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:347)


If i use Eclipselink persistence provider then it works perfectly. can
anybody help me to resolve this issue?

thanks
chintan

--
View this message in context: http://openjpa.208410.n2.nabble.com/may-be-OpenJPA-limitation-tp6450246p6450246.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message