I am trying to implement drools decision table. When i implemented my own sample code i am getting below error : java.lang.RuntimeException: Error while creating KieBase.
The error visible in console of my Eclipse IDE is :
java.lang.RuntimeException: Error while creating KieBase[Message [id=1, kieBase=patient, level=ERROR, path=PatientDecisionTable.xls, line=10, column=0 text=[ERR 101] Line 10:21 no viable alternative at input ''], Message [id=2, kieBase=patient, level=ERROR, path=PatientDecisionTable.xls, line=10, column=0 text=[ERR 101] Line 10:81 no viable alternative at input ''], Message [id=3, kieBase=patient, level=ERROR, path=PatientDecisionTable.xls, line=0, column=0 text=Parser returned a null Package]] at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:557) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:682) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:650) at com.Lab.Genomics.Run.PatientRun.main(PatientRun.java:15)
My Main method is contained in below class:
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;
import com.Lab.Genomics.model.Patient;
public class PatientRun {
public static void main(String[] args) {
// TODO Auto-generated method stub
try{
KieServices ks= KieServices.Factory.get();
KieContainer kContainer=ks.getKieClasspathContainer();
KieSession kSession= kContainer.newKieSession("ksession-patient");
Patient patientObject= new Patient();
patientObject.setBcConfirmed(1);
patientObject.setBcEarlyStage(1);
patientObject.setMetastatisSymptom(1);
patientObject.setName("Sumit");
patientObject.setPatientId(01);
kSession.insert(patientObject);
kSession.fireAllRules();
}catch(Exception e){
e.printStackTrace();
}
}
}
Patient is my pojo.
My decision table is as below:
My project directory is as below:
I am unable to find what error is present in the decision table . When i run the main method i get error as mentioned above.
I found a question for drools decision table here decision table error , but this not my case as i checked.
I have tried searching and still trying. Any reference or help is highly appreciated.