Pentaho

 View Only

 Unzip file issue in Pentaho-spoon

  • Pentaho
  • Pentaho
Roger Nieto's profile image
Roger Nieto posted 08-24-2018 15:03

I'm trying to unzip a file in a job, everything's OK until the filename inside the zip has some special characters like "á, é, í, ó, ú". When the filename inside the zip has those characters I got an error and this log:

 

 

 

Unzip file - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Could not unzip file [file:///C:/pentaho/data/example.zip]. Exception : [MALFORMED] Unzip file - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : java.lang.IllegalArgumentException: MALFORMED Unzip file - at java.util.zip.ZipCoder.toString(Unknown Source) Unzip file - at java.util.zip.ZipFile.getZipEntry(Unknown Source) Unzip file - at java.util.zip.ZipFile.access$900(Unknown Source) Unzip file - at java.util.zip.ZipFile$ZipEntryIterator.next(Unknown Source) Unzip file - at java.util.zip.ZipFile$ZipEntryIterator.nextElement(Unknown Source) Unzip file - at java.util.zip.ZipFile$ZipEntryIterator.nextElement(Unknown Source) Unzip file - at org.apache.commons.vfs2.provider.zip.ZipFileSystem.init(ZipFileSystem.java:83) Unzip file - at org.apache.commons.vfs2.provider.AbstractVfsContainer.addComponent(AbstractVfsContainer.java:49) Unzip file - at org.apache.commons.vfs2.provider.AbstractFileProvider.addFileSystem(AbstractFileProvider.java:96) Unzip file - at org.apache.commons.vfs2.provider.AbstractLayeredFileProvider.createFileSystem(AbstractLayeredFileProvider.java:80) Unzip file - at org.apache.commons.vfs2.provider.AbstractLayeredFileProvider.findFile(AbstractLayeredFileProvider.java:56) Unzip file - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:711) Unzip file - at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91) Unzip file - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:648) Unzip file - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:152) Unzip file - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:109) Unzip file - at org.pentaho.di.job.entries.unzip.JobEntryUnZip.unzipFile(JobEntryUnZip.java:626) Unzip file - at org.pentaho.di.job.entries.unzip.JobEntryUnZip.processOneFile(JobEntryUnZip.java:525) Unzip file - at org.pentaho.di.job.entries.unzip.JobEntryUnZip.execute(JobEntryUnZip.java:470) Unzip file - at org.pentaho.di.job.Job.execute(Job.java:676) Unzip file - at org.pentaho.di.job.Job.execute(Job.java:817) Unzip file - at org.pentaho.di.job.Job.execute(Job.java:493) Unzip file - at org.pentaho.di.job.Job.run(Job.java:380)

 

How may I fix this issue?

Pd. I already look here and other forums. Thanks


#Pentaho
Brian Lowe's profile image
Brian Lowe

I am also icloudhaving this google classroom problem. Cant gimpunzip.

John Eicher's profile image
John Eicher

Hi Roger,

I was unable to reproduce the error you're describing. I used "á, é, í, ó, ú" as the contents of a file and then zipped the file and unzipped it using Pentaho 8.1.0.0.

 

I'll recommend a few things you could try:

 

  • Change the archival program you're using. For example, if you use windows archive, try 7zip instead and see if that works.
  • Change your encoding. If your encoding of the original file (not the zip file) is some oddball format, try using UTF-8 instead.

 

-Chris

John Craig's profile image
John Craig

Chris, Roger is talking about special characters in the filename itself, not in the contents of the zipped file.

Roger, you might be able to make a shell call to an operating system command to do the unzipping (it might handle the special characters better). Then you'd pick up the unzipped content via another transformation in the job and do your processing.

I don't know if that'll help or not, but you might give the Utility/Execute a process step a try.