0 votes
1.8k views

Hi,
I have a problem with exporting my old datasets; These were created under ecoinvent 3.2. and with openLCA V1.4.
I then imported them into a new ecoinvent 3.3. database and with openLCA 1.6, using the openLCA conversion script.
The import worked properly, (although I had to set all default providers by hand, but this is a conceptional issue I guess), but I am not able to export these datasets anymore.
When trying to export, I get an error message, either when exporting flows or processes. Below the error message obtained when exporting a single (exemplary) flow:

3356680 ModalContext ERROR org.openlca.io.ilcd.ILCDExport Export of component RootEntity [type=Flow, refId=818777fb-29c2-4d1f-a273-d229eff8bb30, name=Aluminium current collector, for Li-Ion battery failed

org.openlca.ilcd.io.DataStoreException: Cannot load class org.openlca.ilcd.flows.Flow from entry /flows/818777fb-29c2-4d1f-a273-d229eff8bb30.json
     at org.openlca.ilcd.io.ZipStore.unmarshal(ZipStore.java:156)
     at org.openlca.ilcd.io.ZipStore.get(ZipStore.java:83)
     at org.openlca.io.ilcd.output.FlowExport.run(FlowExport.java:42)
     at org.openlca.io.ilcd.ILCDExport.tryExport(ILCDExport.java:64)
     at org.openlca.io.ilcd.ILCDExport.export(ILCDExport.java:45)
     at org.openlca.app.wizards.io.ILCDExportWizard.runExport(Unknown Source)
     at org.openlca.app.wizards.io.ILCDExportWizard.lambda$0(Unknown Source)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
    Caused by: javax.xml.bind.UnmarshalException
     - with linked exception:
    [org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.]
     at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:335)
     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:563)
     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:249)
     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:221)
     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:276)
     at org.openlca.ilcd.io.XmlBinder.unmarshal(XmlBinder.java:130)
     at org.openlca.ilcd.io.XmlBinder.fromStream(XmlBinder.java:110)
     at org.openlca.ilcd.io.ZipStore.unmarshal(ZipStore.java:153)
     ... 7 more
    Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
     at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
     at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
     at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1465)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:999)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504)
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
     at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:243)
     ... 12 more


Any idea of what I might have to modify in my datasets so that the export works again?

Many thanks in advance!

Jens

in openLCA by

1 Answer

0 votes
by (125k points)
 
Best answer
Hi Jens,
how did you export the ecoinvent 3.2-based datasets?
Best wishes,
Andreas
by
Yes, they are based on ecoinvent 3.2.
I created them based on ecoinvent 3.2. and then imported them into ecoinvent 3.3. with the provided conversion script.
I then continued working on them based on ecoinvent 3.3. and now want to export the most recent version, causing the mentioned problem.
Best
Jens
by (125k points)
Hm, sorry I still do not understand -
"the provided conversion script"?
Which script are you referring to? I was thinking you export the datasets in JSON-LD or ILCD format for example, and import them back again?
Best wishes,
Andreas
by
sorry, maybe I did not explain well. I will try it step-by-step:
- I had a buch of datasets created in ecoinvent 3.2.
- I converted them using the python script "Convert own datasets from ecoinvent v.3.2 to ecoinvent v.3.3" from the openLCA Nexus for being able to use them with ecoinvent 3.3.
- I imported them into a new ecoinvent 3.3. database and set all the required default providers.
- Now I want to export them again from the ecoinvent 3.3. database and get this error.
Thanks again!
Best regards
Jens
by (125k points)
Ah thank you, now I understand - are you using Nexus-ecoinvent databases, or databases from ecoinvent directly? The script is made for "our" (i.e. Nexus vesion). Then, could it be that you mix JSON and ILCD in the import? The script generates JSON-LD as format, thus you also need to import as JSON-LD.
Best wishes,
Andreas
by

The same error message appears both when exporting into JSON and ILCD format. My ecoinvent is the one from the openLCA Nexus. However, the conversion and the import worked perfectly; I am using the datasets in ecoinvent 3.3. without problems.
The problem occurs when exporting these datasets again, independent of the format I use.

interestingly, when exporting a set of flows instead of a single flow, I get this error message (different to the one I posted initially when exporting only one flow):

177616 ModalContext ERROR org.openlca.jsonld.ZipStore failed to put flows/a4248e70-5860-4f17-9e0d-0642f7627417.json
java.nio.file.ReadOnlyFileSystemException
     at com.sun.nio.zipfs.ZipFileSystem.checkWritable(ZipFileSystem.java:155)
     at com.sun.nio.zipfs.ZipFileSystem.newOutputStream(ZipFileSystem.java:496)
     at com.sun.nio.zipfs.ZipPath.newOutputStream(ZipPath.java:792)
     at com.sun.nio.zipfs.ZipFileSystemProvider.newOutputStream(ZipFileSystemProvider.java:285)
     at java.nio.file.Files.newOutputStream(Files.java:216)
     at java.nio.file.Files.write(Files.java:3292)
     at org.openlca.jsonld.ZipStore.put(ZipStore.java:80)
     at org.openlca.jsonld.ZipStore.put(ZipStore.java:98)
     at org.openlca.jsonld.ZipStore.put(ZipStore.java:91)
     at org.openlca.jsonld.output.JsonExport.write(JsonExport.java:74)
     at org.openlca.app.wizards.io.JsonExportWizard$Export.doExport(Unknown Source)
     at org.openlca.app.wizards.io.JsonExportWizard$Export.doExport(Unknown Source)
     at org.openlca.app.wizards.io.JsonExportWizard$Export.run(Unknown Source)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)  



Also, the export of default ecoinvent flows works fine; the problem occurs only with my own datasets.

.. seems to be a difficult issue.

Thank you!

Jens

by
I just tried out something else, maybe it`s interesting.

When I take the flow (one of those that give the error message when exporting), copy and paste it into the same database (i.e., simply create a copy of the flow), I can export it without any error message.

Now I could do this for all my datasets and flows, but It would require setting ALL default providers within ALL datasets again, what is really much work.

But maybe it gives a hint about where the underlying problem is hidden?

Best

Jens
ask.openLCA is a question-and-answer (Q&A) website on Life Cycle Assessment (LCA).

It is also the public support platform for openLCA, openLCA Nexus, data.openLCA and the LCA Collaboration Server.

Before asking questions please also consult our online manuals for openLCA and the LCA Collaboration Server.

Receive guaranteed and prioritised professional support via GreenDelta's help desk.

ask.openLCA is run by GreenDelta, the creators of openLCA.

openLCA

LCA Collaboration Server
...