Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Internal Exception: Can not set Clob to String(Error occurs when listing table records containing a java.sql.Clob field)
Internal Exception: Can not set Clob to String [message #805268] Thu, 23 February 2012 15:06 Go to next message
David Mising name is currently offline David Mising nameFriend
Messages: 20
Registered: June 2010
Junior Member
Hi there,

I am building my work upon an ORM sample. When I added a Clob field to a table, I run into this internal exception trying to set Clob to a String. Does anyone get an idea of what's happening? Is there any config or setting I missed?

thanks,
David

This is a section of the EL log,

[EL Finer]: client acquired: 24474809
[EL Finer]: acquire unit of work: 18193932
[EL Finest]: Execute query ReadAllQuery(referenceClass=DocSet sql="SELECT t1.DOC_SET_ID, t1.CREATE_TIME, t1.DOMAIN, t1.KEY_WORDS, t1.LAST_MODIFIED, t1.STATE, t0.REV_NO, t0.CREATE_TIME, t0.DOC_NAME, t0.DOC_SOURCE, t0.DOC_TYPE, t0.MSG, t0.MSG_BODY, t0.DOC_SET_ID FROM DOCUMENT t0, DOCSET t1 WHERE (t0.DOC_SET_ID = t1.DOC_SET_ID) ORDER BY t1.DOC_SET_ID ASC")
[EL Finest]: Connection(3028159)--Connection acquired from connection pool [read].
[EL Fine]: Connection(3028159)--SELECT t1.DOC_SET_ID, t1.CREATE_TIME, t1.DOMAIN, t1.KEY_WORDS, t1.LAST_MODIFIED, t1.STATE, t0.REV_NO, t0.CREATE_TIME, t0.DOC_NAME, t0.DOC_SOURCE, t0.DOC_TYPE, t0.MSG, t0.MSG_BODY, t0.DOC_SET_ID FROM DOCUMENT t0, DOCSET t1 WHERE (t0.DOC_SET_ID = t1.DOC_SET_ID) ORDER BY t1.DOC_SET_ID ASC
[EL Finest]: Connection(3028159)--Connection released to connection pool [read].
[EL Warning]: Exception [EclipseLink-32] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Trying to set value [<xml>xml body 111111.1</xml>] for instance variable [message] of type [java.sql.Clob] in the object. The specified object is not an instance of the class or interface declaring the underlying field, or an unwrapping conversion has failed.
Internal Exception: java.lang.IllegalArgumentException: Can not set java.sql.Clob field model.Document.message to java.lang.String
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[message-->DOCUMENT.MSG]
Descriptor: RelationalDescriptor(model.Document --> [DatabaseTable(DOCUMENT)])
[EL Finest]: Begin undeploying Persistence Unit DocSet; session file:/C:/workspaceTopLink/MsgStoreSandboxORM/bin/_DocSet; state Deployed; factoryCount 1
Re: Internal Exception: Can not set Clob to String [message #805351 is a reply to message #805268] Thu, 23 February 2012 16:59 Go to previous message
David Mising name is currently offline David Mising nameFriend
Messages: 20
Registered: June 2010
Junior Member
False alarm. Problem solved. Thanks.
Previous Topic:Bidirectional OneToOne Mapping Issue
Next Topic:Bidirectional relationship with orphan removal: NULL-Update to a NOT NULL Column
Goto Forum:
  


Current Time: Sun Nov 23 20:08:11 GMT 2014

Powered by FUDForum. Page generated in 0.01538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software