[JBoss JIRA] (DROOLS-97) Refactor test packages
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-97?page=com.atlassian.jira.plugin.... ]
Mario Fusco resolved DROOLS-97.
-------------------------------
Fix Version/s: 6.0.0.Final
Resolution: Done
> Refactor test packages
> ----------------------
>
> Key: DROOLS-97
> URL: https://issues.jboss.org/browse/DROOLS-97
> Project: Drools
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Reporter: Cristiano Gavião
> Assignee: Mario Fusco
> Fix For: 6.0.0.Final
>
>
> In order to run the drools test into an OSGi environment the Test-Jar must be OSGified. That was already done, but the generated bundle (Jar) and test bundle (Test-Jar) are exporting same packages.
> These package conflicting prevents that both bundles be use by the OSGi tests classes.
> For turn things easier, my suggestion is to include .test into the package name. So for example: org.drools.core.base would become org.drools.core.base.test
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-102) Error inserting facts after session restore
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-102?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-102:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Error inserting facts after session restore
> --------------------------------------------
>
> Key: DROOLS-102
> URL: https://issues.jboss.org/browse/DROOLS-102
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: JBoss AS 5.0
> Drools 5.4.0 / 5.5.0
> Linux Ubuntu
> JDK 1.6
> Reporter: Nedo Nedic
> Assignee: Mario Fusco
> Labels: drools-core
>
> I'm using Drools 5.4.0 (but also tried it with the last release of Drools 5.5.0) to save the session state when the application server restarts / stops. Everything works fine and the session state is properly restored, but when new fact is inserted the following exception is thrown:
> java.lang.NullPointerException
> at java.lang.Class.isAssignableFrom(Native Method)
> at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:57)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:68)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:53)
> at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:745)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:287)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:888)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> I explored through Drools code, and figured out time stamp extractor getExtractToClass method is evaluating to null (line 57 ReteooFactHandleFactory):
> public final InternalFactHandle newFactHandle(final int id,
> final Object object,
> final long recency,
> final ObjectTypeConf conf,
> final InternalWorkingMemory workingMemory,
> final WorkingMemoryEntryPoint wmEntryPoint) {
> if ( conf != null && conf.isEvent() ) {
> TypeDeclaration type = conf.getTypeDeclaration();
> long timestamp;
> if ( type.getTimestampExtractor() != null ) {
> if ( Date.class.isAssignableFrom( type.getTimestampExtractor().getExtractToClass() ) ) {
> timestamp = ((Date) type.getTimestampExtractor().getValue( workingMemory,
> object )).getTime();
> } else {
> timestamp = type.getTimestampExtractor().getLongValue( workingMemory,
> object );
> }
> } else {
> timestamp = workingMemory.getTimerService().getCurrentTime();
> ....
> My code for storing / restoring session:
> public void saveCorrelator(FileOutputStream output) throws IOException {
>
> DroolsObjectOutputStream droolsOut = new DroolsObjectOutputStream(output);
> droolsOut.writeObject(ksession.getKnowledgeBase());
> Marshaller mas = createMarshaller(ksession.getKnowledgeBase());
> mas.marshall(droolsOut, ksession);
> droolsOut.flush();
> droolsOut.close();
> }
>
> public void loadCorrelator(FileInputStream input) throws IOException,
> ClassNotFoundException {
>
> DroolsObjectInputStream droolsIn = new DroolsObjectInputStream(input, this.getClass().getClassLoader());
> try {
> KnowledgeBase kbase = (KnowledgeBase) droolsIn.readObject();
> Marshaller mas = createMarshaller(kbase);
> ksession = mas.unmarshall(droolsIn);
> } catch(EOFException e) {
> log.error("EOFException on correlator restore");
> } finally {
> droolsIn.close();
> }
>
> }
> private Marshaller createMarshaller(KnowledgeBase kbase) {
> ObjectMarshallingStrategyAcceptor acceptor = MarshallerFactory
> .newClassFilterAcceptor(new String[] { "*.*" });
> ObjectMarshallingStrategy strategy = MarshallerFactory
> .newSerializeMarshallingStrategy(acceptor);
> return MarshallerFactory.newMarshaller(kbase,
> new ObjectMarshallingStrategy[] { strategy });
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-102) Error inserting facts after session restore
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-102?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-102.
--------------------------------
Fix Version/s: 5.5.1.Final
Resolution: Done
> Error inserting facts after session restore
> --------------------------------------------
>
> Key: DROOLS-102
> URL: https://issues.jboss.org/browse/DROOLS-102
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: JBoss AS 5.0
> Drools 5.4.0 / 5.5.0
> Linux Ubuntu
> JDK 1.6
> Reporter: Nedo Nedic
> Assignee: Mario Fusco
> Labels: drools-core
> Fix For: 5.5.1.Final
>
>
> I'm using Drools 5.4.0 (but also tried it with the last release of Drools 5.5.0) to save the session state when the application server restarts / stops. Everything works fine and the session state is properly restored, but when new fact is inserted the following exception is thrown:
> java.lang.NullPointerException
> at java.lang.Class.isAssignableFrom(Native Method)
> at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:57)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:68)
> at org.drools.common.AbstractFactHandleFactory.newFactHandle(AbstractFactHandleFactory.java:53)
> at org.drools.common.NamedEntryPoint.createHandle(NamedEntryPoint.java:745)
> at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:287)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:888)
> at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
> at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
> I explored through Drools code, and figured out time stamp extractor getExtractToClass method is evaluating to null (line 57 ReteooFactHandleFactory):
> public final InternalFactHandle newFactHandle(final int id,
> final Object object,
> final long recency,
> final ObjectTypeConf conf,
> final InternalWorkingMemory workingMemory,
> final WorkingMemoryEntryPoint wmEntryPoint) {
> if ( conf != null && conf.isEvent() ) {
> TypeDeclaration type = conf.getTypeDeclaration();
> long timestamp;
> if ( type.getTimestampExtractor() != null ) {
> if ( Date.class.isAssignableFrom( type.getTimestampExtractor().getExtractToClass() ) ) {
> timestamp = ((Date) type.getTimestampExtractor().getValue( workingMemory,
> object )).getTime();
> } else {
> timestamp = type.getTimestampExtractor().getLongValue( workingMemory,
> object );
> }
> } else {
> timestamp = workingMemory.getTimerService().getCurrentTime();
> ....
> My code for storing / restoring session:
> public void saveCorrelator(FileOutputStream output) throws IOException {
>
> DroolsObjectOutputStream droolsOut = new DroolsObjectOutputStream(output);
> droolsOut.writeObject(ksession.getKnowledgeBase());
> Marshaller mas = createMarshaller(ksession.getKnowledgeBase());
> mas.marshall(droolsOut, ksession);
> droolsOut.flush();
> droolsOut.close();
> }
>
> public void loadCorrelator(FileInputStream input) throws IOException,
> ClassNotFoundException {
>
> DroolsObjectInputStream droolsIn = new DroolsObjectInputStream(input, this.getClass().getClassLoader());
> try {
> KnowledgeBase kbase = (KnowledgeBase) droolsIn.readObject();
> Marshaller mas = createMarshaller(kbase);
> ksession = mas.unmarshall(droolsIn);
> } catch(EOFException e) {
> log.error("EOFException on correlator restore");
> } finally {
> droolsIn.close();
> }
>
> }
> private Marshaller createMarshaller(KnowledgeBase kbase) {
> ObjectMarshallingStrategyAcceptor acceptor = MarshallerFactory
> .newClassFilterAcceptor(new String[] { "*.*" });
> ObjectMarshallingStrategy strategy = MarshallerFactory
> .newSerializeMarshallingStrategy(acceptor);
> return MarshallerFactory.newMarshaller(kbase,
> new ObjectMarshallingStrategy[] { strategy });
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-152) NPE during benchmark in LeftTupleIndexRBTree.remove
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-152?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-152.
--------------------------------
Fix Version/s: 6.0.0.Final
Resolution: Done
> NPE during benchmark in LeftTupleIndexRBTree.remove
> ---------------------------------------------------
>
> Key: DROOLS-152
> URL: https://issues.jboss.org/browse/DROOLS-152
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Beta2
> Reporter: Arno Hernach
> Assignee: Mario Fusco
> Fix For: 6.0.0.Final
>
> Attachments: tournament_scheduling_system_gui.zip
>
>
> Exception in thread "main" java.lang.NullPointerException
> at org.drools.core.util.index.LeftTupleIndexRBTree.remove(LeftTupleIndexRBTree.java:63)
> at org.drools.core.reteoo.ExistsNode.modifyRightTuple(ExistsNode.java:388)
> at org.drools.core.reteoo.BetaNode.modifyObject(BetaNode.java:673)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:508)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:433)
> at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:161)
> at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:69)
> at org.drools.core.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:386)
> at org.drools.core.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:294)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:505)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:393)
> at org.drools.core.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:903)
> at org.drools.core.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:872)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:294)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.afterVariableChanged(DroolsScoreDirector.java:131)
> at org.optaplanner.core.impl.heuristic.selector.move.generic.SwapMove.doMove(SwapMove.java:81)
> at org.optaplanner.core.impl.localsearch.decider.DefaultDecider.doMove(DefaultDecider.java:143)
> at org.optaplanner.core.impl.localsearch.decider.DefaultDecider.decideNextStep(DefaultDecider.java:116)
> at org.optaplanner.core.impl.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:62)
> at org.optaplanner.core.impl.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:155)
> at org.optaplanner.benchmark.impl.ProblemBenchmark.warmUp(ProblemBenchmark.java:163)
> at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.warmUp(DefaultPlannerBenchmark.java:244)
> at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:189)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-164) Rule do not fire when lock-on-active true present
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-164?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-164.
--------------------------------
Resolution: Rejected
> Rule do not fire when lock-on-active true present
> -------------------------------------------------
>
> Key: DROOLS-164
> URL: https://issues.jboss.org/browse/DROOLS-164
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Win7/64 Java6
> Reporter: Sergey Alaev
> Assignee: Mario Fusco
>
> Given following rules:
> 1 rule "Rule1"
> 2 salience 1
> 3 when
> 4 $booking: TradeBooking()
> 5 $trade: TradeHeader() from $booking.getTrade()
> 6 not (String())
> 7 then
> 8 $trade.setAction("New");
> 9 modify($booking) {}
> 10 insert ("run");
> 11 end;
> 12
> 13 rule "Rule2"
> 14 lock-on-active true
> 15 when
> 16 $booking: TradeBooking( )
> 17 $trade: Object( ) from $booking.getTrade()
> 18 then
> 19
> 20 end
> and instance of TradeBooking() object with booking.trade != null
> i expect to get: Rule1 fired, Rule2 fired
> but i get: Rule1 fired
> I can get expected result if i comment out one of the following lines: 2, 8, 9, 14
> I was unable to reproduce this issue using standard mutable class (java.util.Date), so there are some details:
> TradeBooking, TradeHeader are interfaces, instances are generated using JDK proxy.
> $booking.getTrade() returns JDK Proxy over interface that inherits TradeHeader.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-152) NPE during benchmark in LeftTupleIndexRBTree.remove
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-152?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-152:
----------------------------------
Assignee: Mario Fusco (was: Geoffrey De Smet)
> NPE during benchmark in LeftTupleIndexRBTree.remove
> ---------------------------------------------------
>
> Key: DROOLS-152
> URL: https://issues.jboss.org/browse/DROOLS-152
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Beta2
> Reporter: Arno Hernach
> Assignee: Mario Fusco
> Attachments: tournament_scheduling_system_gui.zip
>
>
> Exception in thread "main" java.lang.NullPointerException
> at org.drools.core.util.index.LeftTupleIndexRBTree.remove(LeftTupleIndexRBTree.java:63)
> at org.drools.core.reteoo.ExistsNode.modifyRightTuple(ExistsNode.java:388)
> at org.drools.core.reteoo.BetaNode.modifyObject(BetaNode.java:673)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:508)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:433)
> at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:161)
> at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:69)
> at org.drools.core.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:386)
> at org.drools.core.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:294)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:505)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:393)
> at org.drools.core.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:903)
> at org.drools.core.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:872)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:294)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.afterVariableChanged(DroolsScoreDirector.java:131)
> at org.optaplanner.core.impl.heuristic.selector.move.generic.SwapMove.doMove(SwapMove.java:81)
> at org.optaplanner.core.impl.localsearch.decider.DefaultDecider.doMove(DefaultDecider.java:143)
> at org.optaplanner.core.impl.localsearch.decider.DefaultDecider.decideNextStep(DefaultDecider.java:116)
> at org.optaplanner.core.impl.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:62)
> at org.optaplanner.core.impl.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:155)
> at org.optaplanner.benchmark.impl.ProblemBenchmark.warmUp(ProblemBenchmark.java:163)
> at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.warmUp(DefaultPlannerBenchmark.java:244)
> at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:189)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months
[JBoss JIRA] (DROOLS-164) Rule do not fire when lock-on-active true present
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-164?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-164:
----------------------------------
Assignee: Mario Fusco (was: Mark Proctor)
> Rule do not fire when lock-on-active true present
> -------------------------------------------------
>
> Key: DROOLS-164
> URL: https://issues.jboss.org/browse/DROOLS-164
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.5.0.Final
> Environment: Win7/64 Java6
> Reporter: Sergey Alaev
> Assignee: Mario Fusco
>
> Given following rules:
> 1 rule "Rule1"
> 2 salience 1
> 3 when
> 4 $booking: TradeBooking()
> 5 $trade: TradeHeader() from $booking.getTrade()
> 6 not (String())
> 7 then
> 8 $trade.setAction("New");
> 9 modify($booking) {}
> 10 insert ("run");
> 11 end;
> 12
> 13 rule "Rule2"
> 14 lock-on-active true
> 15 when
> 16 $booking: TradeBooking( )
> 17 $trade: Object( ) from $booking.getTrade()
> 18 then
> 19
> 20 end
> and instance of TradeBooking() object with booking.trade != null
> i expect to get: Rule1 fired, Rule2 fired
> but i get: Rule1 fired
> I can get expected result if i comment out one of the following lines: 2, 8, 9, 14
> I was unable to reproduce this issue using standard mutable class (java.util.Date), so there are some details:
> TradeBooking, TradeHeader are interfaces, instances are generated using JDK proxy.
> $booking.getTrade() returns JDK Proxy over interface that inherits TradeHeader.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 8 months