Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » ArrayIndexOutOfBoundsException during XMI serialization with ASCII encoding
ArrayIndexOutOfBoundsException during XMI serialization with ASCII encoding [message #1014305] Mon, 25 February 2013 15:03 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 43
Registered: July 2009
Member
Hello,
I have a test using a ChangeRecorder with setRecordingTransientFeatures(false).
If I try to serialize the ChangeDescriptor, using ASCII encoding, I get this error:

java.lang.ArrayIndexOutOfBoundsException: 8192
	at org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:331)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1016)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:255)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:331)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1417)
    ...


I'm using the ecore.xmi version 2.8.

I don't think the error is related to the usage of ChangeRecorder at all.

The reason is that in class StringSegment, the BUFFER is set to 8192 bytes. In my scenario I have an array with more than 12000 bytes.
I'm not sure if this is an error that might not have been noticed so far (because it only occurs if the buffer is reached), or if this BUFFER was defined as a limit, and thus this is the intended behavior (I don't think so...).

Can anyone comment please? Should I create a bugzilla for this?
(Unfortunately I can't provide a test case for this, but I assume that it can easily be reproduced by setting a low buffer).

[Updated on: Mon, 25 February 2013 15:06]

Report message to a moderator

Re: ArrayIndexOutOfBoundsException when serialization the ChangeDescription from ChangeRecorder [message #1014363 is a reply to message #1014305] Mon, 25 February 2013 16:55 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 26215
Registered: July 2009
Senior Member
Silvestre,

Yes, please open a bugzilla with a test case.


On 25/02/2013 4:03 PM, Silvestre Martins wrote:
>
> I have a test using a ChangeRecorder with
> setRecordingTransientFeatures(false).
> If I try to serialize the ChangeDescriptor, using ASCII encoding, I
> get this error:
>
> java.lang.ArrayIndexOutOfBoundsException: 8192
> at
> org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:331)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1016)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:255)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:331)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1417)
> ...
>
> I'm using the ecore.xmi version 2.8.
>
> I don't think the error is related to the usage of ChangeRecorder at all.
>
> The reason is that the BUFFER is set to 8192 bytes. In my scenario I
> have an array with more than 12000 bytes.
> I'm not sure if this is an error that might not have been noticed so
> far (because it only occurs if the buffer is reached), or if this
> BUFFER was defined as a limit, and thus this is the intended behavior
> (I don't think so...).
>
> Can anyone comment? Should I create a bugzilla for this?
> (Unfortunately I can't provide a test case for this, but I assume that
> it can easily be reproduced by setting a low buffer).
>
>
Previous Topic:[CDO/Hibernate] Unable to read xml
Next Topic:Enabling EcorePlugin.ExtensionProcessor processing
Goto Forum:
  


Current Time: Sun Nov 23 18:54:12 GMT 2014

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

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