openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <cmoulli...@gmail.com>
Subject EOFException during UUID deserialize
Date Tue, 28 Feb 2012 08:26:14 GMT
Hi,

I get the following exception with OpenJPA 2.1.1 deserialize a UUID Type
from a H2 Database. IS there a trick ?

Caused by: java.io.EOFException
	at
java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
[classes.jar:1.6.0_29]
	at
java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(ObjectInputStream.java:3018)
[classes.jar:1.6.0_29]
	at
java.io.ObjectInputStream$BlockDataInputStream.readUTF(ObjectInputStream.java:2819)
[classes.jar:1.6.0_29]
	at java.io.ObjectInputStream.readUTF(ObjectInputStream.java:1050)
[classes.jar:1.6.0_29]
	at java.io.ObjectStreamClass.readNonProxy(ObjectStreamClass.java:616)
[classes.jar:1.6.0_29]
	at
java.io.ObjectInputStream.readClassDescriptor(ObjectInputStream.java:808)
[classes.jar:1.6.0_29]
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1564)
[classes.jar:1.6.0_29]
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
[classes.jar:1.6.0_29]
	at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
[classes.jar:1.6.0_29]
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
[classes.jar:1.6.0_29]
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
[classes.jar:1.6.0_29]
	at org.apache.openjpa.util.Serialization.deserialize(Serialization.java:86)
[openjpa-all-2.1.1.jar:2.1.1]

Model

@Entity
@Table(name = "T_REQUEST")
@NamedQueries({
        @NamedQuery(
                name = "findRequestById",
                query = "SELECT req FROM Request req WHERE req.id = :id"
        ),
        @NamedQuery(
                name = "findAllRequests",
                query = "SELECT req FROM Request req"
        )
})
public class Request implements java.io.Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "REQUEST_ID")
    private Long id;

    @Column(name = "TRACKING_ID")
    @Transient
    private UUID trackingId;

....

DB Script 

CREATE TABLE PUBLIC.T_REQUEST (
    REQUEST_ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT
NULL PRIMARY KEY,
    REQUESTER VARCHAR(50),
    TRACKING_ID UUID,
    STATUS_APP1 VARCHAR(10),
    STATUS_APP2 VARCHAR(10),
    DESCRIPTION VARCHAR(50),
    REPLY_TO VARCHAR(70),
    CREATION_DATE TIMESTAMP,
    MODIFICATION_DATE TIMESTAMP
);

Regards,

Charles

--
View this message in context: http://openjpa.208410.n2.nabble.com/EOFException-during-UUID-deserialize-tp7324828p7324828.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message