Hi,

in ooxml-security-1.1.jar in class 
"com.microsoft.schemas.office.x2006.encryption.EncryptionDocument" (in the 
inner class "Factory") there are references to the class 
"org.apache.poi.POIXMLTypeLoader" - which breaks at runtime with a 
NoClassDefFoundError, because the class is in package 
"org.apache.poi.ooxml.POIXMLTypeLoader" in poi-ooxml-4.0.1.jar.

I'm uncertain what I can do to clear this issue. In the class 
EncryptionDocument in poi-ooxml-schemas-4.0.1.jar the references are correct, 
but I cannot use this lib because it does not contain everything I need.

I cannot disclose the test document (it belongs to our customer), so here some 
more info about the error:

This is the method the error occurs in:

public static com.microsoft.schemas.office.x2006.encryption.EncryptionDocument 
parse(java.io.InputStream is, org.apache.xmlbeans.XmlOptions options) throws 
org.apache.xmlbeans.XmlException, java.io.IOException {
          return 
(com.microsoft.schemas.office.x2006.encryption.EncryptionDocument) 
org.apache.poi.POIXMLTypeLoader.parse( is, type, options ); }

Some way back on the stack:
[cid:image001.png@01D4CD1F.AE5567E0]


This is what the stacktrace could look like (I had to reconstruct it by hand, 
because the lib was compiled without debug infos):

java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader

at 
com.microsoft.schemas.office.x2006.encryption.EncryptionDocument.Factory.parse(EncryptionDocument:73)
at 
org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder.parseDescriptor(AgileEncryptionInfoBuilder.java:104)
                at 
org.apache.poi.poifs.crypt.agile.AgileEncryptionInfoBuilder.initialize(AgileEncryptionInfoBuilder.java:40)
               at 
org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:139)
               at 
org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:88)
               at 
org.apache.poi.poifs.crypt.EncryptionInfo.<init>(EncryptionInfo.java:81)
               at 
org.apache.poi.ooxml.extractor.ExtractorFactory.createEncryptedOOXMLExtractor(ExtractorFactory.java:391)
               at 
org.apache.poi.ooxml.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:134)

Thank you and best regards,

Tobias Fink
Software Development

Fasihi GmbH - Donnersbergweg 4 - 67059 Ludwigshafen - Germany
Geschäftsführer Saeid Fasihi, Rolf Lutzer - Firmensitz Ludwigshafen a. Rh.
Amtsgericht Ludwigshafen - HRB 60601

Reply via email to