reading Clobs in eclipselink [message #1844484] |
Tue, 14 September 2021 21:12  |
Eclipse User |
|
|
|
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?
|
|
|
|
Powered by
FUDForum. Page generated in 0.63237 seconds