After looking at the sources, I suspect that this test saves into a PNG image and then compares this.

I now found out that when using PDFToImage to conert to PNG images, the files are much larger with jdk12 than with jdk8 :-( This may be related to the compression value in ImageIOUtils. In the past this didn't play any role => I will investigate. I don't have jdk11 on this system (although on another), but this is very suspicious.

jdk8: 214 KB at 240dpi
jdk12: 14789 KB at 240dpi

Alternatively, change the test so that the pixels are compared.

Tilman

Am 20.09.2019 um 14:43 schrieb Tim Allison:
PDFBox Colleagues,
   Do you know of any diffs between Java 8 and 11 that would affect the
extraction of images from PDFs?  Dan is getting a build failure
because of a hash mismatch.
   Thank you.

            Best,

                    Tim

On Fri, Sep 20, 2019 at 8:39 AM Dan Becker <[email protected]> wrote:
When one installs "sudo apt install -y default-jre" on Ubuntu 16.04, the
Tika build will be successful with the following tools:
vagrant@ubuntu-xenial:~/tika$ javac -version
javac 1.8.0_222
vagrant@ubuntu-xenial:~/tika$ java -version
openjdk version "1.8.0_222"

When one installs "sudo apt install -y default-jre" on Ubuntu 18.04, the
Tika build will FAIL with the following tools:
vagrant@ubuntu-bionic:~/tika$ javac -version
javac 11.0.4
vagrant@ubuntu-bionic:~/tika$ java -version
openjdk version "11.0.4" 2019-07-16

When one installs "sudo apt install -y openjdk-8-jdk" on Ubuntu 18.04, the
Tika build will FAIL with the following tools (Note the compiler has been
changed to jdk 8, but java has not):
vagrant@ubuntu-bionic:~/tika$ javac -version
javac 1.8.0_222
vagrant@ubuntu-bionic:~/tika$ java -version
openjdk version "11.0.4" 2019-07-16

If you switch the Java version with "echo 2 | sudo update-alternatives
  --config java" (Note "2" works for a clean bionic vagrant VM, but YMMV),
then the Tika build will be successful with the following tools:
vagrant@ubuntu-bionic:~/tika$ javac -version
javac 1.8.0_222
vagrant@ubuntu-bionic:~/tika$ java -version
openjdk version "1.8.0_222"

I suspect that there is some new issue with running Tika under Open JDK
11.0.4. I will continue to look for the root cause of that next week.


Dan
C: 301-524-8899


On Thu, Sep 19, 2019 at 1:00 PM Dan Becker <[email protected]> wrote:

It is a clean checkout and build with no local changes.

I tested against the stock Ubuntu 16.04, and all the tests passed.  The
only difference with the command sequence listed in the first email is
"vagrant init ubuntu/xenial64".

I retested Ubuntu 18.04 on a different host (different version of vagrant,
etc), and I got the same error, so the problem does "repro".

I will try to debug it further to determine the root cause.

Dan
C: 301-524-8899


On Thu, Sep 19, 2019 at 5:07 AM Nick Burch <[email protected]> wrote:

On Wed, 18 Sep 2019, Dan Becker wrote:
I am trying to build the master branch from Ubuntu 18.04, but I am
getting
the following error:

[ERROR] Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
1.409 s <<< FAILURE! - in org.apache.tika.server.UnpackerResourceTest
[ERROR] testPDFImages(org.apache.tika.server.UnpackerResourceTest)  Time
elapsed: 0.366 s  <<< FAILURE!
org.junit.ComparisonFailure:
expected:<[7c2f14acbb737672a1245f4ceb50622a]>
but was:<[58b8269d1a584b7e8c1adcb936123923]>
        at

org.apache.tika.server.UnpackerResourceTest.testPDFImages(UnpackerResourceTest.java:208)

Have you made any local changes first? Anything that might've been merged
in locally?

I'm building on Ubuntu 18.04 with Java 11, and the build completes fine
for me with no errors. Pretty sure some/most of our build servers are
Ubuntu too. So, not sure what's wrong for you...

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to