You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by saravanan_tvm <sk...@yahoo.com> on 2007/07/26 10:40:12 UTC
Problem with clob data type in JPA
Hi,
By including one clob column i am facing below problem.
This is my code present in the entity for clob column...
@Lob
@Basic(fetch = FetchType.EAGER )
@Column(name="FIELD_DATA")
private Clob customData;
Can anybody tell me how to solve this problem?
Exception [TOPLINK-32] (Oracle TopLink Essentials - 2.0 (Build b48-beta3
(05/23/
2007))): oracle.toplink.essentials.exceptions.DescriptorException
Exception Description: Trying to set value [It is old drug] for instance
variabl
e [customData] of type [java.sql.Clob] in the object. The specified object
is n
ot an instance of the class or interface declaring the underlying field, or
an u
nwrapping conversion has failed.
Internal Exception: java.lang.IllegalArgumentException
--
View this message in context: http://www.nabble.com/Problem-with-clob-data-type-in-JPA-tf4150168.html#a11806438
Sent from the OpenJPA Developers mailing list archive at Nabble.com.
Re: Problem with clob data type in JPA
Posted by saravanan_tvm <sk...@yahoo.com>.
Thanks yar that problem is solved...
saravanan_tvm wrote:
>
> Thanks for your reply...
> Ya i am using toplink only....
> As you told i can declare that field as string data type but i am going to
> store the value of the property in clob column .
>
> Regards,
> Saravanan.
>
>
> Marc Prud'hommeaux wrote:
>>
>>
>> From the error message, it looks like your first problem is that you
>> are using TopLink, and not OpenJPA :)
>>
>> That being said, I don't think that OpenJPA natively supports fields
>> of type Clob. Why not just make it a String field and annotate it
>> with @Lob? Is there some reason the field needs to be of type Clob?
>>
>>
>> On Jul 26, 2007, at 1:40 AM, saravanan_tvm wrote:
>>
>>>
>>>
>>> Hi,
>>>
>>> By including one clob column i am facing below problem.
>>> This is my code present in the entity for clob column...
>>> @Lob
>>> @Basic(fetch = FetchType.EAGER )
>>> @Column(name="FIELD_DATA")
>>> private Clob customData;
>>>
>>> Can anybody tell me how to solve this problem?
>>>
>>>
>>> Exception [TOPLINK-32] (Oracle TopLink Essentials - 2.0 (Build b48-
>>> beta3
>>> (05/23/
>>> 2007))): oracle.toplink.essentials.exceptions.DescriptorException
>>> Exception Description: Trying to set value [It is old drug] for
>>> instance
>>> variabl
>>> e [customData] of type [java.sql.Clob] in the object. The
>>> specified object
>>> is n
>>> ot an instance of the class or interface declaring the underlying
>>> field, or
>>> an u
>>> nwrapping conversion has failed.
>>> Internal Exception: java.lang.IllegalArgumentException
>>> --
>>> View this message in context: http://www.nabble.com/Problem-with-
>>> clob-data-type-in-JPA-tf4150168.html#a11806438
>>> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>>>
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Problem-with-clob-data-type-in-JPA-tf4150168.html#a11807770
Sent from the OpenJPA Developers mailing list archive at Nabble.com.
Re: Problem with clob data type in JPA
Posted by saravanan_tvm <sk...@yahoo.com>.
Thanks for your reply...
Ya i am using toplink only....
As you told i can declare that field as string data type but i am going to
store the value of the property in clob column .
Regards,
Saravanan.
Marc Prud'hommeaux wrote:
>
>
> From the error message, it looks like your first problem is that you
> are using TopLink, and not OpenJPA :)
>
> That being said, I don't think that OpenJPA natively supports fields
> of type Clob. Why not just make it a String field and annotate it
> with @Lob? Is there some reason the field needs to be of type Clob?
>
>
> On Jul 26, 2007, at 1:40 AM, saravanan_tvm wrote:
>
>>
>>
>> Hi,
>>
>> By including one clob column i am facing below problem.
>> This is my code present in the entity for clob column...
>> @Lob
>> @Basic(fetch = FetchType.EAGER )
>> @Column(name="FIELD_DATA")
>> private Clob customData;
>>
>> Can anybody tell me how to solve this problem?
>>
>>
>> Exception [TOPLINK-32] (Oracle TopLink Essentials - 2.0 (Build b48-
>> beta3
>> (05/23/
>> 2007))): oracle.toplink.essentials.exceptions.DescriptorException
>> Exception Description: Trying to set value [It is old drug] for
>> instance
>> variabl
>> e [customData] of type [java.sql.Clob] in the object. The
>> specified object
>> is n
>> ot an instance of the class or interface declaring the underlying
>> field, or
>> an u
>> nwrapping conversion has failed.
>> Internal Exception: java.lang.IllegalArgumentException
>> --
>> View this message in context: http://www.nabble.com/Problem-with-
>> clob-data-type-in-JPA-tf4150168.html#a11806438
>> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>>
>
>
>
--
View this message in context: http://www.nabble.com/Problem-with-clob-data-type-in-JPA-tf4150168.html#a11807482
Sent from the OpenJPA Developers mailing list archive at Nabble.com.
Re: Problem with clob data type in JPA
Posted by Marc Prud'hommeaux <mp...@apache.org>.
From the error message, it looks like your first problem is that you
are using TopLink, and not OpenJPA :)
That being said, I don't think that OpenJPA natively supports fields
of type Clob. Why not just make it a String field and annotate it
with @Lob? Is there some reason the field needs to be of type Clob?
On Jul 26, 2007, at 1:40 AM, saravanan_tvm wrote:
>
>
> Hi,
>
> By including one clob column i am facing below problem.
> This is my code present in the entity for clob column...
> @Lob
> @Basic(fetch = FetchType.EAGER )
> @Column(name="FIELD_DATA")
> private Clob customData;
>
> Can anybody tell me how to solve this problem?
>
>
> Exception [TOPLINK-32] (Oracle TopLink Essentials - 2.0 (Build b48-
> beta3
> (05/23/
> 2007))): oracle.toplink.essentials.exceptions.DescriptorException
> Exception Description: Trying to set value [It is old drug] for
> instance
> variabl
> e [customData] of type [java.sql.Clob] in the object. The
> specified object
> is n
> ot an instance of the class or interface declaring the underlying
> field, or
> an u
> nwrapping conversion has failed.
> Internal Exception: java.lang.IllegalArgumentException
> --
> View this message in context: http://www.nabble.com/Problem-with-
> clob-data-type-in-JPA-tf4150168.html#a11806438
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>