[JBoss JIRA] Created: (JBRULES-2604) New simple JPAKnowledgeServiceBean that can be used to create / reload Stateful Knowledge Sessions
by Anatoly Polinsky (JIRA)
New simple JPAKnowledgeServiceBean that can be used to create / reload Stateful Knowledge Sessions
--------------------------------------------------------------------------------------------------
Key: JBRULES-2604
URL: https://jira.jboss.org/browse/JBRULES-2604
Project: Drools
Issue Type: Patch
Security Level: Public (Everyone can see)
Components: All
Affects Versions: 5.1.0.FINAL
Environment: N/A
Reporter: Anatoly Polinsky
Assignee: Mark Proctor
Attachments: JPAKnowledgeServiceBean.java
Spring bean that serves as a facade into Drools Session creation and reloading using persistent (JPA) knowledge state.
Public client APIs are newStatefulKnowledgeSession( ) and loadStatefulKnowledgeSession( sessionID ) which do just that:
newStatefulKnowledgeSession(): Creates a new StatefulKnowledgeSession
loadStatefulKnowledgeSession( sessionID ): Reloads an existing ( previously persisted StatefulKnowledgeSession ) by the sesssionID
Here is an example on how this bean can be configured:
<bean id="abstractKnowledgeProvider"
class="org.drools.container.spring.beans.persistence.JPAKnowledgeServiceBean">
<property name="entityManagerFactory" ref="entityManagerFactory" />
<property name="transactionManager" ref="txManager" />
<property name="knowledgeStore" ref="kstore"/>
<property name="kbase">
<drools:kbase id="kbase" node="node">
<drools:resources>
<drools:resource type="DRF"
source="classpath:./META-INF/flow/subprocess-flow.rf" />
<drools:resource type="DRF"
source="classpath:./META-INF/flow/parallel-subprocess-flow.rf" />
<drools:resource type="DRF"
source="classpath:./META-INF/flow/approval-flow.rf" />
</drools:resources>
</drools:kbase>
</property>
<property name="variablePersisters">
<util:map>
<entry key="javax.persistence.Entity"
value="org.drools.persistence.processinstance.persisters.JPAVariablePersister" />
<entry key="java.io.Serializable"
value="org.drools.persistence.processinstance.persisters.SerializableVariablePersister" />
<entry key="java.lang.String"
value="org.drools.persistence.processinstance.persisters.StringVariablePersister" />
</util:map>
</property>
</bean>
Besides "variablePersisters" all properties are mandatory ( cannot be NULL / not set ).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2462) Unable to read a properties file from DRL file
by Danny Shaw (JIRA)
Unable to read a properties file from DRL file
----------------------------------------------
Key: JBRULES-2462
URL: https://jira.jboss.org/jira/browse/JBRULES-2462
Project: Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Danny Shaw
Assignee: Mark Proctor
I am getting this error when my DRL file is attempting to read from a properties file
org.drools.runtime.rule.ConsequenceException: java.lang.NullPointerException
at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:943)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:885)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1086)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:660)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:627)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:183)
Any suggestions then please let me know.
Thanks
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2321) Implicit binding and "or" CE in pattern cause ClassCastException
by Tihomir Surdilovic (JIRA)
Implicit binding and "or" CE in pattern cause ClassCastException
----------------------------------------------------------------
Key: JBRULES-2321
URL: https://jira.jboss.org/jira/browse/JBRULES-2321
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 4.0.7
Reporter: Tihomir Surdilovic
Assignee: Mark Proctor
This is a problem with Drools 4.0.7, it does not happen in Drools 5:
$factB.f1 is triggering a scenario where the engine creates an implicit biding to the "f1" field.
That in conjunction with the use of "or" is triggering the problem
rule "implicit bindings test"
when
FactA()
$factB : FactB( $fB : f1 )
(not FactC( f1 == $factB.f1 ) or FactC() )
then
end
The exception thrown is:
java.lang.ClassCastException: com.sample.FactAShadowProxy cannot be cast to com.sample.FactB
at org.drools.base.com.sample.FactB1865721816$getF1.getIntValue(Unknown Source)
at org.drools.base.extractors.BaseIntClassFieldExtractor.getHashCode(BaseIntClassFieldExtractor.java:85)
at org.drools.base.ClassFieldExtractor.getHashCode(ClassFieldExtractor.java:225)
at org.drools.rule.Declaration.getHashCode(Declaration.java:273)
at org.drools.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:533)
at org.drools.util.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:315)
at org.drools.util.TupleIndexHashTable.add(TupleIndexHashTable.java:227)
at org.drools.reteoo.NotNode.assertTuple(NotNode.java:93)
at org.drools.reteoo.CompositeTupleSinkAdapter.propagateAssertTuple(CompositeTupleSinkAdapter.java:30)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:156)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2296) Infinite loop in OutputMarshaller
by Maciej Prochniak (JIRA)
Infinite loop in OutputMarshaller
---------------------------------
Key: JBRULES-2296
URL: https://jira.jboss.org/jira/browse/JBRULES-2296
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core, drools-core (expert)
Affects Versions: 5.1.0.M1
Reporter: Maciej Prochniak
Assignee: Mark Proctor
in OutputMarshaller, there are 2 lines containing:
for ( LeftTuple childLeftTuple = getLeftTuple( leftTuple.getBetaChildren() ); childLeftTuple != null; childLeftTuple = (LeftTuple) leftTuple.getLeftParentPrevious() ) {
it leads to infinite loop, should be:
for ( LeftTuple childLeftTuple = getLeftTuple( leftTuple.getBetaChildren() ); childLeftTuple != null; childLeftTuple = (LeftTuple) childLeftTuple.getLeftParentPrevious() ) {
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2265) running default "Hello" Drools Project
by shashank singh (JIRA)
running default "Hello" Drools Project
--------------------------------------
Key: JBRULES-2265
URL: https://jira.jboss.org/jira/browse/JBRULES-2265
Project: Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: shashank singh
Assignee: Mark Proctor
In set up eclipse 3.5 as given on "http://www.jboss.org/tools/download" under "JBoss Tools 3.1 :: Eclipse 3.5.0"
Now when I am trying to set up a hello Drools Project I am getting this error
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.Java
DialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:274)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfi
guration.java:259)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:176)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:153)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:242)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:142)
at org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuilder(KnowledgeBuilderProvide
rImpl.java:29)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:29)
at com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:39)
at com.sample.DroolsTest.main(DroolsTest.java:23)
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfigurati
on.java:94)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java
:55)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:270)
... 9 more
I would like to mention that while creating this application I added a DroolsRumtime and set it to C:\drools folder. But no jar was placed in that folder. I manually copied jars there. The jars that I copied are
drools-all-jdk5-2.1.jar
drools-ant-5.0.1.jar
drools-api-5.0.1.jar
drools-bam-5.0.1.jar
drools-clips-5.0.1.jar
drools-compiler-5.0.1.jar
drools-core-5.0.1.jar
drools-decisiontables-5.0.1.jar
drools-jsr94-5.0.1.jar
drools-mc-5.0.1.jar
drools-messenger-jms-5.0.1.jar
drools-persistence-jpa-5.0.1.jar
drools-process-task-5.0.1.jar
drools-templates-5.0.1.jar
drools-transformer-jaxb-5.0.1.jar
drools-transformer-jxls-5.0.1.jar
drools-verifier-5.0.1.jar
drools-workitems-5.0.1.jar
I am unable to make it is
IS installing JBoss Tools 3.0 or 3.1 means we are doing it for Drools4.0 or Drools5.0. And what is the dependency in this regard as such.
--
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
13 years, 8 months
[JBoss JIRA] Created: (JBRULES-2676) When rebuilding from source with -Declipse option on OSX / Linux systems, the Eclipse tar.gz file is unnecessarily reloaded
by Lawrence Terrill (JIRA)
When rebuilding from source with -Declipse option on OSX / Linux systems, the Eclipse tar.gz file is unnecessarily reloaded
----------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-2676
URL: https://jira.jboss.org/browse/JBRULES-2676
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-eclipse
Affects Versions: FUTURE
Environment: Occurs on family 'mac' and 'unix' systems where the eclipse file download extension is 'tar.gz' format, instead of 'zip' as on Windows
Reporter: Lawrence Terrill
Assignee: Mark Proctor
Priority: Minor
When building the eclipse component from source, the eclipse tar.gz file is repeatedly downloaded despite a check for the file's existance. In the file drools-eclipse/drools-eclipse-build/setupEclipse.xml, target 'checkEclipseJar', the existance of the file is checked. But this check is hardcoded with the file extension '.zip'. It likely should have used the symbolic '${download.extension}' used in the 'getEclipseJar' target in the same file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 8 months