Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException
[Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #92730] Wed, 08 August 2007 13:33 Go to next message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hello Martin,

I am trying to import content into DB2 database from an xml file.
I initialize jpoxDataStore, then create resource to handle things.

Here is the exception :

Exception in thread "main" java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at org.jpox.store.OID.<init>(OID.java:105)
at
org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
at
org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
at
org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
at
org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
at
org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
at
org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
at org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
at
org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
at
org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
at
org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
at DatastoreInstall.importCars(DatastoreInstall.java:116)
at DatastoreInstall.init(DatastoreInstall.java:37)
at DatastoreInstall.main(DatastoreInstall.java:127)



I made a small testcase. I would be nice if you could take a look on it.
I have sent on your mail all the files that you should need.

Regards,

Quentin
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #92745 is a reply to message #92730] Wed, 08 August 2007 13:59 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Quentin,
Okay, I will look at it this evening.

gr. Martin

french.cancan wrote:
> Hello Martin,
>
> I am trying to import content into DB2 database from an xml file.
> I initialize jpoxDataStore, then create resource to handle things.
>
> Here is the exception :
>
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
> at java.lang.String.substring(String.java:1088)
> at org.jpox.store.OID.<init>(OID.java:105)
> at
> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
> at DatastoreInstall.importCars(DatastoreInstall.java:116)
> at DatastoreInstall.init(DatastoreInstall.java:37)
> at DatastoreInstall.main(DatastoreInstall.java:127)
>
>
>
> I made a small testcase. I would be nice if you could take a look on it.
> I have sent on your mail all the files that you should need.
>
> Regards,
>
> Quentin


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #92852 is a reply to message #92730] Thu, 09 August 2007 04:51 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Quentin,
Thanks for the testcase it really facilitated finding this issue. There is a bug in the
StoreResource class in Teneo. I have solved this and checked it in. I hoped to get a new release out
this week but I am not sure if I can manage that.
As a workaround In the mean time you can create your own resource class by extending JpoxResource
and overriding the attached method with the method below.

The correct attached method is:
public void attached(EObject eObject) {
attachedHelper(eObject);
for (Iterator<EObject> tree = getNonResolvingContent(eObject).basicIterator(); tree.hasNext();) {
final Object obj = tree.next();
// before this called:
// attachedHelper((EObject) obj);
// however this resulted in child elements (which were loaded) not being
// added to the internal id map
attached((EObject) obj);
}
}

Can you also create a bugzilla for this and attach the testcases you send me? Then I can add your
testcases to the teneo test set.

gr. Martin


french.cancan wrote:
> Hello Martin,
>
> I am trying to import content into DB2 database from an xml file.
> I initialize jpoxDataStore, then create resource to handle things.
>
> Here is the exception :
>
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
> at java.lang.String.substring(String.java:1088)
> at org.jpox.store.OID.<init>(OID.java:105)
> at
> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
> at DatastoreInstall.importCars(DatastoreInstall.java:116)
> at DatastoreInstall.init(DatastoreInstall.java:37)
> at DatastoreInstall.main(DatastoreInstall.java:127)
>
>
>
> I made a small testcase. I would be nice if you could take a look on it.
> I have sent on your mail all the files that you should need.
>
> Regards,
>
> Quentin


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #92867 is a reply to message #92852] Thu, 09 August 2007 08:30 Go to previous message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hi,

The bugzilla is created.

regards

Martin Taal wrote:
> Hi Quentin,
> Thanks for the testcase it really facilitated finding this issue. There
> is a bug in the StoreResource class in Teneo. I have solved this and
> checked it in. I hoped to get a new release out this week but I am not
> sure if I can manage that.
> As a workaround In the mean time you can create your own resource class
> by extending JpoxResource and overriding the attached method with the
> method below.
>
> The correct attached method is:
> public void attached(EObject eObject) {
> attachedHelper(eObject);
> for (Iterator<EObject> tree =
> getNonResolvingContent(eObject).basicIterator(); tree.hasNext();) {
> final Object obj = tree.next();
> // before this called:
> // attachedHelper((EObject) obj);
> // however this resulted in child elements (which were
> loaded) not being
> // added to the internal id map
> attached((EObject) obj);
> }
> }
>
> Can you also create a bugzilla for this and attach the testcases you
> send me? Then I can add your testcases to the teneo test set.
>
> gr. Martin
>
>
> french.cancan wrote:
>> Hello Martin,
>>
>> I am trying to import content into DB2 database from an xml file.
>> I initialize jpoxDataStore, then create resource to handle things.
>>
>> Here is the exception :
>>
>> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
>> at java.lang.String.substring(String.java:1088)
>> at org.jpox.store.OID.<init>(OID.java:105)
>> at
>> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>>
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>>
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
>> at DatastoreInstall.importCars(DatastoreInstall.java:116)
>> at DatastoreInstall.init(DatastoreInstall.java:37)
>> at DatastoreInstall.main(DatastoreInstall.java:127)
>>
>>
>>
>> I made a small testcase. I would be nice if you could take a look on it.
>> I have sent on your mail all the files that you should need.
>>
>> Regards,
>>
>> Quentin
>
>
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #609433 is a reply to message #92730] Wed, 08 August 2007 13:59 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Quentin,
Okay, I will look at it this evening.

gr. Martin

