Re: Issue java.io.StreamCorruptedException

2020-11-03 Thread Andrus Adamchik
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

Re: Issue java.io.StreamCorruptedException

2020-11-01 Thread Giuseppe De Rosa
Ok, the modeler now changed generated classes: public void setRequestSd(CharType requestSd) { writeProperty(REQUEST_SD, requestSd); } public CharType getRequestSd() { return (CharType)readProperty(REQUEST_SD); } Now how to convert a String that I want to store in a CharType? On

Re: Issue java.io.StreamCorruptedException

2020-11-01 Thread Amedeo Mantica
No. Never edit the generated classes. You can set the mapped class in the modeler. Sent from my iPhone > On 1 Nov 2020, at 14:30, Giuseppe De Rosa wrote: > > So I need to modify the generated class, right? Actually for clob field I > have this situation: > > public void setRequest(String

Re: Issue java.io.StreamCorruptedException

2020-11-01 Thread Giuseppe De Rosa
So I need to modify the generated class, right? Actually for clob field I have this situation: public void setRequest(String request) { writeProperty(REQUEST, request); } public String getRequest() { return (String)readProperty(REQUEST); } How to change it? On 2020/10/31 15:33:57,

Re: Issue java.io.StreamCorruptedException

2020-10-31 Thread Amedeo Mantica
I guess you should map it as org.apache.cayenne.access.types.CharType Amedeo > On 31 Oct 2020, at 15:51, Giuseppe De Rosa wrote: > > I'm trying to make a simple select query but receive this error: > > java.io.StreamCorruptedException: invalid stream header: 78780A1F > at

Issue java.io.StreamCorruptedException

2020-10-31 Thread Giuseppe De Rosa
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.