Upgrading to Drools 6.0 questions (General)
by MaverickDrools
Hi,
We are trying to evaluate what it takes to move from drools 5.4 to drools
6.0
There are some questions that I'd appreciate if someone clarifies after I've
updated the code to use KieContainer instead of KnowledgeBase and
successfully upgraded to drools 6.0.0-Beta3
1. Resolution of the imports:
In previous versions (5.3/5.4) we were able to give import abc.def.* which
would import all the model classes required by a .drl file, this doesn't
seem to be valid anymore. Now we have to give a specific class name in every
import statement so the 6.0 compiler is still able to use it. (eg) import
abc.def.SomeCalss.
Is that a change that was done to the compiler to resolve the imports, or is
it just me?
2. Setting null values:
Some rule in one of my drl files was of the form -
delare SomeDate
date : java.util.Date
end
rule "do something"
when
.
.
then
insertLogical (new SomeDate(null));
end
I'm assuming the compiler is calling the java.util.Date constructor which
shouldn't allow you to create a date with null being passed to the
constructor. This was ok with the previous versions (upto 5.4) and now
throws a NPE in 5.5 and 6.0. I'd think this should actually be throwing an
IllegalArgumentException with Date but throws a NPE instead. Is that true?
Is the drools compiler now catching that llegalArgumentException and
throwing a org.kie.api.runtime.rule.ConsequenceException due to null Date?
3. KieContainerImpl not serialized:
>From KnowledgeBase javadoc - Creating the KnowledgeBase can be heavy, where
as session creation is very light, so it is recommended that KnowledgeBases
be cached where possible to allow for repeated session creation.
We could achieve this using the EhCache and caching Knowledgebase objects.
We cannot do the same with KieContainer since it throws a
SerializationException with KieContainerImpl is not Serializable. So seems
like we cannot cache these KieCaontainer objects? Or is there some other way
to do that?
4. Release date for 6.0-Final:
What does the roadmap look like for the 6.0-Final?
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Upgrading-to-Drools-6-0-questions-Gener...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Guvnor5.5 not getting deployed in JBoss 5. Error on Deployment.
by Ankit Murarka
I Downloaded Guvnor5.5 and tried deploying the war in JBoss 5.
Got the following error on deployment: Hence the guvnor war is not
getting deployed properly on the JBoss server.
Googled it and found https://issues.jboss.org/browse/GUVNOR-1975 issue
raised. Any fix/workaround available as it is a complete blocker and not
allowing me to deploy the war.
/Exception: /
java.lang.RuntimeException: mapped-name is required for BeanManager of
deployment guvnor-5.5.0.Final-jboss-eap-5.1.war
at
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXmlResourceEnvRefs(WebResourceHandler.java:287)
at
org.jboss.web.tomcat.service.injection.WebResourceHandler.loadXml(WebResourceHandler.java:325)
at
org.jboss.web.tomcat.service.TomcatInjectionContainer.processMetadata(TomcatInjectionContainer.java:564)
at
org.jboss.web.tomcat.service.WebCtxLoader.start(WebCtxLoader.java:158)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4272)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at
org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at
org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy36.start(Unknown Source)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextA
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:7
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at
org.jboss.system.ServiceController.start(ServiceController.java:460)
at
org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at
org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:662)
19:59:47,251 ERROR [StandardContext] Context
[/guvnor-5.5.0.Final-jboss-eap-5.1] startup failed due to previous errors
19:59:47,298 ERROR [AbstractKernelController] Error installing to Start:
name=jboss.web.deployment:war=/guvnor-5.5.0.Fina
org.jboss.deployers.spi.DeploymentException: URL
file:/D:/rtSDP_RSP/server/rsp1/tmp/a1dg2h-g9earj-hirh2jk7-1-hirhb9of-1l/
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at
org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at
org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy36.start(Unknown Source)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextA
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:7
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at
org.jboss.system.ServiceController.start(ServiceController.java:460)
at
org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at
org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:662)
19:59:47,298 ERROR [AbstractKernelController] Error installing to Real:
name=vfszip:/D:/JBossFolderName/server/ClusterName/deploy/guvn
org.jboss.deployers.spi.DeploymentException: URL
file:/D:/JBossFolderName_RSP/server/ClusterName/tmp/a1dg2h-g9earj-hirh2jk7-1-hirhb9of-1l/
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:333)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at
org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
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:597)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at
org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy36.start(Unknown Source)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextA
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:7
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at
org.jboss.system.ServiceController.start(ServiceController.java:460)
at
org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at
org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
at
org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at
org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:662)
--
Regards
Ankit
11 years, 4 months
Modeling Cargo Pickup in Optaplanner
by Andrew Varner
I'm looking to find the best combination of items for predetermined load plans using Optaplanner. It'd pick the best items out of an inventory (collection of cargo) to fill the load plan.
For example, if a truck shows up at the warehouse, it might carry two sofas and a desk (Example 1). It could also carry five chairs and an end table.
It seems like I could reduce the problem space significantly by breaking the items into classes versus coding the load plans into a hard constraint.
E.g.
//Example 1
class LoadPlan1 {
Sofa cargo1;
Sofa cargo2;
Desk cargo3;
...
}
versus a more generic approach...
// Example 2
class Cargo {
String type; //"sofa", "desk"
// load is nullable
Load load;
...
}
Am I on the right path? I think I'd need hard constraints for Example 1 to make sure that cargo1 and cargo2 aren't the same sofa.
Thanks,
Drew
11 years, 4 months
NullPointerException using 2 sliding windows and accumulate functions.
by nw1005
Hello everybody,
currently I'm facing a problem using sliding windows and accumulate feature
in Drools 5.5.0.Final.
I'm using two sliding windows (window:length) with different lengths on the
same event in the same rule.
It seems that the shorter window retracts events which are not fitting in it
any more,
and accumulate function over the bigger window tries to access the retracted
event with a NullPointerException.
declare Property
@role(event)
@timestamp(measuretime)
end
rule "Buggy rule"
when
Number(doubleValue > 10) from accumulate(Property(propertyname ==
"PROPERTY1", val16: propertyvalue) over window:length(2)
from entry-point "123" , max(val16))
Number(doubleValue < 50) from accumulate(Property(propertyname ==
"PROPERTY1", val20: propertyvalue) over window:length(5)
from entry-point "123" , max(val20))
then
System.out.println("Rule Match");
end
entryPoint.insert(new Property("PROPERTY1", 20));
session.fireAllRules();
entryPoint.insert(new Property("PROPERTY1", 20));
session.fireAllRules();
entryPoint.insert(new Property("PROPERTY1", 20));
session.fireAllRules();
entryPoint.insert(new Property("PROPERTY1", 2));
session.fireAllRules();
entryPoint.insert(new Property("PROPERTY1", 2));
session.fireAllRules();
entryPoint.insert(new Property("PROPERTY1", 2));
It happens on the last insert.
java.lang.NullPointerException
at org.drools.reteoo.AccumulateNode.getFirstMatch(AccumulateNode.java:1050)
at
org.drools.reteoo.AccumulateNode.modifyLeftTuple(AccumulateNode.java:345)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateModifyChildLeftTuple(SingleLeftTupleSinkAdapter.java:259)
at
org.drools.reteoo.AccumulateNode.evaluateResultConstraints(AccumulateNode.java:676)
at
org.drools.reteoo.ReteooWorkingMemory$EvaluateResultConstraints.execute(ReteooWorkingMemory.java:590)
at
org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:350)
at
org.drools.rule.SlidingLengthWindow.assertFact(SlidingLengthWindow.java:119)
at org.drools.rule.BehaviorManager.assertFact(BehaviorManager.java:94)
at org.drools.reteoo.WindowNode.assertObject(WindowNode.java:167)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55)
Is it a bug, or am I doing something completely wrong?
--
View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-using-2-sliding-wi...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Unable to resolve class x for identifier y
by Bojan Janisch
Hey everyone,
I'm using Drools in a multithreaded environment where multiple KnowledgeBuilder and StatefulKnowledgeSessions are created parallel. Until now everything runs smooth, but suddenly I got this error:
Exception in thread "ECJ Evaluation Thread 5" org.drools.RuntimeDroolsException: Unable to resolve class 'de.fraunhofer.scai.bio.extraction.types.text.NormalizedNamedEntity' for identifier 'this
at org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:231)
at org.drools.rule.constraint.MvelConstraint.createMvelConditionEvaluator(MvelConstraint.java:206)
at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:190)
at org.drools.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:169)
at org.drools.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:125)
at org.drools.reteoo.JoinNode.propagateFromLeft(JoinNode.java:105)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:95)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
at org.drools.reteoo.JoinNode.propagateFromRight(JoinNode.java:159)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:148)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:141)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:350)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at rulevolution.RulEvolution.runDrools(RulEvolution.java:310)
at rulevolution.RulEvolution.evaluate(RulEvolution.java:161)
at ec.simple.SimpleEvaluator.evalPopChunk(SimpleEvaluator.java:259)
at ec.simple.SimpleEvaluator$SimpleEvaluatorThreadCG.run(SimpleEvaluator.java:341)
at ec.util.ThreadPool$PoolThread.run(ThreadPool.java:57)
I don't know why it happened, my program already ran for about 15 minutes. Could someone explain me what could cause such an error? I didn't find much information about it in the internet.
Thanks and greetings
Bojan
11 years, 4 months
[OptaPlanner] Multiple planning entities and dynamic planning variables.
by Sandeep Bandela
Hi,
I need some help on modeling a planning problem. (using planner 6.0.0.Beta3)
My problem closely resembles curriculum-course example but with some more
planning variables as follows.
1. course can be taught by multiple teachers
2. lecture needs 1 teacher, 1 projector, 1 teaching assistant.
3. course can have lab component. which needs 'n' teachers & 'm' lab
assistants of that course.
4. every resource (teacher/projector/room/lab/assistants) have their own
availability periods in a day.
1, 2, 4 were easier, I made teacher, projector, TA as planning variables
and have list from which they can be chosen. and separate rule to check if
the any of these are present in different lectures at the same time or if
they are unavailable.
now to incorporate the 3rd, I am stuck. should I create different planning
entity and its own variables of teacher, lab assistants? this will also
complicate rules to check if the same resource/variable is not in different
places in the same period (lecture-lecture, lab-lecture, lab-lab etc.). any
suggestions or references regarding this is much appreciated.
Another issue is how can I dynamically control number plan
variables/resources needed for a planning entity? like 2 teachers & 4 lab
assistants for a lab session of course (is it related to
https://issues.jboss.org/browse/PLANNER-167 if so any workaround).
--
Regards,
Sandeep Bandela.
11 years, 4 months
security guards london
by EvansWilson
Knightguard is security guarding company based in the Wimbledon Area of
London and operates nationally. We offer a wide range of Security Services,
we specialises in manned guarding we supply security guards and door
supervisors, bouncers, door staff to retail stores, construction sites,
industrial sites, clubs, hospitals, hotels, events etc throughout the UK.
These are tailor made to our Clients requirements with personal supervision
at all times.
--
View this message in context: http://drools.46999.n3.nabble.com/security-guards-london-tp4024752.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 4 months
Restoring and continuing a ksession.
by Michiel Vermandel
Hi,
After a few years of using JBPM4, we are evaluating JBPM5.
In our project we have lots of long-running processes, so we need to persist them.
We want a tight integration with our application and therefore we decided not to use Guvnor (maybe we should non the less?).
Anyway, at the moment we use one ksession per process instance.
Now I am wondering how to "revive" the kbase which is needed to load the ksession:
ksessionStatefull = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
As process instances can last days or weeks, it is quit possible that process definitions have been altered,
so to continue a ksession we need to restore the same kbase as used to
start the session (we need to know version of the process definition
which was used when creating the process instance), right?
(How) should we store the kbase which is needed to reload the ksession?
Thanks!
Michiel
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials
11 years, 4 months
drools migration
by Radhika Inugala
Hi All,
In my current project we are using drools and the maven dependencies show as
<dependency>
<groupId>org.drools</groupId>
<artifactId>com.springsource.org.drools.compiler</artifactId>
<version>4.0.7</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>com.springsource.org.drools</artifactId>
<version>4.0.7</version>
</dependency>
I would like to migrate this to 5.2.0 version. As I want to have Guvnor and
a UI integration for a new rules setup.
When I see for the springsource dependencies, I do not find the same.
When I changed these to
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.2.0.CR1</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.2.0.CR1</version>
</dependency>
</dependencies>
I am getting compilation failures.
Any inputs on how to migrate the drools is appreciated.
Thanks,
RR
11 years, 4 months