Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1129

NullPointerException in Query Transformation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Jena 3.1.0
    • Jena 3.1.0
    • ARQ
    • None

    Description

      Query query = QueryFactory.create(
      		  " ASK { "
      		+ "		FILTER NOT EXISTS {"
      		+ "			BIND (?width * ?height AS ?value)"
      		+ "		}"
      		+ "	}");
      QueryTransformOps.transform(query, new HashMap<Var,Node>());
      

      ->

      java.lang.NullPointerException
      	at org.apache.jena.sparql.expr.ExprVar.apply(ExprVar.java:92)
      	at org.apache.jena.sparql.expr.ExprTransformer$ApplyExprTransformVisitor.visit(ExprTransformer.java:176)
      	at org.apache.jena.sparql.expr.ExprVar.visit(ExprVar.java:90)
      	at org.apache.jena.sparql.expr.ExprWalker$Walker.visit(ExprWalker.java:97)
      	at org.apache.jena.sparql.expr.ExprWalker$WalkerBottomUp.visit(ExprWalker.java:113)
      	at org.apache.jena.sparql.expr.ExprVar.visit(ExprVar.java:90)
      	at org.apache.jena.sparql.expr.ExprWalker$Walker.visitExprFunction(ExprWalker.java:68)
      	at org.apache.jena.sparql.expr.ExprVisitorFunction.visit(ExprVisitorFunction.java:29)
      	at org.apache.jena.sparql.expr.ExprFunction2.visit(ExprFunction2.java:109)
      	at org.apache.jena.sparql.expr.ExprWalker.walk(ExprWalker.java:36)
      	at org.apache.jena.sparql.expr.ExprTransformer.transformation(ExprTransformer.java:62)
      	at org.apache.jena.sparql.expr.ExprTransformer.transformation(ExprTransformer.java:45)
      	at org.apache.jena.sparql.expr.ExprTransformer.transform(ExprTransformer.java:36)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer$ApplyTransformVisitor.visit(ElementTransformer.java:159)
      	at org.apache.jena.sparql.syntax.ElementWalker$Walker.visit(ElementWalker.java:100)
      	at org.apache.jena.sparql.syntax.ElementBind.visit(ElementBind.java:68)
      	at org.apache.jena.sparql.syntax.ElementWalker$Walker.visit(ElementWalker.java:127)
      	at org.apache.jena.sparql.syntax.ElementGroup.visit(ElementGroup.java:120)
      	at org.apache.jena.sparql.syntax.ElementWalker.walk(ElementWalker.java:39)
      	at org.apache.jena.sparql.syntax.ElementWalker.walk(ElementWalker.java:33)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.applyTransformation(ElementTransformer.java:89)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transformation(ElementTransformer.java:83)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transformation(ElementTransformer.java:74)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transform(ElementTransformer.java:66)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transform(ElementTransformer.java:56)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ExprTransformNodeElement.transform(ExprTransformNodeElement.java:67)
      	at org.apache.jena.sparql.expr.ExprFunctionOp.apply(ExprFunctionOp.java:98)
      	at org.apache.jena.sparql.expr.ExprTransformer$ApplyExprTransformVisitor.visit(ExprTransformer.java:161)
      	at org.apache.jena.sparql.expr.ExprFunctionOp.visit(ExprFunctionOp.java:97)
      	at org.apache.jena.sparql.expr.ExprWalker$Walker.visit(ExprWalker.java:92)
      	at org.apache.jena.sparql.expr.ExprWalker$WalkerBottomUp.visit(ExprWalker.java:113)
      	at org.apache.jena.sparql.expr.ExprFunctionOp.visit(ExprFunctionOp.java:97)
      	at org.apache.jena.sparql.expr.ExprWalker.walk(ExprWalker.java:36)
      	at org.apache.jena.sparql.expr.ExprTransformer.transformation(ExprTransformer.java:62)
      	at org.apache.jena.sparql.expr.ExprTransformer.transformation(ExprTransformer.java:45)
      	at org.apache.jena.sparql.expr.ExprTransformer.transform(ExprTransformer.java:36)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer$ApplyTransformVisitor.transformExpr(ElementTransformer.java:286)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer$ApplyTransformVisitor.visit(ElementTransformer.java:139)
      	at org.apache.jena.sparql.syntax.ElementWalker$Walker.visit(ElementWalker.java:84)
      	at org.apache.jena.sparql.syntax.ElementFilter.visit(ElementFilter.java:35)
      	at org.apache.jena.sparql.syntax.ElementWalker$Walker.visit(ElementWalker.java:127)
      	at org.apache.jena.sparql.syntax.ElementGroup.visit(ElementGroup.java:120)
      	at org.apache.jena.sparql.syntax.ElementWalker.walk(ElementWalker.java:39)
      	at org.apache.jena.sparql.syntax.ElementWalker.walk(ElementWalker.java:33)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.applyTransformation(ElementTransformer.java:89)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transformation(ElementTransformer.java:83)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transformation(ElementTransformer.java:74)
      	at org.apache.jena.sparql.syntax.syntaxtransform.ElementTransformer.transform(ElementTransformer.java:61)
      	at org.apache.jena.sparql.syntax.syntaxtransform.QueryTransformOps.transform(QueryTransformOps.java:57)
      	at org.apache.jena.sparql.syntax.syntaxtransform.QueryTransformOps.transform(QueryTransformOps.java:46)
      

      Attachments

        Activity

          People

            andy Andy Seaborne
            Holger Knublauch Holger Knublauch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: