Project

Profile

Help

Bug #6401

closed

Exception running transform: NullPointer exception found: net.sf.saxon.s9api.SaxonApiException

Added by O'Neil Delpratt 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2024-04-24
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
12
Fixed in Maintenance Release:
Found in version:
12.4.2
Fixed in version:
12.5
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Reported by user in the forum post: https://saxonica.plan.io/boards/4/topics/9646?r=9650#message-9650

I'm getting an NPE when I try setting a filename on the executable:

Python code:

        message_path: str = output_dir.joinpath('xslt-messages.xml').as_posix()
        executable.set_save_xsl_message(True, message_path);
        executable.transform_to_file(xdm_node=document)

Which results in this exception:

[ERROR] Exception running transform: NullPointer exception found: net.sf.saxon.s9api.SaxonApiException
        at net.sf.saxon.option.cpp.Xslt30Processor.transformToFile(Xslt30Processor.java:1585)
Caused by: java.lang.NullPointerException
        at net.sf.saxon.option.cpp.SaxonCMessageListener.<init>(SaxonCMessageListener.java:46)
        at net.sf.saxon.option.cpp.Xslt30Processor.applyXsltTransformerProperties(Xslt30Processor.java:1716)
        at net.sf.saxon.option.cpp.Xslt30Processor.transformToFile(Xslt30Processor.java:1561)

Please register to edit this issue

Also available in: Atom PDF