JAVA_OBJECT Problem with byte[64] and byte[0] array

"Klaus, Gerd" <[email protected]> Thu, 9 Feb 2006 15:08:51 +0100
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Hi All,

Table definition:

CREATE TABLE IF NOT EXISTS xyz (
    identifier  INTEGER NOT NULL PRIMARY KEY,
    parameter   JAVA_OBJECT);

Data in Table:
 identifier | parameter
 -----------+-------------
     1      | boolean[64]
     2      | byte[64]
     3      | int[64]
     4      | int[64]
     5      | boolean[64]
     6      | int[1]
     7      | byte[0][0]
     8      | byte[0]
     9      | int[0]
    10      | int[0]
    11      | boolean[0]
    12      | boolean[1]
    13      | boolean[1]

INSERT and UPDATE works fine with all 13 identifier.

READING data with "SELECT identifier,parameter FROM xyz ORDER BY
identifier ASC;" also. But if I try to read the 'parameter' column with
"ResultSet.getObject(2)" after a the SELECT, an exception at
'identifier' 2 and 8 is thrown:

Exception at identifier 2:
Exception in thread "main" java.lang.Error: De-serialization error:
invalid stream header
   at
com.mckoi.database.global.ObjectTranslator.deserialize(ObjectTranslator.
java:107)
   at
com.mckoi.database.jdbc.MResultSet.getRawColumn(MResultSet.java:592)
   at com.mckoi.database.jdbc.MResultSet.getObject(MResultSet.java:1105)
   at
mmr.DB.statements.DbAlarmBrdSer.getParameters(DbAlarmBrdSer.java:97)
   at mmr.MIDAS.loadAlarmBrdDat(MIDAS.java:1052)
   at mmr.MIDAS.main(MIDAS.java:692)
        
Exception at identifier 8:
Exception in thread "main" java.lang.Error: De-serialization error: null
   at
com.mckoi.database.global.ObjectTranslator.deserialize(ObjectTranslator.
java:107)
   at
com.mckoi.database.jdbc.MResultSet.getRawColumn(MResultSet.java:592)
   at com.mckoi.database.jdbc.MResultSet.getObject(MResultSet.java:1105)
   at
mmr.DB.statements.DbAlarmBrdSer.getParameters(DbAlarmBrdSer.java:102)
   at mmr.MIDAS.loadAlarmBrdDat(MIDAS.java:1052)
   at mmr.MIDAS.main(MIDAS.java:692)

Any ideas why the exceptions are thrown?


Best regards,

Gerd
------------------------------------------------------------------------------------------------
This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information.  
If you have received it in error, please notify the sender
immediately and delete the original.  Any unauthorized use of
this email is prohibited.
------------------------------------------------------------------------------------------------
[mf2]


---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to [email protected]