Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Issues with uploading CLobs in non 1-byte encoding
[CDO] Issues with uploading CLobs in non 1-byte encoding [message #1389157] Fri, 27 June 2014 12:15 Go to next message
Leonid Ripeynih is currently offline Leonid RipeynihFriend
Messages: 150
Registered: February 2012
Senior Member
Hi!

I've discovered a problem in CDO Clob handling:

here is the code, which is located in org.eclipse.emf.cdo.spi.server.StoreAccessor:

writeClob(id, -size, new InputStreamReader(new LimitedInputStream(in, -size)));


Next, in org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeClob(byte[], long, Reader)

stmt.setCharacterStream(3, reader, (int)size);


Code in StoreAccessor implies, that the amount of chars (passed to setCharactedStream) is equal to number of bytes passed to LimitedInputStream.

That leads to commit exceptions, whenever text in non-ascii encoding is submited.
Also, i've noticed that there is no encoding passed to InputStreamReader constructor, which means that encoding is platform-dependant, which can easily lead to more issues in future.
Re: [CDO] Issues with uploading CLobs in non 1-byte encoding [message #1390969 is a reply to message #1389157] Mon, 30 June 2014 08:45 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Leonid,

Could you raise a bugzilla with a Gerrit patch-set containing a JUnit
test to reproduce your issues.

Best Regards.

Le 27/06/2014 14:15, Leonid Ripeynih a écrit :
> Hi!
>
> I've discovered a problem in CDO Clob handling:
>
> here is the code, which is located in
> org.eclipse.emf.cdo.spi.server.StoreAccessor:
>
>
> writeClob(id, -size, new InputStreamReader(new LimitedInputStream(in,
> -size)));
>
>
> Next, in
> org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeClob(byte[],
> long, Reader)
>
>
> stmt.setCharacterStream(3, reader, (int)size);
>
>
> Code in StoreAccessor implies, that the amount of chars (passed to
> setCharactedStream) is equal to number of bytes passed to
> LimitedInputStream.
>
> That leads to commit exceptions, whenever text in non-ascii encoding is
> submited. Also, i've noticed that there is no encoding passed to
> InputStreamReader constructor, which means that encoding is
> platform-dependant, which can easily lead to more issues in future.
Previous Topic:[CDO] CDOServerExporter Out of memory exception
Next Topic:Xcore and FeatureMaps
Goto Forum:
  


Current Time: Tue Apr 23 15:56:05 GMT 2024

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

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

Back to the top