[
https://jira.jboss.org/jira/browse/JBRULES-1702?page=com.atlassian.jira.p...
]
Jaroslaw Kijanowski updated JBRULES-1702:
-----------------------------------------
Attachment: facts.jar
facts-src.jar
There was no more stack trace.
I'm attaching the model jar (bin and src).
An easier way to reproduce: create a category, upload the facts and then upload the xls
file and validate it, you'll get that NPE. That worked fine before.
Now I'm on rev #21320
And I get this stack trace when I click on view source:
10:52:01,568 INFO [STDOUT] ERROR 01-08 10:52:01,567
(GWTToSeamAdapter.java:callWebRemoteMethod:81) Error invoking a service
java.lang.NullPointerException
at org.drools.template.model.Package.renderDRL(Package.java:84)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:54)
at
org.drools.guvnor.server.contenthandler.DecisionTableXLSHandler.assembleDRL(DecisionTableXLSHandler.java:55)
at
org.drools.guvnor.server.ServiceImplementation.buildAssetSource(ServiceImplementation.java:1273)
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:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:118)
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
at
org.drools.guvnor.server.ServiceImplementation_$$_javassist_4.buildAssetSource(ServiceImplementation_$$_javassist_4.java)
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:585)
at
org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:76)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteServiceServlet.java:291)
at
org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceServlet.java:173)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:53)
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
BRMS: uploading a decision table breaks the package
---------------------------------------------------
Key: JBRULES-1702
URL:
https://jira.jboss.org/jira/browse/JBRULES-1702
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-brms
Affects Versions: 5.0.0.M1
Reporter: Jaroslaw Kijanowski
Assignee: Michael Neale
Fix For: 5.0.0.M2
Attachments: facts-src.jar, facts.jar, Sample.xls
I create a rule, then upload a decision table (see attached) and:
- if I compile the package it looks good, however it isn't, I cannot run a test
scenario for example, because I will get missing imports of facts from the first rule;
- if I create another rule, I won't be able to compile the package due to missing
imports;
I guess the reason for this is that the decision table adds its own import and package
statements in the middle of the rule file.
Here's the source of the package with one "regular" rule and one rule
coming from the decision table:
package myNewPAckage
import com.model.Person
import com.model.Alarm
import com.model.Message
rule "first"
dialect "mvel"
when
Alarm( )
then
Person fact0 = new Person();
fact0.setAge( 18 );
insert( fact0 );
end
package XLSRules;
#generated from Decision Table
import com.model.Message;
#From row number: 11
rule "HelloWorld_11"
when
m:Message(status == Message.HELLO)
then
System.out.println(m.getMessage());
m.setMessage("Goodbye cruel world");update(m);
m.setStatus(Message.GOODBYE);update(m);
end
#From row number: 12
rule "HelloWorld_12"
when
m:Message(status == Message.GOODBYE)
then
System.out.println(m.getMessage());
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira