Project

Profile

Help

Bug #6149

closed

$connection?close() throws NullPointerException

Added by Johan Gheys 10 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2023-07-31
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
Java

Description

When we want to close an Oracle db using the instruction

<saxon:do action="$connection?close()"/>

we get the following error message:

java.lang.NullPointerException
	at net.sf.saxon.expr.LookupExpression$LookupElaborator.lambda$elaborateForPull$14(LookupExpression.java:618)
	at net.sf.saxon.expr.SequenceMapper.map(SequenceMapper.java:51)
	at net.sf.saxon.expr.MappingIterator.next(MappingIterator.java:81)
	at net.sf.saxon.expr.CardinalityCheckingIterator.<init>(CardinalityCheckingIterator.java:55)
	at net.sf.saxon.expr.CardinalityChecker.checkCardinality(CardinalityChecker.java:257)
	at net.sf.saxon.expr.CardinalityChecker$CardinalityCheckerElaborator.lambda$elaborateForPull$0(CardinalityChecker.java:502)
	at net.sf.saxon.expr.elab.PullElaborator.lambda$elaborateForItem$1(PullElaborator.java:54)
	at net.sf.saxon.expr.ItemChecker$ItemCheckerElaborator.lambda$elaborateForItem$1(ItemChecker.java:462)
	at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:319)
	at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
	at com.saxonica.xsltextn.instruct.DoInstr$DoInstructionElaborator.lambda$elaborateForPush$0(DoInstr.java:91)
	at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPush$10(Choose.java:1168)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:269)
	at net.sf.saxon.expr.instruct.CallTemplate$CallTemplateElaborator.lambda$elaborateForPush$1(CallTemplate.java:633)
	at net.sf.saxon.expr.instruct.Block$BlockElaborator.lambda$elaborateForPush$4(Block.java:895)
	at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPush$6(LetExpression.java:942)
	at net.sf.saxon.expr.TryCatch$TryCatchElaborator.lambda$elaborateForPush$1(TryCatch.java:340)
	at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:269)
	at net.sf.saxon.trans.XsltController.callTemplate(XsltController.java:872)
	at net.sf.saxon.s9api.Xslt30Transformer.callTemplate(Xslt30Transformer.java:503)
	at net.sf.saxon.Transform.processFile(Transform.java:1375)
	at net.sf.saxon.Transform.doTransform(Transform.java:879)
	at net.sf.saxon.Transform.main(Transform.java:83)
Fatal error during transformation: java.lang.NullPointerException:  (no message)

2 additional observations:

  • <sql:close connection="$connection"/> works fine
  • there is no error when closing a sqlite database

Please register to edit this issue

Also available in: Atom PDF