I've tried removing the extra .jars and it still won't work. I just don't
get it.

On Thu, Jun 10, 2010 at 1:43 PM, David Fisher <[email protected]>wrote:

> Glad to help.
>
> > Closest-named classes I could find under common\lib are:
> >
> > xbean-2.2.0.jar
> > stax-api-1.0.1.jar
> > axis2-xmlbeans-1.3.jar
>
> Those are not normal to a standard Tomcat 5.5. These are probably
> conflicting in some strange way (the tomcat classloader is strange and is
> simplified in Tomcat 6.) They were probably added because they are required
> by some other webapps on the server.
>
> Can you take these out temporarily and restart your tomcat server?
>
> Or does someone else own that asset? If so they will need to help you.
>
> They might work better in shared\lib but that is really a guess and the
> issue may be with the other non-POI apps on that server.
>
> Regards,
> Dave
>
>
> >
> > Tomcat version: 5.5.20
> >
> > Tomcat is not initialized with -Djava.awt.headless=true
> >
> > Sorry to keep you guys on the same issue.. it's just that I'm new with
> POI
> > and tomcat (intern), and I'm trying to update the webapp.
> >
> > Thanks in advance.
> >
> > On Thu, Jun 10, 2010 at 1:01 PM, David Fisher <[email protected]
> >wrote:
> >
> >> Hi,
> >>
> >> Here a few things that I would check.
> >>
> >>
> >> POI jars:C:\Tomcat\webapps\websrv\WEB-INF\lib
> >>>
> >>> Including:
> >>> poi-3.6
> >>> poi-contrib-3.6
> >>> poi-ooxml-3.6
> >>> poi-scratchpad 3.6
> >>> ooxml-schemas-1.0
> >>> xmlbeans-2.3.0
> >>> dom4j-1.6.1
> >>> geronimo-stax
> >>
> >> (I just saw you conversation with Nick in the earlier thread.)
> >>
> >> What is in C:\Tomcat\shared\lib and C:\Tomcat\common\lib? Are there
> other
> >> versions of any of these Jars?
> >>
> >>> Java version: 1.5
> >>> Tomcat: 5.5
> >>
> >> Which Tomcat 5.5? The current version is 5.5.29.
> >>
> >> Is your Tomcat started with -Djava.awt.headless=true?
> >>
> >> Regards,
> >> Dave
> >>
> >>
> >>> On Thu, Jun 10, 2010 at 11:25 AM, David Fisher <[email protected]
> >>> wrote:
> >>>
> >>>>> Yes, this file was created using Excel 2007. The file was originally
> an
> >>>>> .xls, and I migrated it to .xlsx (however, I have tried uploading
> both
> >>>> new
> >>>>> and modified .xls files and it won't budge).
> >>>>>
> >>>>> Per request, I unzipped the .xlsx files and the reported structure is
> >>>> this:
> >>>>>
> >>>>> _rels Folder
> >>>>> docProps Folder
> >>>>> xl Folder
> >>>>> [Content_Types].xml
> >>>>
> >>>> What's in this file?
> >>>>
> >>>>> Inside the xl folder I found the following files:
> >>>>>
> >>>>> _rels Folder
> >>>>> printerSettings Folder
> >>>>> theme folder
> >>>>> worksheets folder
> >>>>> sharedStrings.xml
> >>>>> styles.xml
> >>>>> workbook.xml
> >>>>>
> >>>>> Etcetera. Truth be told, it seems the file is doing all right.
> >>>>>
> >>>>> I'll post my code (where it breaks) and see if there's something with
> >> the
> >>>>> code (although that wouldn't make sense, since it works perfectly
> fine
> >> in
> >>>>> this machine -- with both .xls and .xlsx files).
> >>>>
> >>>> What versions of Java are you running where it works?
> >>>>
> >>>> What version of Tomcat does your server use? Where are the POI jars in
> >> your
> >>>> Tomcat installation?
> >>>>
> >>>> Regards,
> >>>> Dave
> >>>>
> >>>>
> >>>>>
> >>>>> public void loadFile(File oFileToLoad) throws FileNotFoundException,
> >>>>> LoaderException, ValidationException {
> >>>>>      Workbook oWorkgroup;
> >>>>>
> >>>>>      m_oFileName = oFileToLoad;
> >>>>>      try {
> >>>>>       //LOG.Log("ExcelFile - Loading file name: " +
> >>>>> m_oFileName.getPath(), LOG.LOG_TYPE_TRACE);
> >>>>>       m_oIn = new FileInputStream(m_oFileName);
> >>>>>
> >>>>>
> >>>>>          oWorkgroup = WorkbookFactory.create(m_oIn);
> >>>>>
> >>>>>        if (oWorkgroup.getNumberOfSheets() == 0) {
> >>>>>            // page not found throw exception
> >>>>>            throw new LoaderException("Excel document does not contain
> >> a
> >>>>> workbook");
> >>>>>        }
> >>>>>
> >>>>>        m_oSheet = oWorkgroup.getSheetAt(0);
> >>>>>
> >>>>>        m_nTotalRows = getTotalRows();
> >>>>>
> >>>>>       //LOG.Log("ExcelFile - Total Rows: " + m_nTotalRows,
> >>>>> LOG.LOG_TYPE_TRACE);
> >>>>>      } catch(OldExcelFormatException e){
> >>>>>       throw new ValidationException("This is an Excel 95 File, we can
> >>>>> process only Excel 97-2007. ",
> >>>>>       1, ValidationException.EXCEL_95_ERROR);
> >>>>>
> >>>>>      }catch (IOException ioe) {
> >>>>>       //LOG.LogErrors(ioe);
> >>>>>       ioe.printStackTrace();
> >>>>>       throw new LoaderException("Exception reading the excel
> >>>> document");
> >>>>>
> >>>>>      } catch (InvalidFormatException e) {
> >>>>>       // Catch created for Workbook.create method. Unspecified.
> >>>>>
> >>>>> e.printStackTrace();
> >>>>> }
> >>>>>  }
> >>>>>
> >>>>> Any thoughts?
> >>>>>
> >>>>> On Thu, Jun 10, 2010 at 10:09 AM, David Fisher <
> [email protected]
> >>>>> wrote:
> >>>>>
> >>>>>> Was this file created with Excel or another application like
> >> OpenOffice?
> >>>>>> What version of that application?
> >>>>>>
> >>>>>> Try unzipping the xlsx file and reporting the structure. These OOXML
> >>>> files
> >>>>>> are really zipped up directories of xml files. I suspect that there
> is
> >>>>>> something in your content type that POI does not understand.
> >>>>>>
> >>>>>> Is this a file that you can share? If so, then I would suggest that
> >> you
> >>>>>> create a bugzilla entry so that a developer can take a look when
> they
> >>>> have
> >>>>>> time.
> >>>>>>
> >>>>>> Regards,
> >>>>>> Dave
> >>>>>>
> >>>>>> On Jun 10, 2010, at 7:34 AM, 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]
> >>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> ---------------------------------------------------------------------
> >>>>>> To unsubscribe, e-mail: [email protected]
> >>>>>> For additional commands, e-mail: [email protected]
> >>>>>>
> >>>>>>
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: [email protected]
> >>>> For additional commands, e-mail: [email protected]
> >>>>
> >>>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to