evaluator index out of bound (max elements 1000)

User 677b9c22ff

22-07-2008 02:43:21

Hi,


I use a evaluator schema with more than 1000 elements and get the following errror: The reason is I don't want to use the API code because the


evaluator is quite comfortable. However I know how to use the API (with simple code).





Just an example from SMARTS





array(


matchCount("[OH1]
  • "),


    .. 10k elements


    matchcount("C(
  • )(
  • )(
  • )
  • "))





    use as evaluate -e test.xml "CCC"





    JCHEM Version is 4.1.13


    Cheers


    Tobias








    1000


    at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:477)


    at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:150)


    at chemaxon.jep.Evaluator.main(Evaluator.java:868)


    Error 1:


    java.lang.ArrayIndexOutOfBoundsException: 1000


    at chemaxon.nfunk.jep.util.OptStack.push(OptStack.java:29)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:423)


    at chemaxon.nfunk.jep.ASTConstant.jjtAccept(ASTConstant.java:42)


    at chemaxon.nfunk.jep.SimpleNode.childrenAccept(SimpleNode.java:70)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:268)


    at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:60)


    at chemaxon.nfunk.jep.SimpleNode.childrenAccept(SimpleNode.java:70)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:268)


    at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:60)


    at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:156)


    at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:470)


    at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:150)


    at chemaxon.jep.Evaluator.main(Evaluator.java:868)


    Error 2:


    ERRORS:


    Error 1:


    1000


    ------------------------------


    TRACES:


    chemaxon.nfunk.jep.ParseException:


    1000


    at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:160)


    at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:470)


    at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:150)


    at chemaxon.jep.Evaluator.main(Evaluator.java:868)


    Error 1:


    java.lang.ArrayIndexOutOfBoundsException: 1000


    at chemaxon.nfunk.jep.util.OptStack.push(OptStack.java:29)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:423)


    at chemaxon.nfunk.jep.ASTConstant.jjtAccept(ASTConstant.java:42)


    at chemaxon.nfunk.jep.SimpleNode.childrenAccept(SimpleNode.java:70)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:268)


    at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:60)


    at chemaxon.nfunk.jep.SimpleNode.childrenAccept(SimpleNode.java:70)


    at chemaxon.nfunk.jep.EvaluatorVisitor.visit(EvaluatorVisitor.java:268)


    at chemaxon.nfunk.jep.ASTFunNode.jjtAccept(ASTFunNode.java:60)


    at chemaxon.nfunk.jep.EvaluatorVisitor.getValue(EvaluatorVisitor.java:156)


    at chemaxon.nfunk.jep.JEP.getValueAsObject(JEP.java:470)


    at chemaxon.jep.ChemJEP.evaluate(ChemJEP.java:150)


    at chemaxon.jep.Evaluator.main(Evaluator.java:868)
  • ChemAxon e08c317633

    22-07-2008 08:56:26

    Hi,





    The exception is thrown because there is a size limitation in chemaxon.nfunk.jep.util.OptStack. It already has been fixed in JChem 5.1 (will be released soon), and we will fix it in JChem 5.0.7 too.





    Regards,


    Zsolt