You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "Christophe.Demarey" <Ch...@lifl.fr> on 2003/10/27 18:28:13 UTC

JDO - newObjectIdInstance() method failed

Hi,

In the JDO specification, we can find :
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass,
                                             java.lang.String str)

This method returns an object id instance corresponding to the Class and 
String arguments. The String argument might have been the result of 
executing toString on an object id instance.

Parameters:
pcClass - the Class of the persistence-capable instance
str - the String form of the object id
Returns:
an instance of the object identity class


I stored the String form of an object id and then tried to rebuild an 
object id with the method  "newObjectIdInstance" on the Persistance Manager.
But it seems OJB doesn't support this feature. I get the following 
exception.
Any idea about it ?

Thanks.

------------------------
java.io.IOException: Not in GZIP format
         at 
java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:129)
         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:57)
         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
         at org.apache.ojb.broker.Identity.fromByteArray(Unknown Source)
         at 
org.apache.ojb.jdori.sql.OjbStoreManager.newObjectIdInstance(Unknown Source)
         at 
com.sun.jdori.common.PersistenceManagerImpl.newObjectIdInstance(Unknown 
Source)
         at 
com.sun.jdori.common.PersistenceManagerWrapper.newObjectIdInstance(Unknown 
Source)
         at ...
rethrown as org.apache.ojb.broker.PersistenceBrokerException: Not in 
GZIP format
         at org.apache.ojb.broker.Identity.fromByteArray(Unknown Source)
         at 
org.apache.ojb.jdori.sql.OjbStoreManager.newObjectIdInstance(Unknown Source)
         at 
com.sun.jdori.common.PersistenceManagerImpl.newObjectIdInstance(Unknown 
Source)
         at 
com.sun.jdori.common.PersistenceManagerWrapper.newObjectIdInstance(Unknown 
Source)
         at ...
Caused by: java.io.IOException: Not in GZIP format
         at 
java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:129)
         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:57)
         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:67)
         ... 18 more


-- 
Christophe Demarey,
Research engineer
OpenCCM project - http://www.objectweb.org/openccm
GOAL Team - CNRS/USTL/LIFL - http://www.lifl.fr/GOAL/
Universite des Sciences et Technologies de Lille
LIFL - UMR CNRS 8022- Batiment M3
59655 Villeneuve d'Ascq Cedex - FRANCE
Phone: +33 (0)32043 4728
Fax  : +33 (0)32043 6566


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org