Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Teneo/EclipseLink/EMF/Blob
Teneo/EclipseLink/EMF/Blob [message #634738] Fri, 22 October 2010 21:44 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Hello community,

i use EMF with Teneo and EclipseLink.
I try to annotate an EByteArray as a Blob, but it doesn't work.
Iam working with the EMF ecore dialog. I select my EByteArray Attribute an switch in the Property Annotation View. I add a new annotation source = teneo.jpa and entry key = "appinfo" value = "@Lob @Column(length=50000)".

Follow error occours if i try to save the object
Caused by: ERROR 22001: A truncation error was encountered trying to shrink BLOB '(Binary data value not displayed)' to length 50000.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.types.SQLBinary.checkHostVariable(Unknown Source)
	at org.apache.derby.exe.acf81e0010x012bxd5bexc8d5x00000071b5605.e0(Unknown Source)
	at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown Source)
	at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown Source)
	at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown Source)
	at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown Source)
	at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
	... 89 more


Whats wrong with my annotation? Or is it a Derby Problem?
Re: Teneo/EclipseLink/EMF/Blob [message #634776 is a reply to message #634738] Sat, 23 October 2010 12:26 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
How large is your blob (larger than 50000)?

Does the orm indeed contain the correct column length?

gr. Martin
Re: Teneo/EclipseLink/EMF/Blob [message #635137 is a reply to message #634776] Mon, 25 October 2010 17:40 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Sorry i described the problem wrong.
The column sitze was 1MB... @Lob @Column(length=1048576). But in the orm.xml it was always 50.000. I have done a clean and refresh in eclipse and now it works =)
Previous Topic:Teneo/EclipseLink/EMF find Object
Next Topic:Update site for your EMF 2.7 milestone builds?
Goto Forum:
  


Current Time: Sun Nov 17 15:44:28 GMT 2019

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

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

Back to the top