users@glassfish.java.net

GF 3.1.1 CMP ...not comptible with GF 2.1.1?

From: Bernhard Thalmayr <bernhard.thalmayr_at_painstakingminds.com>
Date: Mon, 28 Nov 2011 15:56:53 +0100

Hi experts,

I do have a 3rd party application (so no source available) which uses CMP
2.1.

The application works fine on GF 2.1.1 but it does not on GF 3.1.1.

The following exception is thrown.

[#|2011-11-28T14:49:20.153+0100|WARNING|glassfish3.1.1|javax.enterprise.system.container.ejb.entity.lifecycle|_ThreadID=104;_ThreadName=Thread-2;|JDO74004:
Bean 'StVgerSys' method ejbLoad:
com.sun.jdo.api.persistence.support.JDOObjectNotFoundException: JDO76210:
Object does not exist in the data store.
FailedObjectArray:
[de.novum.vger.daten.StVgerSysBean_976022567_JDOState_at_154a0e7]
        at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2074)
        at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1201)
        at
com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1157)
        at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:662)
        at
com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:280)
        at
de.novum.vger.daten.StVgerSysBean_976022567_ConcreteImpl.jdoGetInstance(StVgerSysBean_976022567_ConcreteImpl.java:338)
        at
de.novum.vger.daten.StVgerSysBean_976022567_ConcreteImpl.ejbLoad(StVgerSysBean_976022567_ConcreteImpl.java:370)
        at
com.sun.ejb.containers.EntityContainer.callEJBLoad(EntityContainer.java:2337)


The SQL statement issued on GF 3.1.1 and GF 2.1.1 seems to be equivalent ..


GF 3.1.1:
[#|2011-11-28T14:49:20.122+0100|FINE|glassfish3.1.1|javax.enterprise.resource.jdo.sqlstore.sql|_ThreadID=104;_ThreadName=Thread-2;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager;MethodName=executeQuery;|SQL
statement<select t0."TAG", t0."GROUPNAME", t0."VALUE" from "ST_VGER_SYS" t0
where t0."TAG" = ? and t0."GROUPNAME" = ?> with input
values:java.lang.String:vger.UserIdFactory, java.lang.String:Security|#]


GF 2.1.1:
[#|2011-11-28T15:41:43.489+0100|FINE|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore.sql|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager;MethodName=executeQuery;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|SQL-Anweisung<select
t0."TAG", t0."GROUPNAME", t0."VALUE" from "ST_VGER_SYS" t0 where t0."TAG" =
? and t0."GROUPNAME" = ?> mit Eingabewerten:java.lang.String:StElt,
java.lang.String:Vger|#]


However on GF 2.1.1 I can see the following special treatment for Oracle
Database ....

[#|2011-11-28T15:41:43.493+0100|FINER|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement;MethodName=bindInputColumn;1;StElt;1;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|bindInputColumn
index: 1 value: StElt sqlType: 1.|#]

[#|2011-11-28T15:41:43.494+0100|FINE|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.database.DBVendorType;MethodName=getSpecialDBOperation;com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOpe;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|<->
DBVendorType.getSpecialDBOperation():
com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOpe.
|#]

[#|2011-11-28T15:41:43.495+0100|FINE|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOperation$NonOracleHandler;MethodName=bindFixedCharColumn;StElt;50;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|JDO76518:
Wert "StElt" ist an eine CHAR-Spalte gebunden. Dies erfordert eine
besondere Behandlung auf Oracle. Da die Klasse OraclePreparedStatement
nicht vom Treiber abgerufen werden konnte, wird der Wert mit Leerzeichen
angefüllt, bis die in der erfassten dbschema-Datei angegebene Länge v 50
erreicht ist.|#]
.....

[#|2011-11-28T15:41:43.496+0100|FINER|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.sql.generator.DBStatement;MethodName=bindInputColumn;2;Vger;1;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|bindInputColumn
index: 2 value: Vger sqlType: 1.|#]

[#|2011-11-28T15:41:43.497+0100|FINE|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.database.DBVendorType;MethodName=getSpecialDBOperation;com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOpe;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|<->
DBVendorType.getSpecialDBOperation():
com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOpe.
|#]

[#|2011-11-28T15:41:43.498+0100|FINE|sun-appserver2.1|javax.enterprise.resource.jdo.sqlstore|_ThreadID=235;_ThreadName=httpSSLWorkerThread-8082-4;ClassName=com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOperation$NonOracleHandler;MethodName=bindFixedCharColumn;Vger;50;_RequestID=8e8b5b87-b6e8-4645-ae56-7f11662b6881;|JDO76518:
Wert "Vger" ist an eine CHAR-Spalte gebunden. Dies erfordert eine besondere
Behandlung auf Oracle. Da die Klasse OraclePreparedStatement nicht vom
Treiber abgerufen werden konnte, wird der Wert mit Leerzeichen angefüllt,
bis die in der erfassten dbschema-Datei angegebene Länge von0 erreicht
ist.|#]


How can I achieve the same functionality with GF 3.1.1?

TIA,
Bernhard


P.S. Sorry for the German log message :-(

-- 
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany