Register / Login
File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of
Clojure in Action
this week in the
Could not parse knowledge
posted 3 years ago
I have been attempting to work with Drools and have mostly met with frustration.
My code involves a Bean, a class to read the DRL file but it gives an error given below the stack trace.
21:00:27,621 ERROR [stderr] (http--127.0.0.1-8080-1) Rule Compilation error : [Rule name='loginRule'] 21:00:27,621 ERROR [stderr] (http--127.0.0.1-8080-1) com/ri/Rule_loginRule_0.java (7:311) : Syntax error on token "inLogin", ( expected after this token 21:00:27,622 ERROR [stderr] (http--127.0.0.1-8080-1) com/ri/Rule_loginRule_0.java (7:311) : The method inLogin(login) is undefined for the type Rule_loginRule_0 21:00:27,626 ERROR [stderr] (http--127.0.0.1-8080-1) 21:00:27,627 ERROR [stderr] (http--127.0.0.1-8080-1) java.lang.IllegalArgumentException: Could not parse knowledge. 21:00:27,627 ERROR [stderr] (http--127.0.0.1-8080-1) at com.ri.dao.TestDAO.readKnowledgeBase(TestDAO.java:48)
my DRL file
rule "loginRule" when Login login( userName == "a" , userPassword == "a" ) then inLogin new login() ); end
My Login Bean
private String UserName; private String UserPassword; private boolean valid; and there getter and setter
Can you please provide me the correct DRL rule for my login page.I want a DRL file having a rule that username and Password must be 'a'.
posted 3 years ago
Looks like the at com.ri.dao.TestDAO.readKnowledgeBase method is eating up the real exception stacktrace. You might want to print the entire exception stacktrace and see what exactly is wrong.
By the way, for Drools related questions, you might have a better chance of getting your questions answered in their user mailing list
It is sorta covered in the
JavaRanch Style Guide
How to get Session Value In different Requests
Jboss 5 database connection issues.
How to refer properties file in Jboss?
issues with JBoss while deploying a war file
EOF Excepton trying to pass data from client to servlet