Hi Craig,
Because the default value is 255 which doesn't apply to CLOB, however, it
doesn't make any different if don't define it.
Here's from Kodo KB:
A normal string field was mapped to an Oracle CLOB type. Oracle requires
special handling for CLOBs. Ensure that the column for this field specifies
a jdbc-type of clob or a length of -1.
-Frank
Craig L Russell wrote:
>
> Hi Frank,
>
> The thing that jumps out at me is the length. What did you intend -1
> to mean? This should be the maximum length of data stored in the
> column and really needs to be a good application-specific value.
>
> Craig
>
> On Sep 12, 2007, at 10:51 AM, frankca wrote:
>
>>
>> Hi,
>>
>> Does anyone run into this error:
>> exception is <openjpa-1.0.0-r420667:568756 fatal user error>
>> org.apache.openjpa.persistence.ArgumentException:
>> "com.inxight.mdr.dao.model.Sentence.text" declares a column that is
>> not
>> compatible with the expected type "clob". Column details:
>> Full Name: sentence.text
>> Type: integer
>> Size: 0
>> Default: null
>> Not Null: true
>>
>> Here's my persistence class:
>> @javax.persistence.Entity
>> @Table(name = "sentence")
>> public class Sentence implements Serializable {
>> // ...
>> @Lob
>> @Column(name = "text", length = -1, nullable = false)
>> private String text;
>> }
>>
>>
>> OpenJPA 1.0.0
>> Oracle XE 10G R2
>>
>> TIA,
>> Frank
>>
>> --
>> View this message in context: http://www.nabble.com/ERROR%3A-
>> declares-a-column-that-is-not-compatible-with-the-expected-type-%
>> 22clob%22-tf4431073.html#a12640914
>> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>>
>
> Craig Russell
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
> 408 276-5638 mailto:[EMAIL PROTECTED]
> P.S. A good JDO? O, Gasp!
>
>
>
>
--
View this message in context:
http://www.nabble.com/ERROR%3A-declares-a-column-that-is-not-compatible-with-the-expected-type-%22clob%22-tf4431073.html#a12641307
Sent from the OpenJPA Users mailing list archive at Nabble.com.