french.cancan wrote:
> Hello Martin,
>
> I am trying to import content into DB2 database from an xml file.
> I initialize jpoxDataStore, then create resource to handle things.
>
> Here is the exception :
>
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
> at java.lang.String.substring(String.java:1088)
> at org.jpox.store.OID.<init>(OID.java:105)
> at
> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
> at DatastoreInstall.importCars(DatastoreInstall.java:116)
> at DatastoreInstall.init(DatastoreInstall.java:37)
> at DatastoreInstall.main(DatastoreInstall.java:127)
>
>
>
> I made a small testcase. I would be nice if you could take a look on it.
> I have sent on your mail all the files that you should need.
>
> Regards,
>
> Quentin


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #609440 is a reply to message #92730] Thu, 09 August 2007 04:51 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Quentin,
Thanks for the testcase it really facilitated finding this issue. There is a bug in the
StoreResource class in Teneo. I have solved this and checked it in. I hoped to get a new release out
this week but I am not sure if I can manage that.
As a workaround In the mean time you can create your own resource class by extending JpoxResource
and overriding the attached method with the method below.

The correct attached method is:
public void attached(EObject eObject) {
attachedHelper(eObject);
for (Iterator<EObject> tree = getNonResolvingContent(eObject).basicIterator(); tree.hasNext();) {
final Object obj = tree.next();
// before this called:
// attachedHelper((EObject) obj);
// however this resulted in child elements (which were loaded) not being
// added to the internal id map
attached((EObject) obj);
}
}

Can you also create a bugzilla for this and attach the testcases you send me? Then I can add your
testcases to the teneo test set.

gr. Martin


french.cancan wrote:
> Hello Martin,
>
> I am trying to import content into DB2 database from an xml file.
> I initialize jpoxDataStore, then create resource to handle things.
>
> Here is the exception :
>
> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
> at java.lang.String.substring(String.java:1088)
> at org.jpox.store.OID.<init>(OID.java:105)
> at
> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>
> at
> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
> at
> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>
> at
> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
> at DatastoreInstall.importCars(DatastoreInstall.java:116)
> at DatastoreInstall.init(DatastoreInstall.java:37)
> at DatastoreInstall.main(DatastoreInstall.java:127)
>
>
>
> I made a small testcase. I would be nice if you could take a look on it.
> I have sent on your mail all the files that you should need.
>
> Regards,
>
> Quentin


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Re: [Teneo / JPOX] java.lang.StringIndexOutOfBoundsException [message #609441 is a reply to message #92852] Thu, 09 August 2007 08:30 Go to previous message
Eclipse UserFriend
Originally posted by: fc_supercanard.yahoo.fr

Hi,

The bugzilla is created.

regards

Martin Taal wrote:
> Hi Quentin,
> Thanks for the testcase it really facilitated finding this issue. There
> is a bug in the StoreResource class in Teneo. I have solved this and
> checked it in. I hoped to get a new release out this week but I am not
> sure if I can manage that.
> As a workaround In the mean time you can create your own resource class
> by extending JpoxResource and overriding the attached method with the
> method below.
>
> The correct attached method is:
> public void attached(EObject eObject) {
> attachedHelper(eObject);
> for (Iterator<EObject> tree =
> getNonResolvingContent(eObject).basicIterator(); tree.hasNext();) {
> final Object obj = tree.next();
> // before this called:
> // attachedHelper((EObject) obj);
> // however this resulted in child elements (which were
> loaded) not being
> // added to the internal id map
> attached((EObject) obj);
> }
> }
>
> Can you also create a bugzilla for this and attach the testcases you
> send me? Then I can add your testcases to the teneo test set.
>
> gr. Martin
>
>
> french.cancan wrote:
>> Hello Martin,
>>
>> I am trying to import content into DB2 database from an xml file.
>> I initialize jpoxDataStore, then create resource to handle things.
>>
>> Here is the exception :
>>
>> Exception in thread "main" java.lang.StringIndexOutOfBoundsException
>> at java.lang.String.substring(String.java:1088)
>> at org.jpox.store.OID.<init>(OID.java:105)
>> at
>> org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate_UniqueI D(EObjectValidator.java:1095)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate_EveryDe faultConstraint(EObjectValidator.java:195)
>>
>> at
>> org.eclipse.emf.ecore.util.EObjectValidator.validate(EObject Validator.java:168)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:127)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.teneo.resource.NonLoadingDiagnostician.doVal idateContents(NonLoadingDiagnostician.java:49)
>>
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:130)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:107)
>> at
>> org.eclipse.emf.ecore.util.Diagnostician.validate(Diagnostic ian.java:87)
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.validateObject( StoreResource.java:421)
>>
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.validateContent s(StoreResource.java:408)
>>
>> at
>> org.eclipse.emf.teneo.resource.StoreResource.save(StoreResou rce.java:353)
>> at DatastoreInstall.importCars(DatastoreInstall.java:116)
>> at DatastoreInstall.init(DatastoreInstall.java:37)
>> at DatastoreInstall.main(DatastoreInstall.java:127)
>>
>>
>>
>> I made a small testcase. I would be nice if you could take a look on it.
>> I have sent on your mail all the files that you should need.
>>
>> Regards,
>>
>> Quentin
>
>
Previous Topic:[TENEO] Sequence generation problem
Next Topic:[TENEO] Sequence generation problem
Goto Forum:
  


Current Time: Tue Aug 09 11:59:59 GMT 2022

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

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

Back to the top