The other thought I had today whilst putting an extra keen edge onto an axe
was this;

1. Have the Excel workbook file on your PC and try to process that file
using the POI code.
2. If that works, upload the file to the server and try to process it there
using the same code base.

If that fails then there has to be a problem with the file which was
introduced by the procees of copying the file to the server and it is one
that POI is not able to circunvent. It seems from the error message you
posted that it is not possible for the POI core code to locate a specific
part of the zip file as it is either unpacking it or as it trying to locate
that part whilst parsing the xml.

The only other thing I tought that you could do is to look into the file
using a tool such as WinRAR. That way, you will be able to see if the
various files and folders are presnet and in the locations they should
occupy.

Do not know if this will help at all - and I must admit to being a little
stumpled myself - but as it had been a while since anyone posted in response
to your original message, I wanted to try and keep the discussion going
forward.

Yours

Mark B


Jorge Moya wrote:
> 
> I've verified and the file is functional. I'm really clueless, atm.
> 
> On Thu, Jun 10, 2010 at 1:53 AM, MSB <[email protected]> wrote:
> 
>>
>> Is it possible that the structure of the file is being mangled somehow?
>> Have
>> you tried to open the file using Excel after it has been ftp'd into the
>> folder on your server?
>>
>> Yours
>>
>> Mark B
>>
>>
>> Jorge Moya wrote:
>> >
>> > I'm sorry for spam, but I menat it breaks when it tries to extract the
>> > info
>> > from the file.
>> >
>> > Thanks in advance.
>> >
>> > On Wed, Jun 9, 2010 at 10:43 AM, Jorge Moya <[email protected]> wrote:
>> >
>> >> What do you mean, exactly? I'm uploading the files through an FTP
>> server,
>> >> and after upload I execute the validation of my app which proceed to
>> >> extract
>> >> the information from a designated folder, but it breaks when it tries
>> to
>> >> upload the file with mentioned errors.
>> >>
>> >>
>> >> On Tue, Jun 8, 2010 at 3:04 PM, David Fisher
>> >> <[email protected]>wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> You should write the uploaded file to your temporary file and then
>> read
>> >>> it
>> >>> in.
>> >>>
>> >>> OOXML files are zip files and are not accessed non-serailly. The user
>> >>> might stop transfer or the network connection might break.
>> >>>
>> >>> Regards,
>> >>> Dave
>> >>>
>> >>> On Jun 8, 2010, at 9:37 AM, Jorge Moya wrote:
>> >>>
>> >>> > Ok guys, I'm trying to extract the information of an .xlsx document
>> >>> using
>> >>> > POI API and the ss.usermodel (using an app I made), however when I
>> >>> tried
>> >>> to
>> >>> > upload the file to the server, it returned me these errors on the
>> >>> server's
>> >>> > tomcat console:
>> >>> >
>> >>> > org.apache.poi.openxml4j.exceptions.InvalidFormatException: Can't
>> read
>> >>> > content t
>> >>> > ypes part !
>> >>> >        at
>> >>> >
>> org.apache.poi.openxml4j.opc.internal.ContentTypeManager.<init>(Conte
>> >>> > ntTypeManager.java:107)
>> >>> >        at
>> >>> >
>> org.apache.poi.openxml4j.opc.internal.ZipContentTypeManager.<init>(Zi
>> >>> > pContentTypeManager.java:56)
>> >>> >        at
>> >>> >
>> org.apache.poi.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:
>> >>> > 136)
>> >>> >        at
>> >>> >
>> org.apache.poi.openxml4j.opc.OPCPackage.getParts(OPCPackage.java:585)
>> >>> >
>> >>> >        at
>> >>> org.apache.poi.openxml4j.opc.OPCPackage.open(OPCPackage.java:222)
>> >>> >        at
>> >>> >
>> org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.ja
>> >>> > va:63)
>> >>> >        at
>> com.msights.core.utils.ExcelFile.loadFile(ExcelFile.java:84)
>> >>> >        at
>> >>> com.msights.core.utils.GroupLoader.loadFiles(GroupLoader.java:50)
>> >>> >        at
>> >>> >
>> com.msights.core.validation.ValidationModule.run(ValidationModule.jav
>> >>> > a:154)
>> >>> >        at java.lang.Thread.run(Thread.java:595)
>> >>> >
>> >>> > Any idea of what's happening? Uploading .XLS files work fine.
>> >>> Extracting
>> >>> > info on my local machine works fine, as well.
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: [email protected]
>> >>> For additional commands, e-mail: [email protected]
>> >>>
>> >>>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/openxml4j-InvalidFormatException-tp28820283p28839434.html
>> Sent from the POI - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/openxml4j-InvalidFormatException-tp28820283p28844532.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to