[Qvto] Error saving [message #632053] |
Mon, 11 October 2010 11:39 |
Christophe Bouhier 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 |
Sergey Boyko 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 |
Ed Willink Messages: 7655 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
|
|
|
Powered by
FUDForum. Page generated in 0.02700 seconds