Dear Bruno, I have tried out your test code and cannot reproduce the exception that you get. I can load the spreadsheet in without a problem, and can also query the spreadsheet as expected.
I couldn't get your test to pass because it seems to take a long time to run. Methods like getRowCount() can return much higher values than you expect (on your test code it returns 1048576 for me), and getRowByIndex() is a very slow method for large numbers of rows. Are you running this code in a clean project without other dependencies which might be interfering? If not perhaps you could try this? Best, Nick 2014-04-15 11:56 GMT+02:00 Bruno Girin <[email protected]>: > Thanks Svante! I'll have a look at this and try to come up with a fix. In > the meantime, I created the defect here: > https://issues.apache.org/jira/browse/ODFTOOLKIT-388 > > All the best, > > Bruno > > > > On 15 April 2014 09:21, Svante Schubert <[email protected]> wrote: > > > Hi Bruno, > > > > Welcome on board! > > I am happy that you are bold enough to try to work it out yourself. > > > > A quick intro you may find at > > http://incubator.apache.org/odftoolkit/odfdom/index.html#documentation > > > > If you think we might have done something stupid in the past, do not > > hesitate to point it out. > > A mentor once told me it is not to blame to be stupid, but it is to > > blame to stay stupid! :) > > > > Best regards, > > Svante > > > > Am 15.04.2014 09:30, schrieb Bruno Girin: > > > OK, I ran it through the validator here: > > > http://odf-validator.rhcloud.com/and it confirms that it's valid > > > ODF1.2. I will file an issue and include > > > the test case and example file. > > > > > > Svante, I'm quite happy trying to debug and provide a patch myself, I > may > > > just be asking a lot of questions on the way as I don't know the code > > base > > > at all :-) I assume that if I do that, I should do it against the trunk > > > code? > > > > > > Validator output: > > > > > > The document is conformant ODF1.2! > > > Details: > > > simple.ods: Info: ODF version of root document: 1.2 > > > internal:/schema/odf1.2/OpenDocument-v1.2-cos01-manifest-schema.rng: > > > Info:parsed. > > > simple.ods/META-INF/manifest.xml: Info: no errors, no warnings > > > simple.ods/mimetype: Info: no errors, no warnings > > > simple.ods: Info: Media Type: > > application/vnd.oasis.opendocument.spreadsheet > > > internal:/schema/odf1.2/OpenDocument-v1.2-cos01-schema.rng: Info: > parsed. > > > simple.ods/meta.xml: Info: Generator: LibreOffice/4.0.2.2$Linux_X86_64 > > > LibreOffice_project/400m0$Build-2 > > > simple.ods/meta.xml: Info: no errors, no warnings > > > simple.ods/settings.xml: Info: no errors, no warnings > > > simple.ods/styles.xml: Info: no errors, no warnings > > > simple.ods/content.xml: Info: no errors, no warnings > > > internal:/schema/odf1.2/OpenDocument-v1.2-cos01-dsig-schema.rng: > > Info:parsed. > > > simple.ods: Info: no errors, no warnings > > > > > > > > > Thanks, > > > > > > Bruno > > > > > > > > > > > > On 15 April 2014 05:55, Svante Schubert <[email protected]> > > wrote: > > > > > >> Yes, please. If the validation does not solve the problem. The ODS > will > > >> help and with JUnit test code I will debug into. An issue for the > > >> attachments seems appropriate. > > >> Thanks, > > >> Svante > > >> Am 14.04.2014 18:41 schrieb "Bruno Girin" <[email protected]>: > > >> > > >>> Hi, > > >>> > > >>> I'm currently working on a piece of code that needs to read ODS > > >>> spreadsheets and I'm using files created by LibreOffice in my unit > > >> tests. I > > >>> am getting the following exception thrown when I call > > >>> SpreadsheetDocument.loadDocument(InputStream): > > >>> > > >>> org.odftoolkit.odfdom.pkg.OdfFileDom initialize > > >>> SEVERE: null > > >>> org.xml.sax.SAXNotRecognizedException: > > >>> http://xml.org/sax/features/xmlns-uris > > >>> > > >>> + full stack trace. > > >>> > > >>> Where should I start looking to find the source of the problem? I'm > > using > > >>> ODF Toolkit 0.6 and get the same error with 0.6.1 built from source > > (SVN > > >>> trunk). > > >>> > > >>> I can provide the unit test code and ODS file if it helps. > > >>> > > >>> Thanks, > > >>> > > >>> Bruno > > >>> > > > > >
