File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Could not parse knowledge
Joined: May 24, 2012
Jun 13, 2012 09:41:53
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'.
Joined: Jul 20, 2005
Jun 13, 2012 23:06:26
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
I agree. Here's the link:
subject: Could not parse knowledge
How to refer properties file in Jboss?
EOF Excepton trying to pass data from client to servlet
issues with JBoss while deploying a war file
How to get Session Value In different Requests
Jboss 5 database connection issues.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014