Rule to load facts with pagination
by mariofox
Hi.
I'm running drools in a project with millions of facts to process. My memory
doesn't allow me to load all of my facts, so I have to load N objects at
once, then start over with next N objects, and so on.
Is it a good idea to let Drools to manage Pagination? I mean, create rules
in Drools with the purpose of loading facts?, or should I have to do this by
executing a Drools session from java in a loop?. My main goal is
performance.
Thanks!
--
View this message in context: http://drools.46999.n3.nabble.com/Rule-to-load-facts-with-pagination-tp39...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
upgrading drools-server 5.0 to drools-camel-server 5.4
by bhochhi
After 2 years, I am trying to upgrade from drools 5.0 to latest. The way we
are using the drools: the client apps(in c# and ruby) sends the request to
drools-server 5.0. This execution server gets the rules .pkg file from
guvnor using the properties files that map rules package at guvnor and
response with output of rules execution. Unfortunately, the new execution
server doesn't seems to work same way as the new one is completely
different. I deployed drools-camel-server-5.4.war and saw how test.jsp is
working. Then I changed knowledge-service.xml to replace the local drl
resource to remote pkg at guvnor as follows:
<drools:resource type="DRL" source="classpath:test.drl"/>
to
<drools:resource type="PKG"
source="http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/test/ex"
basicAuthentication="enabled" username="admin" password="admin" />
When I ran the test.jsp, I got exception, snippet below. There were few
other warning exceptions too, but not sure which is cause this problem. To
make my question short, I want to know is there at quick example or docs
that explain how I can use drools-camel-server to response the
actions(output of execution) to external app that sends the request with
conditions, where camel server gets the rules pkg from guvnor? I have create
the jersey based webservice to do exactly the same, but I want to understand
how this new camel-based server works. I appreciate any kind of your help.
ERROR [org.apache.camel.processor.DefaultErrorHandler]
(http--127.0.0.1-8080-4) Failed delivery for exchangeId:
ID-NormanDev2-52157-1335809674758-0-1. Exhausted after delivery attempt: 1
caught: org.apache.camel.RuntimeCamelException: Body of in message not of
the expected type 'org.drools.command.Command' for
uridrools://node1/ksession1: org.apache.camel.RuntimeCamelException: Body of
in message not of the expected type 'org.drools.command.Command' for
uridrools://node1/ksession1
at
org.drools.camel.component.DroolsExecuteProducer.process(DroolsExecuteProducer.java:63)
[drools-camel-5.4.0.CR1.jar:5.4.0.CR1]
at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
[camel-core-2.9.0.jar:2.9.0]
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
[camel-core-2.9.0.jar:2.9.0]
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:115)
[camel-core-2.9.0.jar:2.9.0]
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:285)
[camel-core-2.9.0.jar:2.9.0]
--
View this message in context: http://drools.46999.n3.nabble.com/upgrading-drools-server-5-0-to-drools-c...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Some problems with Deploying drools-camel-sever 5.3.x in Weblogic 10.x
by ndipiazza
Hey everyone,
We have been trying to deploy drools-camel-server-5.3.x.Final.war from
droolsjbpm-integration-distribution-5.3.0.Final on WebLogic 10.3.3.
We hit a series of issues, of which I've opened up some issue tickets to
address:
1) strict web application container complains about web.xml (JBRULES-3403 -
https://issues.jboss.org/browse/JBRULES-3403) - web.xml needs to be
re-arranged to get it to work in weblogic 10.x.
2) There seems to be duplicate JPA persistence units
(https://issues.jboss.org/browse/JBRULES-3404)
I also experienced two other issues that I do not feel comfortable putting
on the issue tracker because they may be weblogic-specific:
3) When I tried to run a SOAP UI test on the drools server in Weblogic
10.3.3 I get this:
WARNING: Interceptor for {http://soap.jax.drools.org/}CommandExecutor has
thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: This class does not support SAAJ 1.1
at
org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer
.java:123)
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:
102)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv
okerInterceptor.java:58)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu
tor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se
rviceInvokerInterceptor.java:106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:263)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:118)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abstract
HTTPDestination.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(
ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
roller.java:205)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpr
ingServlet.java:113)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab
stractHTTPServlet.java:184)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH
TTPServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract
HTTPServlet.java:163)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:300)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:183)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.doIt(WebAppServletContext.java:3686)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3650)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2268)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2174)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.UnsupportedOperationException: This class does not
support
SAAJ 1.1
at
weblogic.webservice.core.soap.SOAPMessageImpl.getSOAPBody(SOAPMessage
Impl.java:631)
at
org.drools.jax.soap.PreCxfTransportSoapProcessor.process(PreCxfTransp
ortSoapProcessor.java:42)
at
org.drools.camel.component.DroolsPolicy$DroolsProcess.process(DroolsP
olicy.java:341)
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$Processor
ToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(Trace
Interceptor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler
(RedeliveryErrorHandler.java:290)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE
rrorHandler.java:202)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java
:256)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProc
essor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(Instrume
ntationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:91)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:85)
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:
97)
... 29 more
Seems to be two possible ways to solve this (have not tested these yet!)
Option One: Use axis.jar instead of saaj-impl.jar
1. add axis.jar file to bea class path
2. in startWebLogic.sh/cmd
set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS%
-Djavax.xml.soap.MessageFactory=org.apache.axis.soap.MessageFactoryImpl
Option Two: Make a code fix to allow the saaj to function
Follow the below steps to resolve "UnsupportedOperationException"
a. Set classpath to latest saaj-impl.jar in startweblogic.cmd
b. Set the below 2 system properties in code.
System.setProperty("javax.xml.soap.MessageFactory","com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");
System.setProperty("javax.xml.soap.SOAPConnectionFactory","weblogic.wsee.saaj.SOAPConnectionFactoryImpl");
c. Note that the above 2 classes are available in the saaj-impl.jar which i
have used and set classpath in step1. If you are using different version of
saaj-impl.jar, set the exact "MessageFactory" and "SOAPConnectionFactory"
classes which are avilable in your saaj-impl.jar. (Just extract your
saaj-impl.jar and findout the exact classes).
Obviously we cannot expect Drools team to make any code changes with respect
to WebLogic, so I would imagine trying Step 1 is the best way to go.
4) The drools-camel-server.war’s test.jsp apparently runs an example that
uses a Camel route leading to a REST web service. This does not work for me
either off the bat:
WARNING: Interceptor for {http://soap.jax.drools.org/}CommandExecutor has
thrown
exception, unwinding now
org.apache.cxf.interceptor.Fault: Unable to create message factory for SOAP:
Pro
vider org.apache.axis.soap.MessageFactoryImpl not found
at
org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer
.java:123)
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:
102)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInv
okerInterceptor.java:58)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:44
1)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecu
tor.java:37)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(Se
rviceInvokerInterceptor.java:106)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
orChain.java:263)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIniti
ationObserver.java:118)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abstract
HTTPDestination.java:208)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(
ServletController.java:223)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCont
roller.java:205)
at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpr
ingServlet.java:113)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Ab
stractHTTPServlet.java:184)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractH
TTPServlet.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstract
HTTPServlet.java:163)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:125)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:300)
at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:183)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.doIt(WebAppServletContext.java:3686)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3650)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2268)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2174)
at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.xml.soap.SOAPException: Unable to create message factory
for SO
AP: Provider org.apache.axis.soap.MessageFactoryImpl not found
at
javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:116)
at
org.drools.jax.soap.PreCxfTransportSoapProcessor.process(PreCxfTransp
ortSoapProcessor.java:40)
at
org.drools.camel.component.DroolsPolicy$DroolsProcess.process(DroolsP
olicy.java:341)
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$Processor
ToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(Trace
Interceptor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler
(RedeliveryErrorHandler.java:290)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryE
rrorHandler.java:202)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java
:256)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProc
essor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(Delegat
eAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(Instrume
ntationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:91)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:85)
at
org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:
97)
... 29 more
<Feb 26, 2012 3:58:31 PM CST> <Error> <HTTP> <BEA-101020>
<[ServletContext@12863
942[app:_appsdir_drools-5.3.0A_dir module:drools-5.3.0A path:/drools-5.3.0A
spec
-version:null]] Servlet failed with Exception
org.apache.camel.CamelExecutionException: Exception occurred during
execution on
the exchange: Exchange[Message: <batch-execution lookup="ksession1">
<insert out-identifier="message">
<org.test.Message>
<text>Hello World</text>
</org.test.Message>
</insert>
</batch-execution>
]
at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(Object
Helper.java:1142)
at
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper
.java:452)
at
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(Defau
ltProducerTemplate.java:441)
at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProduce
rTemplate.java:119)
at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProduce
rTemplate.java:135)
Truncated. see log file for complete stacktrace
Caused By: org.apache.camel.CamelExchangeException: No consumers available
on en
dpoint: Endpoint[direct://kservice/rest]. Exchange[Message: <batch-execution
loo
kup="ksession1">
<insert out-identifier="message">
<org.test.Message>
<text>Hello World</text>
</org.test.Message>
</insert>
</batch-execution>
]
at
org.apache.camel.component.direct.DirectProducer.process(DirectProduc
er.java:56)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProc
essor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelp
er.java:91)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsy
ncProcessor.java:85)
at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProdu
cer.java:63)
Truncated. see log file for complete stacktrace
Apparently the camel endpoint did not deploy at all, or something.
I'm wondering what of these issues are totally specific to WebLogic, and
which are just plain 'ole issues. Can anyone share their experiences or
expectations of using the drools camel server WAR within the various app
servers? How much are we expected to make custom changes?
--
View this message in context: http://drools.46999.n3.nabble.com/Some-problems-with-Deploying-drools-cam...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
drools-planner in seam 2.2.2 final shows errors
by Nurlan
20:05:51,468 ERROR [STDERR]
com.thoughtworks.xstream.converters.ConversionException: Cannot load java
class kz.bee.kudos.sms.schedule.solution.Schedule :
kz.bee.kudos.sms.schedule.solution.Schedule
---- Debugging information ----
message : Cannot load java class
kz.bee.kudos.sms.schedule.solution.Schedule
cause-exception : java.lang.ClassNotFoundException
cause-message : kz.bee.kudos.sms.schedule.solution.Schedule
class : java.lang.Class
required-type : java.lang.Class
converter-type :
com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter :
com.thoughtworks.xstream.converters.extended.JavaClassConverter
line number : 4
class[1] : org.drools.planner.config.solver.SolverConfig
converter-type[1] :
com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version : null
-------------------------------
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.converters.extended.JavaClassConverter.fromString(JavaClassConverter.java:46)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:41)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:351)
20:05:51,482 ERROR [STDERR] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:302)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:230)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1035)
20:05:51,507 ERROR [STDERR] at
com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1019)
20:05:51,508 ERROR [STDERR] at
com.thoughtworks.xstream.XStream.fromXML(XStream.java:895)
20:05:51,508 ERROR [STDERR] at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:95)
20:05:51,508 ERROR [STDERR] at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:85)
20:05:51,508 ERROR [STDERR] at
org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:78)
20:05:51,508 ERROR [STDERR] at
org.drools.planner.config.XmlSolverFactory.<init>(XmlSolverFactory.java:62)
20:05:51,508 ERROR [STDERR] at
kz.bee.kudos.sms.schedule.ScheduleGenerator.init(ScheduleGenerator.java:69)
20:05:51,508 ERROR [STDERR] at
kz.bee.kudos.sms.schedule.ScheduleGenerator.generate(ScheduleGenerator.java:323)
20:05:51,508 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:05:51,508 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:05:51,508 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:05:51,508 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:597)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
20:05:51,509 ERROR [STDERR] at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
20:05:51,510 ERROR [STDERR] at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
20:05:51,510 ERROR [STDERR] at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
20:05:51,510 ERROR [STDERR] at
kz.bee.kudos.sms.schedule.ScheduleGenerator_$$_javassist_seam_16.generate(ScheduleGenerator_$$_javassist_seam_16.java)
20:05:51,510 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
20:05:51,510 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20:05:51,510 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20:05:51,510 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:597)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:335)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:280)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
20:05:51,510 ERROR [STDERR] at
org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.core.Expressions$2.invoke(Expressions.java:221)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.navigation.Pages.callAction(Pages.java:708)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.navigation.Pages.preRender(Pages.java:331)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:560)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:471)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:147)
20:05:51,511 ERROR [STDERR] at
org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117)
20:05:51,511 ERROR [STDERR] at
com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
20:05:51,511 ERROR [STDERR] at
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
20:05:51,511 ERROR [STDERR] at
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
20:05:51,511 ERROR [STDERR] at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
20:05:51,511 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
20:05:51,511 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
20:05:51,512 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,512 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
20:05:51,512 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
20:05:51,512 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
20:05:51,513 ERROR [STDERR] at
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
20:05:51,513 ERROR [STDERR] at
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:05:51,513 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
20:05:51,513 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
20:05:51,514 ERROR [STDERR] at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
20:05:51,514 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
20:05:51,514 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
20:05:51,514 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
20:05:51,514 ERROR [STDERR] at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
20:05:51,514 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
20:05:51,514 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
20:05:51,514 ERROR [STDERR] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
20:05:51,514 ERROR [STDERR] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
20:05:51,514 ERROR [STDERR] at java.lang.Thread.run(Thread.java:680)
20:05:51,515 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException:
kz.bee.kudos.sms.schedule.solution.Schedule
20:05:51,515 ERROR [STDERR] at
java.net.URLClassLoader$1.run(URLClassLoader.java:202)
20:05:51,515 ERROR [STDERR] at
java.security.AccessController.doPrivileged(Native Method)
20:05:51,515 ERROR [STDERR] at
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
20:05:51,515 ERROR [STDERR] at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
20:05:51,515 ERROR [STDERR] at
java.lang.ClassLoader.loadClass(ClassLoader.java:247)
20:05:51,515 ERROR [STDERR] at
com.thoughtworks.xstream.core.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:129)
20:05:51,516 ERROR [STDERR] at
com.thoughtworks.xstream.core.util.ClassLoaderReference.loadClass(ClassLoaderReference.java:31)
20:05:51,516 ERROR [STDERR] at
com.thoughtworks.xstream.converters.extended.JavaClassConverter.loadClass(JavaClassConverter.java:67)
20:05:51,516 ERROR [STDERR] at
com.thoughtworks.xstream.converters.extended.JavaClassConverter.fromString(JavaClassConverter.java:44)
20:05:51,516 ERROR [STDERR] ... 110 more
20:05:51,516 INFO [STDOUT] Start solving ...
--
View this message in context: http://drools.46999.n3.nabble.com/drools-planner-in-seam-2-2-2-final-show...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Need Help: Error creating bean with name 'kbase'
by singkamas
Hi everyone.
I am new to Drools and Spring MVC. I tried out the example from
http://blog.athico.com/2011/01/rules-based-validation-using-drools.html
http://blog.athico.com/2011/01/rules-based-validation-using-drools.html but
still I am getting an error. I have beeng looking over the net for hours
now. and have tried everything i can/know to make it work. I also have tried
multiple tutorials, blogs etc. But i still cant seem to get away from that
error.
I would greatly appreciate any help. Thanks in advance.
*Servlet Context*
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:drools="http://drools.org/schema/drools-spring"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-containe...">
<annotation-driven />
<resources mapping="/resources/**" location="/resources/" />
<beans:bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.spring.mvc" />
<drools:kbase id="kbase">
<drools:resources>
<drools:resource type="DRL"
source="classpath:validation.drl"></drools:resource>
</drools:resources>
</drools:kbase>
<drools:ksession id="ksession" type="stateless" name="ksession"
kbase="kbase" />
<beans:bean id="validator"
class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"></beans:bean>
<beans:bean id="collaborators"
class="com.spring.mvc.validation.Collaborators">
<beans:constructor-arg>
<beans:map>
<beans:entry key="applicantDao" value-ref="applicantDao"></beans:entry>
</beans:map>
</beans:constructor-arg>
</beans:bean>
<beans:bean id="applicantDao"
class="com.spring.mvc.service.ApplicantDaoImpl"></beans:bean>
</beans:beans>
===================================================================
*Here's the exception*
===================================================================
INFO: ERROR: org.springframework.web.servlet.DispatcherServlet - Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'kbase': Cannot create inner bean '(inner bean)' of type
[org.drools.container.spring.beans.DroolsResourceAdapter] while setting bean
property 'resources' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#16': Error setting property values; nested exception
is org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645)
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508)
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449)
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1445)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1242)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)#16': Error setting property values;
nested exception is org.springframework.beans.PropertyBatchUpdateException;
nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory
INFO: .java:456)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
... 64 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
... 68 more
SEVERE: WebModule[/SpringMVCDroolsValidation]StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'kbase': Cannot create inner bean '(inner bean)' of type
[org.drools.container.spring.beans.DroolsResourceAdapter] while setting bean
property 'resources' with key [0]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)#16': Error setting property values; nested exception
is org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645)
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508)
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449)
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133)
at javax.servlet.GenericServlet.init(GenericServlet.java:244)
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1445)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1242)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5093)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5380)
at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2018)
at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
at
org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at
com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)#16': Error setting property values;
nested exception is org.springframework.beans.PropertyBatchUpdateException;
nested PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
... 64 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property 'resource'
threw exception; nested exception is java.lang.NoSuchMethodError:
org.drools.util.ClassLoaderUtil.getClassLoader([Ljava/lang/ClassLoader;Ljava/lang/Class;Z)Lorg/drools/util/CompositeClassLoader;
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
... 68 more
===================================================================
--
View this message in context: http://drools.46999.n3.nabble.com/Need-Help-Error-creating-bean-with-name...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Logical assertions & the KnowledgeBaseConfiguration insertion modes.
by bardelman
Hi ,
i ve read that when the same fact is logically inserted into a session by
more rules, only one equal instance will be physically present in the
session.
On the other hand, i learned that Drools supports two fact insertion modes
:equality and identity.Identity (which is the default) means that no two
objects with the same JVM object reference can be inserted into the
knowledge session.
what if the equality mode is set and the logical assertion is used ? does
these modes only concerns the non logical assertion and not the logical?
i ve found in an exemple in the Drools-JBoss-Rules-5.0-Developers-Guide,
that each logically inserted fact has a counter which is incremented every
time an equal fact is inserted. Does this counter belongs to the drools
specification ?
--
View this message in context: http://drools.46999.n3.nabble.com/Logical-assertions-the-KnowledgeBaseCon...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Intersect
by Gabriel Matei Toma
hello,
I've been searching for a while with no luck : is there a way to intersect
multiple time ranges ?
Thanks in advance,
Best regards,
Gab
13 years, 11 months
5.4.CR1 Guvnor bug?
by Sean Su
Attached is the repository exported from 5.3.final. There are two issues
here.
I would appreciate it if the development can take a look.
1. The last column of the decision table does not display any values on
5.4.CR1 while it works fine on 5.3.0. Please note the rules are still
generated correctly and it even passes the validator from 5.4.CR1. However
there is some GUI issue here.
2. If you generate a deployment Snapshot, everything seems fine. However
when trying to access the generated file (from the link provided by
Guvnor), I get the NullPointerException. This can be reproduced in both
5.3.0.final and 5.4.CR1, though the trace from 5.4.CR1 is shorter.
I initially reported this NPE couple of days ago under the assumption that
it is caused by Guvnor and Joda time integration. But it seems it happens
(randomly) in that situations.
Thanks
Sean
--
"But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
the Force are they." -Yoda
13 years, 11 months
Re: [rules-users] Using GUVNOR for FUSION RULES
by Pellecchia Carolina
Hi Mike,
I couldn't bind a field because the click on the field doesn't work.
concretely, please see attached.
Thank you in advance,
Carolina Pellecchia
---------- Forwarded message ----------
From: Michael Anstis <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>>
Date: Fri, Apr 27, 2012 at 11:26 AM
Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
To: Rules Users List <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Glad to be of assistance.
To bind a field, once the field has been added to the Fact type simply click on the field name.
With kind regards,
Mike
On 27 April 2012 08:31, Pellecchia Carolina <c.pellecchia(a)vitrociset.it<mailto:c.pellecchia@vitrociset.it>> wrote:
Hi Mike,
I’m a colleague of Matteo Cusmai, we would like to thank you for your suggestions. you have been very helpful.
Following your steps, I couldn't understand a point: how can I bind a field(for ex. RadiationObservation.location) to a variable?
specifically,
$obs : RadiationObservation(?$obsLocation : location? ) over window:length (1) from entry-point "lowLevelSensorStream"
Best regards,
Carolina Pellecchia
________________________________________
Da: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] per conto di rules-users-request(a)lists.jboss.org<mailto:rules-users-request@lists.jboss.org> [rules-users-request(a)lists.jboss.org<mailto:rules-users-request@lists.jboss.org>]
Inviato: giovedì 26 aprile 2012 19.07
A: rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
Oggetto: rules-users Digest, Vol 65, Issue 93
Send rules-users mailing list submissions to
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.jboss.org/mailman/listinfo/rules-users
or, via email, send a message with subject or body 'help' to
rules-users-request(a)lists.jboss.org<mailto:rules-users-request@lists.jboss.org>
You can reach the person managing the list at
rules-users-owner(a)lists.jboss.org<mailto:rules-users-owner@lists.jboss.org>
When replying, please edit your Subject line so it is more specific
than "Re: Contents of rules-users digest..."
Today's Topics:
1. Re: Setting variables in a stateless session (Welsh, Armand)
2. Re: Using GUVNOR for FUSION RULES (Michael Anstis)
3. Re: Guvnor guided editor and non argument constructor
(Michael Anstis)
4. looking for advice (Bobby Richards)
5. Re: Guvnor guided editor and non argument constructor
(Vincent LEGENDRE)
6. Re: Guvnor guided editor and non argument constructor (Sean Su)
----------------------------------------------------------------------
Message: 1
Date: Thu, 26 Apr 2012 15:57:11 +0000
From: "Welsh, Armand" <AWelsh(a)StateStreet.com>
Subject: Re: [rules-users] Setting variables in a stateless session
To: "rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>" <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Message-ID:
<D52DE19B4C463C4BA21F81790B9F079543084863(a)GDCPW3376.corp.statestr.com<mailto:D52DE19B4C463C4BA21F81790B9F079543084863@GDCPW3376.corp.statestr.com>>
Content-Type: text/plain; charset="us-ascii"
Think of a stateless knowledge session as being a statefull knowledge session, with the following adjustments:
A stateless knowledge session cannot be manipulated prior the start of the session.
A stateless knowledge session cannot be manipulated or queried after the end of the session.
A stateless session begins when you execute the fireallrules method.
A stateless session ends when the rule processing terminates. -- There is no pause, there is no restarting. The instant the rules stop firing, and return to your calling code, the knowledge session has been torn down.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] On Behalf Of bardelman
Sent: Thursday, April 26, 2012 2:06 AM
To: rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
Subject: [rules-users] Setting variables in a stateless session
hi folks, this is a simple question ,
i just want to understand how is it possible that a stateless session have a
setGlobal() method as it does not maintain a state. What's the point ?!
i also have some confusion between a "request scope" and a "stateless
session scope" i think it s the same..
--
View this message in context: http://drools.46999.n3.nabble.com/Setting-variables-in-a-stateless-sessio...
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
------------------------------
Message: 2
Date: Thu, 26 Apr 2012 15:52:09 +0100
From: Michael Anstis <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>>
Subject: Re: [rules-users] Using GUVNOR for FUSION RULES
To: Rules Users List <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Message-ID:
<CAAG9P0tN=HqTJ9hkJHDiQGBk=_10o4f810-bQBhbTFwUtO-fEQ(a)mail.gmail.com<mailto:10o4f810-bQBhbTFwUtO-fEQ@mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"
Sure.
- Create "New Rule"
- Add a condition (green + near "WHEN")
- Select "From Entry Point"
- Type "lowLevelSensorStream" into TextBox
- Click on "click to add patterns..."
- Select your Fact Type (see * below)
- In "Over sliding window" ListBox select "Length"
- Type "1" into the TextBox next to "Length".
* OK, so this is possibly where you're having problems.
In order for a Fact Type to be used with CEP it needs to be annotated as an
Event. This is how this can be accomplished:-
*If you have a Declarative Model
*
- Open the Declarative Model
- Select the Fact Type that should be an Event
- Add an Annotation, name="role", key="value", value="event"
- Save
*If you have a POJO Model*
- Create a new Declarative Model
- Add a Fact Type that matches the name of that in your JAR
- Add an Annotation, name="role", key="value", value="event"
- Save
Annotating your POJO is covered in the Drools Expert User Guide. You are
just using Guvnor to achieve what is required.
With kind regards,
Mike
On 26 April 2012 15:22, Matteo Cusmai <cusmaimatteo(a)gmail.com<mailto:cusmaimatteo@gmail.com>> wrote:
> Hi Mike,
> thanks for suggestion, but i have already read documentation.
>
> First of all, i cannot define "over window:length(1) from entry-point
> lowLevelSensorStream".
> Do you help me to do this?
>
> Best Regards,
> Matteo.
>
>
>
> On Thu, Apr 26, 2012 at 11:32 AM, Michael Anstis <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>
> > wrote:
>
>> Yes this is possible with Guvnor 5.2 onwards.
>>
>> The user-guide explains how to use the Guided Rule Editor (but not
>> specifically CEP features).
>>
>> Read that and give it a try - it's reasonably intuitive (not an excuse
>> for poor documentation though) and come back here with questions.
>>
>> With kind regards,
>>
>> Mike
>>
>> On 26 April 2012 09:08, Matteo Cusmai <cusmaimatteo(a)gmail.com<mailto:cusmaimatteo@gmail.com>> wrote:
>>
>>> Hi all,
>>> i am novice on GUVNOR, but i would like to define my fusion rules by
>>> graphical tool.
>>>
>>> An example of my rules is:
>>>
>>> rule "radiation-event"
>>> salience 10
>>> no-loop
>>> when
>>> $obs : RadiationObservation( $obsLocation : location, value >
>>> 10 ) over window:length(1) from entry-point lowLevelSensorStream
>>> not RadiationEvent( this meets[ 25s ] $obs, location
>>> geoIsWithinDistance[ 5m ] $obsLocation )
>>> then
>>> insert(new RadiationEvent( $obs, "Radiation over 10",
>>> Event.THREAT_HIGH, $obsLocation, $obs.getSensor() ));
>>> end
>>>
>>> rule "radiation-update"
>>> salience 5
>>> no-loop
>>> when
>>> $obs : RadiationObservation( $obsLocation : location, value >
>>> 10 ) over window:length(1) from entry-point lowLevelSensorStream
>>> $event : RadiationEvent( this meets[ 25s ] $obs, location
>>> geoIsWithinDistance[ 5m ] $obsLocation )
>>> then
>>> Event e = Event.clone($event);
>>> e.addObservation($obs);
>>> insert( e );
>>> retract($event);
>>> retract($obs);
>>> end
>>>
>>> Is it possibile to define rules such the above using GUVNOR?
>>> Are there some documentation or tutorial?
>>>
>>> Thanks a lot in advance,
>>> Matteo Cusmai.
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/31ab515...
------------------------------
Message: 3
Date: Thu, 26 Apr 2012 14:40:27 +0100
From: Michael Anstis <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>>
Subject: Re: [rules-users] Guvnor guided editor and non argument
constructor
To: Rules Users List <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Message-ID:
<CAAG9P0tnkU2nLzXduz03si26uL-wFtRAA=0ogGAF05OJEZ4dGw(a)mail.gmail.com<mailto:0ogGAF05OJEZ4dGw@mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"
Seems reasonable enough.
On 26 April 2012 14:36, Sean Su <sean.x.su(a)gmail.com<mailto:sean.x.su@gmail.com>> wrote:
> It seems that the new fact created by the guided editor must be from
> the java class that has the default non argument constructor in
> Guvnor. There seems no way we can customize it to pass arguments in.
> This would force us to provide setters to the object.
>
> Is this a true statement?
>
> Thanks
>
> Sean
>
> Sent from my iPad
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/75a0a7a...
------------------------------
Message: 4
Date: Thu, 26 Apr 2012 11:42:41 -0500
From: Bobby Richards <bobby.richards(a)gmail.com<mailto:bobby.richards@gmail.com>>
Subject: [rules-users] looking for advice
To: rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
Message-ID:
<CAAqkdrv7Nv1WMByZsd+XM=OZvetnEOFk03x7QaTGyNc6wAbccQ(a)mail.gmail.com<mailto:OZvetnEOFk03x7QaTGyNc6wAbccQ@mail.gmail.com>>
Content-Type: text/plain; charset="iso-8859-1"
I have not yet determined how I want to implement my problem and was hoping
to get some feedback.
I am using drools to migrate the logic from my automated currency trading
infrastructure. Each currency pair, i.e. eurusd has around
200 attributes associated with it.
This includes range values (high, low, average) for multiple time periods,
volatility information, bid/ask updates etc.
Currently I have classes associated for each, so say for range:
class Range {
double high;
double low;
double avg;
}
Range europe = new Range(); //european trading hours
Range us = new Range(); //us trading hours
Questions:
1. I am wondering if I should not just create a map that lists every
attribute per pair as a key ("eurusd:range:europe:high")? So essentially
my drools session will have one fact, not counting the incoming quotes. I
see on the list that this was a problem before the mvel updates but that
was a while ago.
2. When an incoming quote might modify a value, what is the performance
difference between using a rule to change the value or making the changes
outside of the ksession and referencing the facthandler to modify? Is one
method considered 'cleaner'?
Thanks,
Bobby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/2b86c5f...
------------------------------
Message: 5
Date: Thu, 26 Apr 2012 18:48:37 +0200 (CEST)
From: Vincent LEGENDRE <vincent.legendre(a)eurodecision.com<mailto:vincent.legendre@eurodecision.com>>
Subject: Re: [rules-users] Guvnor guided editor and non argument
constructor
To: Rules Users List <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Message-ID:
<1c470056-3677-4bd2-a1eb-368610b51999(a)confiance.eurodecision.fr<mailto:1c470056-3677-4bd2-a1eb-368610b51999@confiance.eurodecision.fr>>
Content-Type: text/plain; charset="utf-8"
JavaBeans convention : all default constructible and plenty of setters (for writeable properties) and getters (for readeable properties)
----- Mail original -----
De: "Michael Anstis" <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>>
?: "Rules Users List" <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Envoy?: Jeudi 26 Avril 2012 15:40:27
Objet: Re: [rules-users] Guvnor guided editor and non argument constructor
Seems reasonable enough.
On 26 April 2012 14:36, Sean Su < sean.x.su(a)gmail.com<mailto:sean.x.su@gmail.com> > wrote:
It seems that the new fact created by the guided editor must be from
the java class that has the default non argument constructor in
Guvnor. There seems no way we can customize it to pass arguments in.
This would force us to provide setters to the object.
Is this a true statement?
Thanks
Sean
Sent from my iPad
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/29fa984...
------------------------------
Message: 6
Date: Thu, 26 Apr 2012 13:06:57 -0400
From: Sean Su <sean.x.su(a)gmail.com<mailto:sean.x.su@gmail.com>>
Subject: Re: [rules-users] Guvnor guided editor and non argument
constructor
To: Rules Users List <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
Message-ID: <-6645870489207221519@unknownmsgid>
Content-Type: text/plain; charset="iso-8859-1"
What I am prototyping is part of the event processing (with or without
fusion). I want to use the rules created by the Guvnor to create the new
events. However, as you would understand, once the event has been created,
it should not be modified as it happened in the past.
So I am trying to avoid setters if possible.
Sean
Sent from my iPad
On Apr 26, 2012, at 12:49 PM, Vincent LEGENDRE <
vincent.legendre(a)eurodecision.com<mailto:vincent.legendre@eurodecision.com>> wrote:
JavaBeans convention : all default constructible and plenty of setters (for
writeable properties) and getters (for readeable properties)
------------------------------
*De: *"Michael Anstis" <michael.anstis(a)gmail.com<mailto:michael.anstis@gmail.com>>
*?: *"Rules Users List" <rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>>
*Envoy?: *Jeudi 26 Avril 2012 15:40:27
*Objet: *Re: [rules-users] Guvnor guided editor and non argument constructor
Seems reasonable enough.
On 26 April 2012 14:36, Sean Su <sean.x.su(a)gmail.com<mailto:sean.x.su@gmail.com>> wrote:
> It seems that the new fact created by the guided editor must be from
> the java class that has the default non argument constructor in
> Guvnor. There seems no way we can customize it to pass arguments in.
> This would force us to provide setters to the object.
>
> Is this a true statement?
>
> Thanks
>
> Sean
>
> Sent from my iPad
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120426/26a2bda...
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 65, Issue 93
*******************************************
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
13 years, 11 months
Re: [rules-users] modify, retract, setFocus and Salience
by gboro54
I will take a stab at answering this:
-Modify and Retract will cause the tree to be re-evaluated for the current
facts in memory. This may cause new activations or cancellations to occur.
Be forewarned that a rule that modifies a fact may cause a continuous loop
if the conditions for that rule are always satisfied. If you wish to not
have this behavior look at no-loop
-Salience: Can be useful but I have found that using a controller fact to
order execution is more efficient. The problem with Salience is that it can
cause your tree to become to linear thus the behavior of the rules engine is
more like a bunch of if statements rather then being able to match patterns
and fire. I do use salience for some rules but try not to over do it
-setFocus: I don't have anything wrong with this. This allows you to
segments your rules into agenda groups.
I am sure someone else on here can add more.
-Mike
aps4u wrote
>
> will these conditions make any trouble? waiting for a reply..
>
--
View this message in context: http://drools.46999.n3.nabble.com/modify-retract-setFocus-and-Salience-tp...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months