Issue java.io.StreamCorruptedException

Giuseppe De Rosa <[email protected]>
Newsgroups gmane.comp.java.cayenne.user
Message-ID <pony-f0f51255567a554a98aa9c817ec57843e0a70a11-774065dffa29c62d86c718f0eb263a3b75a1e427@user.cayenne.apache.org>
I'm trying to make a simple select query but receive this error:

java.io.StreamCorruptedException: invalid stream header: 78780A1F 
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:857)

In datamap I have a db-attribute of type CLOB that I want read as a simple String.

<db-entity name="DISC">
        <db-attribute name="DATE" type="TIMESTAMP" isMandatory="true" length="7"/>
        <db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/>
        <db-attribute name="FLAG" type="VARCHAR" isMandatory="true"/>
        <db-attribute name="REQUEST" type="CLOB" isMandatory="false"/>
        <db-key-generator>
            <db-generator-type>ORACLE</db-generator-type>
            <db-generator-name>DISC_SEQ</db-generator-name>
            <db-key-cache-size>1</db-key-cache-size>
        </db-key-generator>
</db-entity>
<obj-entity name="Disc" className="it.pack.dao.Disc" dbEntityName="DISC">
        <obj-attribute name="date" type="java.time.LocalDateTime" db-attribute-path="DATE"/>
        <obj-attribute name="id" type="java.lang.Integer" db-attribute-path="ID"/>
        <obj-attribute name="flag" type="java.lang.String" db-attribute-path="FLAG"/>
        <obj-attribute name="request" type="java.lang.String" db-attribute-path="REQUEST"/>
</obj-entity>

I think that CLOB cannot map to java.lang.String but how can I read it?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.