[JBoss JIRA] Created: (JBRULES-3137) NullPointerException in FromNode.destroyCreatedHandles
by Alessandro Lazarotti (JIRA)
NullPointerException in FromNode.destroyCreatedHandles
------------------------------------------------------
Key: JBRULES-3137
URL: https://issues.jboss.org/browse/JBRULES-3137
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Reporter: Alessandro Lazarotti
Assignee: Mark Proctor
Fix For: 5.2.0.CR1
I received this NullPointerException after upgrading to drools 5.1.1. The NullPointerException is being thrown when the rule executes "update($build);" where $build is set in the LHS from a Build in working memory. I'm not sure if the bug is that matches may be null and a null check needs to be added or if something else is going on causing the tuple to not be found.
Caused by: java.lang.NullPointerException
at org.drools.reteoo.FromNode.destroyCreatedHandles(FromNode.java:336)
at org.drools.reteoo.FromNode.retractLeftTuple(FromNode.java:326)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:238)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractRightTuple(CompositeLeftTupleSinkAdapter.java:155)
at org.drools.reteoo.JoinNode.retractRightTuple(JoinNode.java:151)
at org.drools.reteoo.ModifyPreviousTuples.retractTuples(ModifyPreviousTuples.java:126)
at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:176)
at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1442)
at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1349)
at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:183)
at org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:196)
at buildSchedulerV2.Rule_Combine_Builds_0.defaultConsequence(Rule_Combine_Builds_0.java:36)
at buildSchedulerV2.Rule_Combine_Builds_0DefaultConsequenceInvoker.evaluate(Rule_Combine_Builds_0DefaultConsequenceInvoker.java:49)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-3135) Drools: Unable to load session snapshot
by Alessandro Lazarotti (JIRA)
Drools: Unable to load session snapshot
---------------------------------------
Key: JBRULES-3135
URL: https://issues.jboss.org/browse/JBRULES-3135
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Environment: Windows Server, SQL Server 2005, Tomcat 5.5, Hibernate, Bitronix
Reporter: Alessandro Lazarotti
Assignee: Edson Tirelli
Priority: Blocker
Fix For: 5.3.0.Beta1
Attachments: TestCase.java, VoteCreatedEvent.java
After an event is processed the session fails to load using JPA persistence.
I ve attached a test case.
It uses a Drools flow file, and a drl file. Both very simple..
The flow file has a "Start" then an action that prints a message to the console, then "End"
The Drl has one rule that processes an event:
import com.kgcontrols.services.company.standardsRequests.workflow.events.VoteCreatedEvent
declare VoteCreatedEvent
@role(event)
end
rule "testEvents"
when
VoteCreatedEvent() from entry-point "VoteCreatedStream"
then
System.out.println("--------------------------- YEAH the event got here");
end
I can see the "YEAH the event go here" on the console so I know the rule fired. But after that, if I try to load the session from the database I get:
--------------------------- YEAH the event got here
ERROR 2010-09-02 10:09:26 Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.drools.persistence.jpa.impl.KnowledgeStoreServiceImpl.buildComman
Service(KnowledgeStoreServiceImpl.java:106)
at org.drools.persistence.jpa.impl.KnowledgeStoreServiceImpl.loadStatefu
lKnowledgeSession(KnowledgeStoreServiceImpl.java:74)
at org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeS
ession(JPAKnowledgeService.java:118)
at com.kgcontrols.services.company.standardsRequests.workflow.TestCase.
loadSession(TestCase.java:136)
at com.kgcontrols.services.company.standardsRequests.workflow.TestCase.
start(TestCase.java:64)
at org.apache.jsp.company.standardsRequest.test2_jsp._jspService(org.ap
ache.jsp.company.standardsRequest.test2_jsp:51)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:332)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at com.troux.servercommon.usagelog.UsageLogFilter.doFilter(UsageLogFilte
r.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:524)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommon
AccessLogValve.java:495)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSock
et.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.drools.persistence.jpa.impl.KnowledgeStoreServiceImpl.buildComman
Service(KnowledgeStoreServiceImpl.java:91)
... 31 more
Caused by: java.lang.RuntimeException: Unable to load session snapshot
at org.drools.persistence.session.JPASessionMarshallingHelper.loadSnapsh
ot(JPASessionMarshallingHelper.java:96)
at org.drools.persistence.session.SingleSessionCommandService.initKsessi
on(SingleSessionCommandService.java:196)
at org.drools.persistence.session.SingleSessionCommandService.<init>(Sin
gleSessionCommandService.java:159)
... 36 more
Caused by: java.lang.NullPointerException
at org.drools.reteoo.LeftTuple.<init>(LeftTuple.java:135)
at org.drools.reteoo.LeftTuple.<init>(LeftTuple.java:121)
at org.drools.marshalling.impl.InputMarshaller.readLeftTuple(InputMarsha
ller.java:461)
at org.drools.marshalling.impl.InputMarshaller.readFactHandles(InputMars
haller.java:351)
at org.drools.marshalling.impl.InputMarshaller.readSession(InputMarshall
er.java:205)
at org.drools.marshalling.impl.DefaultMarshaller.unmarshall(DefaultMarsh
aller.java:91)
at org.drools.persistence.session.JPASessionMarshallingHelper.loadSnapsh
ot(JPASessionMarshallingHelper.java:91)
... 38 more
ERROR 2010-09-02 10:09:26 [EXCEPTION]
org.apache.jasper.JasperException: java.lang.reflect.InvocationTargetException
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspSer
vletWrapper.java:510)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:387)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at com.troux.servercommon.usagelog.UsageLogFilter.doFilter(UsageLogFilte
r.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:524)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:105)
at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommon
AccessLogValve.java:495)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.ja
va:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSock
et.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:684)
at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-3110) S3 Drools Resource
by Brad Davis (JIRA)
S3 Drools Resource
------------------
Key: JBRULES-3110
URL: https://issues.jboss.org/browse/JBRULES-3110
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.1.1.FINAL
Reporter: Brad Davis
Assignee: Mark Proctor
Attached is a Drools Resource for pulling down rules and polling with the knowledge agent against S3. To run the unit tests, make sure to set a correct AWS access key and secret key in the base test case!
It uses JetS3t for the communication to S3. I imagine this could be a separate component in itself, since there i no need to introduce the jets3t dependency into the Drools Core.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (JBRULES-3133) Declarative types: Extending requires explicit import statement
by Michael Anstis (JIRA)
Declarative types: Extending requires explicit import statement
---------------------------------------------------------------
Key: JBRULES-3133
URL: https://issues.jboss.org/browse/JBRULES-3133
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.Final
Reporter: Michael Anstis
Assignee: Mark Proctor
Given Person class:-
{code}
package com.guvnor.domain;
import java.math.BigDecimal;
public class Person {
private BigDecimal salary;
public BigDecimal getSalary() {
return salary;
}
public void setSalary(BigDecimal salary) {
this.salary = salary;
}
}
{code}
The following compiles OK:-
{code}
package com.sample
import com.guvnor.domain.Person
declare Person
end
{code}
However the following does not (without explicitly importing java.math.BigDecimal - which is a field type in Person):-
{code}
package com.sample
import com.guvnor.domain.Person
import com.guvnor.domain.Address
declare Person
end
declare Person2 extends Person
flange : String
end
{code}
Error being "Unknown DroolsError class org.drools.compiler.TypeDeclarationError: Unable to find class 'BigDecimal' ".
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months
[JBoss JIRA] Created: (AS7-1234) Hibernate does not read/use metadata for orm.xml defined entites
by Tomaz Cerar (JIRA)
Hibernate does not read/use metadata for orm.xml defined entites
----------------------------------------------------------------
Key: AS7-1234
URL: https://issues.jboss.org/browse/AS7-1234
Project: Application Server 7
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 7.0.0.CR1, 7.0.0.Beta3, 7.0.0.Final, 7.0.1.Final, 7.1.0.Alpha1
Environment: windows 7, sql server 2008 r2
Reporter: Tomaz Cerar
Assignee: Scott Marlow
I have setup where we have "common" entities defined in global lib/module that application(war/ear) in then dependent on.
Then I declare this entities in orm.xml of my application just by class name.
for instance:
{code:xml}
<entity class="com.company.module.Article"/>
<entity class="com.company.module.Binary"/>
<entity class="com.company.module.Category"/>
{code}
Up until as7/hibernate 4 this worked with no problems, but now it dies with exception "no id defined on entity Article". If I defined id in orm.xml it then finds id field but fails to find anything that is annotated on classes.
It looks like metadata is not read for this classes and hibernate sees them as just plain pojo with no annotations.
I am guessing that problem has to do something with integration with AS7 that now has jandex index for all annotations...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months