Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7899

createDataResource will sometimes fail when uploading Excel documents due to missing libraries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Release Branch 15.12, Trunk, Upcoming Branch
    • None
    • content
    • None
    • Patch

    Description

      createDataResource calls org.ofbiz.content.data.DataResourceWorker.getMimeTypeWithByteBuffer(). getMimeTypeWithByteBuffer calls into the Tika library to detect the mime type of the file. Tika will try to detect the file format, leveraging a number of detectors, one of which is Apache POI. Apache POI's detector will try to call routines in jar files that are not included in with the content application, leading to the following exception:

      java.lang.IllegalAccessError: tried to access method org.apache.poi.util.POILogger.log(ILjava/lang/Object;)V from class org.apache.poi.openxml4j.opc.PackageRelationshipCollection

      The missing jar files can be found here:
      https://archive.apache.org/dist/poi/release/bin/poi-bin-3.13-20150929.zip

      The missing jars are:
      poi-ooxml
      poi-ooxml-schemas

      Might be good to update to the latest version of POI as well:
      http://poi.apache.org/download.html

      Attachments

        Activity

          People

            Unassigned Unassigned
            fbr@14x.net Forrest Rae
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: