[jira] [Commented] (FOP-3275) Support for Java 25 (Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.)

"Matteo Franci (Jira)" <[email protected]>
Newsgroups gmane.text.xml.fop.devel
Message-ID <[email protected]>
    [ https://issues.apache.org/jira/browse/FOP-3275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18022066#comment-18022066 ] 

Matteo Franci commented on FOP-3275:
------------------------------------

Hello [~ssteiner] so it will be treated just like a OpenJDK bug?

There is another small issue on one TestCase on Java 25.
 
{code:java}
FontFileFinderTestCase.testValidEventListener() {code}
The output is : 
 
{code:java}
Wanted but not invoked:
fontEventListener.fontDirectoryNotFound(
    <any>,
    <any>
);
-> at org.apache.fop.fonts.autodetect.FontFileFinderTestCase.testValidEventListener(FontFileFinderTestCase.java:86)
Actually, there were zero interactions with this mock.Wanted but not invoked:
fontEventListener.fontDirectoryNotFound(
    <any>,
    <any>
);
-> at org.apache.fop.fonts.autodetect.FontFileFinderTestCase.testValidEventListener(FontFileFinderTestCase.java:86)
Actually, there were zero interactions with this mock. {code}
It depends on the fact : 

 

Here is a reproducer : 

 
{code:java}
import java.io.File;
import java.io.IOException;

public class TestFile {

    public static void main( String[] args ) throws IOException {
        File file = new File("");
        System.out.println( String.format( "java version: %s, file exists? : %s, path name : %s",
                System.getProperty("java.version") , file.exists(), file.getCanonicalPath() ) );
    }

} {code}
 

 

Output on java 21 : 

java version: 21.0.2, file exists? : false, path name : /home/user/test-project

And on java 25 : 

java version: 25, file exists? : true, path name : /home/user/test-project

The resolved path canonical name "/home/user/test-project" actually exists, so mayb java 21 is right here.

Maybe be this is work fixing changing the test case input? here is a simple PR that seems to work on all java version : 

https://github.com/apache/xmlgraphics-fop/pull/90

 

> Support for Java 25 (Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.)
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FOP-3275
>                 URL: https://issues.apache.org/jira/browse/FOP-3275
>             Project: FOP
>          Issue Type: Bug
>    Affects Versions: 2.11
>         Environment: Tested on 
> Ubuntu 24.04.3 LTS (Noble Numbat)
> Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
> Maven home: /workspace/runtime/java/apache-maven-latest
> Java version: 25, vendor: Oracle Corporation, runtime: /omnia/workspace/runtime/java/jdk-25
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "6.8.0-83-generic", arch: "amd64", family: "unix"
> And java : 
> java version "25" 2025-09-16 LTS
> Java(TM) SE Runtime Environment (build 25+37-LTS-3491)
> Java HotSpot(TM) 64-Bit Server VM (build 25+37-LTS-3491, mixed mode, sharing)
> Tried with the same build for MacOS (ARM) too.
>            Reporter: Matteo Franci
>            Priority: Major
>
> Hello. 
> First of all thank you all for your great work on Apache FOP (i've been using it since more than a decade and I'm very happy with it).
> As you know [September 16th java 25 went on General Availability.|https://openjdk.org/projects/jdk/25/]
> I was trying it on a few projects and they failed with the error :
>  
> {code:java}
> Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing. {code}
> I tried a java 25 build on the current main of Apache FOP GitHub repository [https://github.com/apache/xmlgraphics-fop] and a few test case failed with the same error, for example : 
>  
>  
> {code:java}
> Failed tests: 
>   FontsAutoDetectTestCase>BaseConstructiveUserConfigTest.testUserConfig:50 Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
>   FontsDirectoryRecursiveTestCase>BaseConstructiveUserConfigTest.testUserConfig:50 Error reading event-model.xml: org.xml.sax.SAXException: FWK005 parse may not be called while parsing.
>   FontFileFinderTestCase.testValidEventListener:86 
> Wanted but not invoked:
> fontEventListener.fontDirectoryNotFound(
>     <any>,
>     <any>
> ); 
> {code}
> Are you experiencing this issue too? Any idea on how to fix it?
> NOTE: Maybe this should be an Improvement instead of a bug, in case feel free to change the issue type.
> Thanks in advance.
> Matteo



--
This message was sent by Atlassian Jira
(v8.20.10#820010)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.