Hi Christian,
when I try to reuse the same prepared expression the second time with a different bound document I get the following array out of bound exception:
java.lang.ArrayIndexOutOfBoundsException: 5 at org.basex.query.up.Primitives.add(Primitives.java:52) at org.basex.query.up.DBPrimitives.add(DBPrimitives.java:40) at org.basex.query.up.Updates.add(Updates.java:91) at org.basex.query.up.Insert.atomic(Insert.java:102) at org.basex.query.up.Insert.atomic(Insert.java:1) at org.basex.query.expr.Expr.iter(Expr.java:53) at org.basex.query.QueryContext.iter(QueryContext.java:322) at org.basex.query.QueryContext.iter(QueryContext.java:290) at org.basex.api.xqj.BXQDynamicContext.execute(BXQDynamicContext.java:246) at org.basex.api.xqj.BXQPreparedExpression.executeQuery(BXQPreparedExpression.java:54) at NPEReproducer.reproduceNPE(NPEReproducer.java:51) at NPEReproducer.main(NPEReproducer.java:60)
I am enclosing a java class file that reproduces this problem against 6.1.3 basex jar files
Ciao Stefano
basex-talk@mailman.uni-konstanz.de