Project

Profile

Help

Bug #2299

closed

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

Added by Gunther Rademacher over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Build and release
Sprint/Milestone:
Start date:
2015-01-23
Due date:
% Done:

100%

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

Description

This command line XQuery works with Saxon-EE-9.5.1.8, 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 over 7 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 over 7 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 over 7 years ago

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

Bug fix applied in the Saxon 9.6.0.5 maintenance release.

Actions #4

Updated by O'Neil Delpratt over 6 years ago

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

Please register to edit this issue

Also available in: Atom PDF