Skip to content

Commit

Permalink
Improved: Update to Apache Tika 3.0.0 (OFBIZ-13155)
Browse files Browse the repository at this point in the history
This reverts commit 7c3a622.

When running testSendOrderConfirmation and testFopMacroLibrary
there are a lot of issues with dependencies related to
org.apache.xmlgraphics Tika, FOP and PDFBox

To be checked before going further using PDFBox 33.0.3 and FOP 2.10

I'll put the the error stack for testSendOrderConfirmation in the Jira
  • Loading branch information
JacquesLeRoux committed Oct 21, 2024
1 parent 847c005 commit fffa395
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
9 changes: 4 additions & 5 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-api:2.20.0' // the API of log4j 2
implementation 'org.apache.logging.log4j:log4j-core:2.20.0' // Somehow needed by Buildbot to compile OFBizDynamicThresholdFilter.java
implementation 'org.apache.poi:poi:5.3.0'
implementation 'org.apache.pdfbox:pdfbox:3.0.3'
implementation 'org.apache.pdfbox:pdfbox:2.0.32' // 3.0.1 does not compile
implementation 'org.apache.shiro:shiro-core:1.13.0'
implementation 'org.apache.shiro:shiro-crypto-cipher:2.0.0'
implementation 'org.apache.sshd:sshd-core:2.13.1'
implementation 'org.apache.sshd:sshd-sftp:2.13.1'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2'
implementation 'org.apache.tika:tika-core:3.0.0'
implementation 'org.apache.tika:tika-parsers:3.0.0'
implementation 'org.apache.tika:tika-parser-pdf-module:3.0.0'
implementation 'org.apache.tika:tika-core:2.9.2'
implementation 'org.apache.tika:tika-parsers:2.9.2'
implementation 'org.apache.tika:tika-parser-pdf-module:2.9.2'
implementation 'org.apache.cxf:cxf-rt-frontend-jaxrs:3.6.4' // 4.x+ requires javax.xml.bind -> jakarta.xml.bind namespace change
implementation 'org.apache.tomcat:tomcat-catalina-ha:9.0.91' // Remember to change the version number (9 now) in javadoc block if needed.
implementation 'org.apache.tomcat:tomcat-jasper:9.0.91'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import java.util.Vector;
import java.util.WeakHashMap;

import jakarta.xml.bind.DatatypeConverter;
import javax.xml.bind.DatatypeConverter;
import javax.xml.parsers.ParserConfigurationException;

import org.apache.ofbiz.base.util.Debug;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
import org.apache.ofbiz.base.util.UtilXml;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.pdfbox.Loader;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDDocumentNameDictionary;
import org.apache.pdfbox.pdmodel.PDEmbeddedFilesNameTreeNode;
Expand Down Expand Up @@ -531,7 +530,7 @@ private static boolean isValidPdfFile(String fileName) {
}
// OK no JS code, pass to check 2: detect if the document has any embedded files
PDEmbeddedFilesNameTreeNode efTree = null;
try (PDDocument pdDocument = Loader.loadPDF(file)) {
try (PDDocument pdDocument = PDDocument.load(file)) {
PDDocumentNameDictionary names = new PDDocumentNameDictionary(pdDocument.getDocumentCatalog());
efTree = names.getEmbeddedFiles();
}
Expand Down

0 comments on commit fffa395

Please sign in to comment.