Thanks, I'm testing it and will commit after that. Nice find. I'm wondering why this worked for so many years.

Tilman

On 21.10.2023 08:02, axh wrote:
Hi,

I opened PDFBOX-5705 <https://issues.apache.org/jira/browse/PDFBOX-5705> for 
this and created a patch. Everything seems to work, but please verify in Jenkins. 
Sorry that Jira somehow changed priority to „important“ without me noticing. My 
internet connection is somewhat unreliable today and every click in Jira takes 
several tries to get through so I will just leave it at that if it’s ok for you.

Axel

Am 20.10.2023 um 09:52 schrieb axh <[email protected]>:

Ah, this is weird. Log4J2 currently isn’t used at all in the PDFBox code base. 
But when running tests and examples, log4j-core and log4j-jcl are included to 
reroute commons logging to log4j2 which is then used to set the output format 
and create the log file you mentioned. It seems that with the updated version, 
the commons logging to log4j bridge simply isn’t loaded anymore.

This is also something that will get better once we switch directly to log4j.

I’ll keep you updated when I find out why log4j-jcl isn’t loaded.

Axel

Am 20.10.2023 um 08:11 schrieb Tilman Hausherr <[email protected]>:

Yes, although the log file isn't part of the distribution (or is it?) I 
wondered why it wasn't there. And then I noticed that the logging didn't work 
anymore, i.e. the typical output format wasn't there in the console. And not in 
the file either. And the same happened at work with another software of mine.

@Axel the "Files differ" lines are not a problem, this always happens. I check these 
manually or with a modified code and my own "expected" files.

Tilman

On 20.10.2023 07:55, Andreas Lehmkühler wrote:

Am 20.10.23 um 07:17 schrieb axh:
Hm… I just did a clean checkout of trunk and did mvn clean verify and 
everything passes, both with log4j2.version set to 2.20.0 and 2.21.0. I can 
however see file differences reported in the log like this:
The buidl itself works fine after the update. The Jenkins build adds another 
step to the end which fails. An expected log file is missing:

ERROR: Step ?Archive the artifacts? failed: No artifacts found that match the file 
pattern "pdfbox/target/pdfbox.log". Configuration error?


See [1] for further details

[1] https://ci-builds.apache.org/job/PDFBox/job/PDFBox-trunk/1823/console


[INFO] Running org.apache.pdfbox.pdmodel.interactive.form.PDAcroFormTest
Files differ: 
/Users/axelhowind/IdeaProjects/pdfbox/pdfbox/src/test/resources/org/apache/pdfbox/pdmodel/interactive/form/MultilineFields.pdf-1.png
/Users/axelhowind/IdeaProjects/pdfbox/pdfbox/target/test-output/MultilineFields.pdf-1.png
Rendering of target/test-output/MultilineFields.pdf failed or is not identical 
to expected rendering in 
src/test/resources/org/apache/pdfbox/pdmodel/interactive/form directory
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.027 s 
-- in org.apache.pdfbox.pdmodel.interactive.form.MultilineFieldsTest

But these are not reported as test failures. In the test code, I can see that 
this is by design:

// compare rendering
if (!TestPDFToImage.doTestFile(pdf, IN_DIR.getAbsolutePath(), 
OUT_DIR.getAbsolutePath()))
{
     // don't fail, rendering is different on different systems, result must be 
viewed manually
     System.err.println("Rendering of " + pdf + " failed or is not identical to expected 
rendering in " + IN_DIR + " directory");
}
What exactly does "it no longer works" mean? Is it related to the above, or is 
it the build failures reported by Jenkins on the list?

Axel

Am 20.10.2023 um 06:50 schrieb axh <[email protected]>:

Hi,

just saw your message here. As I just started on replacing commons-logging by 
log4j, I will also look into this. I also overlooked that there’s already a 
property for the log4j version. Will update the patch I just submitted and then 
see if I can find out what’s causing the test failure with 2.21.0.

Axel

Am 19.10.2023 um 19:06 schrieb Tilman Hausherr <[email protected]>:

I have reverted the change to the log4j2 version. It no longer works. I'll wait 
a bit if there is an issue about it, there was nothing on the mailing list 
today.

Tilman


---------------------------------------------------------------------
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]


---------------------------------------------------------------------
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]


---------------------------------------------------------------------
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