Hi there, I suspect this has nothing to do with CLOB and String. It may be other attributes. So a few questions:
1. What version of Cayenne is this? 2. Do you have a longer stack trace? 3. Could you check the logs preceding the exception for messages like "Haven't found suitable ExtendedType for class..." Andrus > On Oct 31, 2020, at 5:51 PM, Giuseppe De Rosa <giude...@gmail.com> wrote: > > 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?