Forrest Rae created OFBIZ-7899:
----------------------------------

             Summary: createDataResource will sometimes fail when uploading 
Excel documents due to missing libraries
                 Key: OFBIZ-7899
                 URL: https://issues.apache.org/jira/browse/OFBIZ-7899
             Project: OFBiz
          Issue Type: Bug
          Components: content
    Affects Versions: Release Branch 15.12, Trunk
            Reporter: Forrest Rae


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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to