Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-404

Obsolete Jena dependency at ODF Toolkit

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6.2-incubating
    • odfdom
    • None

    Description

      ODF Toolkit uses obsolete distribution of Jena from HP however there is Apache Jena under current development and management.

      Replicable steps

      The project main method calls following statement.

      OdfSpreadsheetDocument osd = OdfSpreadsheetDocument.loadDocument(new File("example.ods"));
      

      The project uses the up-to-date Jena dependency from Apache Jena repository.

      <dependency>
          <groupId>org.apache.jena</groupId>
          <artifactId>jena-core</artifactId>
          <version>3.0.0</version>
      </dependency>
      <dependency>
           <groupId>org.apache.jena</groupId>
           <artifactId>jena-arq</artifactId>
           <version>3.0.0</version>
      </dependency>
      

      Despite that the application fails with

      Exception in thread "main" java.lang.NoClassDefFoundError: com/hp/hpl/jena/rdf/model/RDFNode
      	at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:215)
      	at org.odftoolkit.odfdom.pkg.manifest.OdfManifestDom.initialize(OdfManifestDom.java:74)
      	at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:132)
      	at org.odftoolkit.odfdom.pkg.manifest.OdfManifestDom.<init>(OdfManifestDom.java:63)
      	at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:189)
      	at org.odftoolkit.odfdom.pkg.OdfPackage.parseManifest(OdfPackage.java:1219)
      	at org.odftoolkit.odfdom.pkg.OdfPackage.readZip(OdfPackage.java:452)
      	at org.odftoolkit.odfdom.pkg.OdfPackage.initializeZip(OdfPackage.java:422)
      	at org.odftoolkit.odfdom.pkg.OdfPackage.<init>(OdfPackage.java:250)
      	at org.odftoolkit.odfdom.pkg.OdfPackage.loadPackage(OdfPackage.java:320)
      	at org.odftoolkit.odfdom.doc.OdfDocument.loadDocument(OdfDocument.java:232)
      	at org.odftoolkit.odfdom.doc.OdfSpreadsheetDocument.loadDocument(OdfSpreadsheetDocument.java:155)
      

      The problem is that OdfFileDom.java uses obsolete HP package name.

      Workaround

      Following duplicate Jena dependency workarounds the issue:

      <dependency>
      	<groupId>com.hp.hpl.jena</groupId>
      	<artifactId>jena</artifactId>
      	<version>2.5.5</version>
      </dependency>
      

      Attachments

        Activity

          People

            svanteschubert Svante Schubert
            jspetrak Josef PetrĂ¡k
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: