Project

Profile

Help

Bug #6000

open

net.sf.saxon.trans.LicenseException: Failed to read license file /usr/lib/saxon-license.lic

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

Status:
New
Priority:
Low
Category:
Saxon-C Internals
Start date:
2023-04-27
Due date:
% Done:

0%

Estimated time:
Found in version:
12.1
Fixed in version:
Platforms:

Description

Given the follow python script:

proc = PySaxonProcessor(license=True)
proc.set_configuration_property("http://saxon.sf.net/feature/licenseFileLocation", "/usr/lib/saxon-license.lic")

xsltproc = proc.new_xslt30_processor()

If the license file is not fould using the @set_configuration property@ it will crash as follows:

net.sf.saxon.trans.LicenseException: Failed to read license file /usr/lib/saxon-license.lic
    at com.saxonica.config.Verifier.loadLicense(Verifier.java:130)
    at com.saxonica.config.ProfessionalConfiguration.setConfigurationProperty(ProfessionalConfiguration.java:230)
    at net.sf.saxon.s9api.Processor.setConfigurationProperty(Processor.java:402)
    at net.sf.saxon.option.cpp.SaxonCAPI.applyToConfiguration(SaxonCAPI.java:569)

The problem is the @applyToConfiguration@ method in the class SaxonCAPI does not have graalvm exception handling annotation. We also need to add code in the C++ API to thrown the exception as a @SaxonApiException@

Please register to edit this issue

Also available in: Atom PDF