Bug #2299


Saxon-EE rejects recursive XQuery function, when there is no license file

Added by Gunther Rademacher about 9 years ago. Updated over 8 years ago.

Build and release
Start date:
Due date:
% Done:


Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:


This command line XQuery works with Saxon-EE-, even when there is no license file around:

java net.sf.saxon.Query -qs:"declare function local:fac($n) {if ($n le 1) then 1 else $n * local:fac($n - 1)}; local:fac(7)"

When using 9.6, it is rejected like this

No license file found - running with licensable features disabled
Query processing failed: License file saxon-license.lic not found. Tried in file:/.../saxon-license.lic, and classpath. A license is needed to use Reflexive extension functions

but it does not actually use reflexive extension functions or other licensable features.

Actions #1

Updated by Michael Kay about 9 years ago

  • Category set to Build and release
  • Status changed from New to In Progress
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal

Thanks for reporting it.

This is not the intended behaviour. The code is written to attempt to load the license file, and to catch the exception if this fails. If the reason for failure is that the license file doesn't exist, it should carry on in "unlicensed" mode (ie. as if running Saxon-HE). But if an invalid or expired license is found, it should fail explaining the reason.

Actions #2

Updated by Michael Kay about 9 years ago

  • Status changed from In Progress to Resolved

Sorry, there was misinformation in the previous message. The query "2+2" doesn't fail. I wasn't running what I thought I was running.

The failure actually occurs if there is any function call present where the binding algorithm for function calls considers the possibility that it might be a reflexive extension function. This will include any call to a user-defined function that is not a backwards reference, that is, a forwards reference or a recursive reference.

Source code fixed on the 9.6 and 9.7 branches.

Actions #3

Updated by O'Neil Delpratt about 9 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Found in version changed from to 9.6
  • Fixed in version set to

Bug fix applied in the Saxon maintenance release.

Actions #4

Updated by O'Neil Delpratt over 8 years ago

  • Sprint/Milestone set to
  • Applies to branch 9.6 added
  • Fix Committed on Branch 9.6 added
  • Fixed in Maintenance Release added

Please register to edit this issue

Also available in: Atom PDF