Bug #2120
closedNullPointerException if there's no license key
100%
Description
I run a small XSLT 3.0 stylesheet using SaxonEE9-5-1-6J.
If I install my license key everything is working just fine. But, if NO license key is installed i get the following error:
java.lang.NullPointerException
stack:
com.saxonica.config.ProfessionalConfiguration.loadLicense(ProfessionalConfiguration.java:391)
com.saxonica.config.ProfessionalConfiguration.isLicensedFeature(ProfessionalConfiguration.java:367)
com.saxonica.config.ProfessionalConfiguration.makeStyleNodeFactory(ProfessionalConfiguration.java:504)
net.sf.saxon.PreparedStylesheet.(PreparedStylesheet.java:87)
net.sf.saxon.PreparedStylesheet.compile(PreparedStylesheet.java:113)
net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:330)
Any ideas why I get a NullPointerException instead of a 'normal' execption? Is this a bug in Saxon?
Here's my Java code:
Configuration configuration = new com.saxonica.config.ProfessionalConfiguration();
Processor processor = new Processor(configuration);
XsltCompiler compiler = processor.newXsltCompiler();
XsltExecutable executable = compiler.compile(...);
Thank you.
Related issues
Updated by Michael Kay over 10 years ago
- Category set to Build and release
- Assignee set to Michael Kay
- Priority changed from Low to Normal
Thanks for reporting: same problem as 2119 which we fixed a couple of days ago. We've committed a patch to subversion. As a workaround, if you can, try to avoid creating a ProfessionalConfiguration or EnterpriseConfiguration if there's no license key. It's better to create an ordinary net.sf.saxon.Configuration instead, then Saxon won't go through all the process of looking for a license key and trying to recover when it doesn't find one.
Updated by Michael Kay over 10 years ago
- Status changed from New to Resolved
Resolved - see bug #2119 for details
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.5.1.10
Updated by O'Neil Delpratt almost 9 years ago
- Fixed in version deleted (
9.5.1.10) - Applies to branch 9.5 added
- Fix Committed on Branch 9.5 added
- Fixed in Maintenance Release 9.5.1.7 added
Please register to edit this issue