Hello all,


I receive a Jess rule through the network in XML format and when I try to
load it in the Rete engine, it throws an error. I know the rule itself is
valid.



Am I doing something wrong?



Thanks for the help and tips,

Pierre



Code:

for (String s : rules){

try {

            StringReader read = new StringReader(s);

            Jesp parser = new Jesp(read, Demo.engine.getEngine());

            parser.parse(false);

      } catch (JessException e) {

            e.printStackTrace();

      }

}



Error:

Jess reported an error in routine Jesp.parseExpression.

  Message: Expected a '(', constant, or global variable at token '&'.

  Program text: &  at line 22 in file <unknown>.

      at jess.Jesp.error(Unknown Source)

      at jess.Jesp.parseExpression(Unknown Source)

      at jess.Jesp.promptAndParseOneExpression(Unknown Source)

      at jess.Jesp.parse(Unknown Source)

      at jess.Jesp.parse(Unknown Source)

      at
agh.edu.pl.soa.yield.jess.middleware.Functional.putRules(Functional.java:100
)

      at
agh.edu.pl.soa.yield.jess.middleware.test.FunctionalTest.testPutRules(Functi
onalTest.java:59)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)

      at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at junit.framework.TestCase.runTest(TestCase.java:154)

      at junit.framework.TestCase.runBare(TestCase.java:127)

      at junit.framework.TestResult$1.protect(TestResult.java:106)

      at junit.framework.TestResult.runProtected(TestResult.java:124)

      at junit.framework.TestResult.run(TestResult.java:109)

      at junit.framework.TestCase.run(TestCase.java:118)

      at junit.framework.TestSuite.runTest(TestSuite.java:208)

      at junit.framework.TestSuite.run(TestSuite.java:203)

      at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T
estReference.java:130)

      at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3
8)

      at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:467)

      at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:683)

      at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:390)

      at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:197)





Which seems to come from the following line in the XML

            <funcall>

              <name>&gt;</name>

Reply via email to