Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [Qvto] Error saving
[Qvto] Error saving [message #632053] Mon, 11 October 2010 11:39 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Hi,

I have an error creating my target resource when Qvto runs:
It boils down to this exception. This transformation used to work nicely
until some refactoring of the model and plugins. How do I know which
object this exception relates to? Could I somehow run the
transformation in debug mode?

Caused by:
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBounds Exception:
index=0, size=0
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 52)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObjects(X MLSaveImpl.java:751)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:592)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)


My resource factory options are:


public Resource createResource(URI uri) {
XMLResource result = new NetxstudioResourceImpl(uri);

result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA, Boolean.TRUE);

result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA, Boolean.TRUE);

result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD _UNKNOWN_FEATURE,
Boolean.TRUE);
result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA _LOCATION,
Boolean.TRUE);


result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
Boolean.TRUE);

result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
Boolean.TRUE);


result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LE XICAL_HANDLER,
Boolean.TRUE);
return result;
}

Thx Christophe
Re: [Qvto] Error saving [message #632562 is a reply to message #632053] Wed, 13 October 2010 12:40 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Hi Christophe,

Exception you mentioned is EMF-related. QVTo engine performs
transformation and then delegates to EMF resource for saving results.

There's nothing from QVTo side we can do to make such errors clearer.

Regards,
Sergey

Christophe Bouhier wrote:
> Hi,
>
> I have an error creating my target resource when Qvto runs:
> It boils down to this exception. This transformation used to work nicely
> until some refactoring of the model and plugins. How do I know which
> object this exception relates to? Could I somehow run the
> transformation in debug mode?
>
> Caused by:
> org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBounds Exception:
> index=0, size=0
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 52)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObjects(X MLSaveImpl.java:751)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:592)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)
>
>
> My resource factory options are:
>
>
> public Resource createResource(URI uri) {
> XMLResource result = new NetxstudioResourceImpl(uri);
>
> result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA,
> Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA,
> Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD _UNKNOWN_FEATURE,
> Boolean.TRUE);
>
> result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA _LOCATION,
> Boolean.TRUE);
>
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
> Boolean.TRUE);
>
> result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
> Boolean.TRUE);
>
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LE XICAL_HANDLER,
> Boolean.TRUE);
> return result;
> }
>
> Thx Christophe
Re: [Qvto] Error saving [message #632642 is a reply to message #632053] Wed, 13 October 2010 17:03 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6388
Registered: July 2009
Senior Member
Hi Christophe

QVTo works beautifully in JDT debug mode.

NB. If you just run Debug-> QVTo transformation that gives the QVTo
debugger.

To use the JDT debugger, run a Debug->Eclipse to invoke a nested Eclipse
import relevant projects and run QVTo.

However a 0/0 BIOOBE is slightly suspicious. Are you sure you
rebuilt/regenmodelled/restarted everything after 'refactoring'.
Have you checked that your models validate?

Regards

Ed Willink


On 11/10/2010 12:39, Christophe Bouhier wrote:
> Hi,
>
> I have an error creating my target resource when Qvto runs:
> It boils down to this exception. This transformation used to work nicely
> until some refactoring of the model and plugins. How do I know which
> object this exception relates to? Could I somehow run the transformation
> in debug mode?
>
> Caused by:
> org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBounds Exception:
> index=0, size=0
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:3 52)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObjects(X MLSaveImpl.java:751)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveI mpl.java:592)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl. java:256)
>
>
> My resource factory options are:
>
>
> public Resource createResource(URI uri) {
> XMLResource result = new NetxstudioResourceImpl(uri);
> result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA, Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTEND ED_META_DATA, Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD _UNKNOWN_FEATURE,
> Boolean.TRUE);
> result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA _LOCATION,
> Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
> Boolean.TRUE);
> result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_EN CODED_ATTRIBUTE_STYLE,
> Boolean.TRUE);
>
> result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LE XICAL_HANDLER,
> Boolean.TRUE);
> return result;
> }
>
> Thx Christophe
Previous Topic:[ATL] Bug in stack handling in 3.1.1?
Next Topic:[ATL] a working example of a programmatic launch
Goto Forum:
  


Current Time: Sun Jun 16 06:34:30 GMT 2019

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

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

Back to the top