error on importing xml or csv file

  • Asked
  • Active
  • Viewed 9774 times
0

Dear Support,

We are having issues at importing xml (or zip containing a set or xml file) just exported using Collect Earth.

Here is the log of the error: ERROR 2014-11-18 14:52:55,148 [XML Import Thread 3.xml] org.openforis.collect.io.data.XMLDataImportProcess: error in opening zip file java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at org.openforis.collect.io.data.XMLDataImportProcess.extractPackagedSurvey(XMLDataImportProcess.java:518) at org.openforis.collect.io.data.XMLDataImportProcess.createDataImportSummary(XMLDataImportProcess.java:152) at org.openforis.collect.io.data.XMLDataImportProcess.call(XMLDataImportProcess.java:136) at org.openforis.collect.earth.app.view.ImportXMLDialogProcessMonitor.startImport(ImportXMLDialogProcessMonitor.java:80) at org.openforis.collect.earth.app.view.ImportActionListener$1.run(ImportActionListener.java:76) ERROR 2014-11-18 14:52:55,149 [XML Import Thread 1.xml] org.openforis.collect.io.data.XMLDataImportProcess: error in opening zip file java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at org.openforis.collect.io.data.XMLDataImportProcess.extractPackagedSurvey(XMLDataImportProcess.java:518) at org.openforis.collect.io.data.XMLDataImportProcess.createDataImportSummary(XMLDataImportProcess.java:152) at org.openforis.collect.io.data.XMLDataImportProcess.call(XMLDataImportProcess.java:136) at org.openforis.collect.earth.app.view.ImportXMLDialogProcessMonitor.startImport(ImportXMLDialogProcessMonitor.java:80) at org.openforis.collect.earth.app.view.ImportActionListener$1.run(ImportActionListener.java:76) ERROR 2014-11-18 14:54:06,996 [XML Import Thread 1.xml] org.openforis.collect.io.data.XMLDataImportProcess: error in opening zip file java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at java.util.zip.ZipFile.<init>(Unknown Source) at org.openforis.collect.io.data.XMLDataImportProcess.extractPackagedSurvey(XMLDataImportProcess.java:518) at org.openforis.collect.io.data.XMLDataImportProcess.createDataImportSummary(XMLDataImportProcess.java:152) at org.openforis.collect.io.data.XMLDataImportProcess.call(XMLDataImportProcess.java:136) at org.openforis.collect.earth.app.view.ImportXMLDialogProcessMonitor.startImport(ImportXMLDialogProcessMonitor.java:80) at org.openforis.collect.earth.app.view.ImportActionListener$1.run(ImportActionListener.java:76)

Can you please advise?

Cheers, Alessio

0

Accepted answer

So from further contact with this user:

The file he was trying to import looked like this when opened in WinRAR :

alt text

This means that the file he is trying to import is not the file generated though Collect Earth!

The file generated by Collect Earth should have this structure:

alt text

Where idm.xml is the survey definition and the folder 1 contains all of the plot information (there is an XML file per plot), which is in fact the contents of the first file shown ( the xmlfilelist 1,2,3,4 and so on )

So the easy solution here are:

  1. Export the data collected again and this time DO NOT TINKER with the data
  2. In your Collect Earth export the data to XML and then just copy the contents from the first "corrupted"file into the folder "1" of this newly created ZIP file (you can basically just move the files from on file to the other )

So now you have a file that is following the structure that Collect Earth expects and that should work fine!!

0

Accepted answer

Hello Alessio,

This looks like a ZIP file corruption/error.

Can the ZIP file be open normally with WinRAR, WinZip or similar software?

Could there be a permission issue?

Was there any problem when you exported the data to XML ( ZIP file ) using Collect earth ?

/Collect Earth support

0

Accepted answer

Hello there,

Thanks for the fast reply. Unfortunately the zip file is valid and the compression tools are able to work with it successful. As I said the issue also happens if we try to upload on by one (or a set of) the xml files originally compressed on to the zip file. No permission issues are detected on the log file and the import has been also tested with a faoadmin user on a FAO machine (just to make sure to have full capabilities on the file system).

Finally no problems detected on exporting.

Cheers, Alessio

Your answer

Markdown text. Shortcuts: Ctrl+B bold, Ctrl+I italic, Ctrl+K link, Ctrl+E code, Ctrl+Shift+V paste as plain text. Tab indents list items and code; press Escape, then Tab, to leave the text box.

Insert an image

Say what the image shows, for people who can't see it.

Tip: type a few words from the error message, or put a tag in [brackets] to look only there.

Menu

Keyboard shortcuts

Anywhere

?
Show this list
/
Search
g h
Go to the home page
g q
Go to the questions
g t
Go to the tags
g u
Go to the users
a
Ask a question

Lists of questions

j k
Next or previous question
Enter
Open the question

Question pages

j k
Next or previous post

Shortcuts never apply while you type in a text field. Members can turn them off in their preferences.