0 Replies Latest reply on May 10, 2018 3:23 PM by Rajasekhar Lekkal

    ERROR 31580 --- [nio-8080-exec-1] o.d.c.kie.builder.impl.KieProject        : Unable to build KieBaseModel:rules

    Rajasekhar Lekkal Newbie

      Hi Team,

       

      I am getting the below exception while processing the decision table:

       

      2018-05-10 23:32:11.225 ERROR 31580 --- [nio-8080-exec-1] o.d.c.kie.builder.impl.KieProject        : Unable to build KieBaseModel:rules

      [7,5]: [ERR 102] Line 7:5 mismatched input ':' in rule "Scenario 1"

      [17,5]: [ERR 102] Line 17:5 mismatched input ':' in rule "Scenario 2"

      [27,5]: [ERR 102] Line 27:5 mismatched input ':' in rule "Scenario 3"

      [37,5]: [ERR 102] Line 37:5 mismatched input ':' in rule "Scenario 4"

      [47,5]: [ERR 102] Line 47:5 mismatched input ':' in rule "Scenario 5"

      [57,5]: [ERR 102] Line 57:5 mismatched input ':' in rule "Scenario 6"

      [67,5]: [ERR 102] Line 67:5 mismatched input ':' in rule "Scenario 7"

      [77,5]: [ERR 102] Line 77:5 mismatched input ':' in rule "Scenario 8"

      [0,0]: Parser returned a null Package

       

       

      java.lang.RuntimeException: Error while creating KieBase[Message [id=1, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=7, column=0

         text=[ERR 102] Line 7:5 mismatched input ':' in rule "Scenario 1"], Message [id=2, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=17, column=0

         text=[ERR 102] Line 17:5 mismatched input ':' in rule "Scenario 2"], Message [id=3, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=27, column=0

         text=[ERR 102] Line 27:5 mismatched input ':' in rule "Scenario 3"], Message [id=4, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=37, column=0

         text=[ERR 102] Line 37:5 mismatched input ':' in rule "Scenario 4"], Message [id=5, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=47, column=0

         text=[ERR 102] Line 47:5 mismatched input ':' in rule "Scenario 5"], Message [id=6, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=57, column=0

         text=[ERR 102] Line 57:5 mismatched input ':' in rule "Scenario 6"], Message [id=7, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=67, column=0

         text=[ERR 102] Line 67:5 mismatched input ':' in rule "Scenario 7"], Message [id=8, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=77, column=0

         text=[ERR 102] Line 77:5 mismatched input ':' in rule "Scenario 8"], Message [id=9, kieBase=rules, level=ERROR, path=C:\Users\rlekkala\letterbox\droolsdemo\bin\main\rules\rules.xls, line=0, column=0

         text=Parser returned a null Package]]

      at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:554)

      at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:679)

      at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:647)

      at com.example.demo.AndGateController.fireRules(AndGateController.java:33)

      at com.example.demo.AndGateController.andController(AndGateController.java:22)

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

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

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

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

      at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)

      at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)

      at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)

      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:877)

      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:783)

      at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)

      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)

      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)

      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:877)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)

      at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:851)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:109)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)

      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)

      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)

      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)

      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1468)

      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

       

       

      dependencies:

       

      compile('org.springframework.boot:spring-boot-starter-web')

      compile('org.kie:kie-api:7.5.0.Final')

      compile('org.drools:drools-core:7.5.0.Final')

      compile('org.drools:drools-compiler:7.5.0.Final')

      compile('org.kie:kie-ci:7.5.0.Final')

      compile('org.drools:drools-decisiontables:7.5.0.Final')

       

           

      RuleSetrules
      Importcom.example.demo.model.AndGate
      NotesDecision tables for AndGate calculation
      RuleTable AndGateCalculate
      NAMECONDITIONCONDITIONCONDITIONACTION
      and: AndGate
      a==$paramb==$paramc==$paramand.setResult($param);
      NAMEabcSet Result
      Scenario 1"0""0""0"0
      Scenario 2"0""0""1"0
      Scenario 3"0""1""0"0
      Scenario 4"0""1""1"0
      Scenario 5"1""0""0"0
      Scenario 6"1""0""1"0
      Scenario 7"1""1""0"0
      Scenario 8"1""1""1"0