Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » reading Clobs in eclipselink(odd error)
reading Clobs in eclipselink [message #1844484] Wed, 15 September 2021 01:12 Go to next message
Dave Brosius is currently offline Dave BrosiusFriend
Messages: 34
Registered: July 2009
Member
My Entity has a field defined as

@Lob
@Basic(fetch=FetchType.LAZY)
@Column(name = "TEMPLATE", nullable = false)
@Override
public Clob getTemplate() {
return template;
}

with this field, i can create a clob and attach it to a new row successfully. using eclipselink jpa. I can see it in the database, correctly.

However when i load the row, and fetch the clob, thru

Clob templateClob = report.getTemplate();

i get

Exception [EclipseLink-33] (Eclipse Persistence Services - 2.7.8.v20201217-ecdf3c32c4): org.eclipse.persistence.exceptions.DescriptorException
[java] Exception Description: Trying to invoke [setTemplate] on the object with the value [{"margin":0.0,"repeatHeader":false}]. The number of actual and formal parameters differs, or an unwrapping conversion has failed.
[java] Internal Exception: java.lang.IllegalArgumentException: argument type mismatch
[java] Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[template-->REPORT.TEMPLATE]
[java] Descriptor: RelationalDescriptor(com.acme.filereport.service.jpa.entity.ReportEO --> [DatabaseTable(REPORT)])


Anyone know what i'm doing wrong?


Re: reading Clobs in eclipselink [message #1848678 is a reply to message #1844484] Mon, 13 December 2021 18:06 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 8
Registered: December 2021
Junior Member
Try using a String instead of a Clob for the template type.
Previous Topic:P2 Repository for Eclipselink 3.0.2
Next Topic:Strange behavior of property eclipselink.jdbc.batch-writing
Goto Forum:
  


Current Time: Fri Oct 07 08:36:29 GMT 2022

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

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

Back to the top