Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EMC] CSV driver not writing rows
[EMC] CSV driver not writing rows [message #1332595] Sun, 04 May 2014 18:33 Go to next message
Martin Francis is currently offline Martin FrancisFriend
Messages: 1
Registered: May 2014
Location: London
Junior Member
Hi,

Using the latest CSV driver source I was creating a standalone application using ETL to transform contents from a plain XML model to a CSV model.

The CSV model has a header but was otherwise empty.

Then ETL attempted to persist the contents to the CSV file but it failed:

Exception in thread "main" java.util.NoSuchElementException
	at java.util.LinkedList.getFirst(Unknown Source)
	at org.eclipse.epsilon.emc.csv.CsvModel.createInstanceInModel(CsvModel.java:323)
	at org.eclipse.epsilon.emc.csv.CsvModel.createInstanceInModel(CsvModel.java:1)
	at org.eclipse.epsilon.eol.models.CachedModel.createInstance(CachedModel.java:117)
	at org.eclipse.epsilon.eol.types.EolModelElementType.createInstance(EolModelElementType.java:168)
	at org.eclipse.epsilon.etl.strategy.FastTransformationStrategy.transformModels(FastTransformationStrategy.java:121)
	at org.eclipse.epsilon.etl.EtlModule.execute(EtlModule.java:127)
	at example.EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:72)
	at example.EpsilonStandaloneExample.execute(EpsilonStandaloneExample.java:64)
	at example.transformation.xml2csv.XmlCsvEtlStandaloneExample.main(XmlCsvEtlStandaloneExample.java:31)


Looking at the source of CsvModel I implemented a short fix by defining a list holding the header information - PFA the solution that worked for me.

Regards,
Martin
  • Attachment: CsvModel.java
    (Size: 15.13KB, Downloaded 157 times)

[Updated on: Mon, 05 May 2014 14:02]

Report message to a moderator

Re: [EMC] CSV driver not writing rows [message #1335058 is a reply to message #1332595] Mon, 05 May 2014 21:48 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Martin,

Thanks for reporting this and for contributing a patch. I'll add a couple of tests for this and commit the fix shortly.

Cheers,
Dimitris
Previous Topic:GMF node disappears
Next Topic:EOL: Loading model from a ResourceSet
Goto Forum:
  


Current Time: Fri Apr 26 11:06:10 GMT 2024

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

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

Back to the top