You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the best way to ilustrate the issue is through a JQplay snapshpt
When trying to evalute that using the library, the code throws a null pointer exception
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.isIntegralNumber()" because "lhs" is null
at net.thisptr.jackson.jq.internal.operators.PlusOperator.apply(PlusOperator.java:19)
at net.thisptr.jackson.jq.internal.tree.binaryop.assignment.ComplexAssignment.lambda$null$1(ComplexAssignment.java:41)
at net.thisptr.jackson.jq.path.ObjectFieldPath.mutate(ObjectFieldPath.java:69)
at net.thisptr.jackson.jq.path.ObjectFieldPath.lambda$mutate$1(ObjectFieldPath.java:52)
at net.thisptr.jackson.jq.path.RootPath.mutate(RootPath.java:30)
at net.thisptr.jackson.jq.path.ObjectFieldPath.mutate(ObjectFieldPath.java:51)
at net.thisptr.jackson.jq.path.Path.mutate(Path.java:20)
at net.thisptr.jackson.jq.internal.tree.binaryop.assignment.ComplexAssignment.lambda$apply$2(ComplexAssignment.java:41)
at net.thisptr.jackson.jq.Output.emit(Output.java:14)
at net.thisptr.jackson.jq.internal.tree.ArrayConstruction.apply(ArrayConstruction.java:28)
at net.thisptr.jackson.jq.Expression.apply(Expression.java:11)
at net.thisptr.jackson.jq.internal.tree.binaryop.assignment.ComplexAssignment.apply(ComplexAssignment.java:29)
at net.thisptr.jackson.jq.Expression.apply(Expression.java:11)
at io.serverlessworkflow.impl.expressions.JQExpression.eval(JQExpression.java:184)
at io.serverlessworkflow.impl.executors.AbstractTaskExecutor.lambda$2(AbstractTaskExecutor.java:94)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at io.serverlessworkflow.impl.executors.AbstractTaskExecutor.apply(AbstractTaskExecutor.java:93)
at io.serverlessworkflow.impl.WorkflowUtils.processTaskList(WorkflowUtils.java:155)
at io.serverlessworkflow.impl.executors.ForExecutor.internalExecute(ForExecutor.java:55)
at io.serverlessworkflow.impl.executors.AbstractTaskExecutor.apply(AbstractTaskExecutor.java:92)
at io.serverlessworkflow.impl.WorkflowUtils.processTaskList(WorkflowUtils.java:155)
at io.serverlessworkflow.impl.WorkflowInstance.<init>(WorkflowInstance.java:36)
at io.serverlessworkflow.impl.WorkflowDefinition.execute(WorkflowDefinition.java:100)
at io.serverlessworkflow.impl.WorkflowDefinitionTest.testWorkflowExecution(WorkflowDefinitionTest.java:44)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
The text was updated successfully, but these errors were encountered:
fjtirado
added a commit
to fjtirado/jackson-jq
that referenced
this issue
Nov 26, 2024
fjtirado
changed the title
NullPointerException when propery is not present in context json
NullPointerException when property is not present in context json
Dec 3, 2024
I think the best way to ilustrate the issue is through a JQplay snapshpt
When trying to evalute that using the library, the code throws a null pointer exception
The text was updated successfully, but these errors were encountered: