Hibernate Query delivers wrong values
by Thomas Zwifl
Hi there!
I'm working with the latest snapshot-releas of v5.1 (build3098-rev27324-20090630-0403).
My application consists of two independent processes,
both are repeated periodically (timer-node).
the processes both have ruleset-nodes. some rules are
querying a database with hibernate in the rule condition (LHS).
the queried objects are then inserted into workinmemory (insert(object)),
then some computation follows, the objects are modified and written
back to db, and then the objects are retracted (retract(object)).
Now to the problem: when I start the application, everything works
correct, and leads to the right results. But when I change a field of a
db-record manually, the hibernate-query delivers the old values!!
(of course the changes are committed.)
Anyone has an idea whats going wrong here? Is there some kind of
caching mechanism that delivers the old objects instead of querying
the database?
greetz!
tom
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
15 years, 6 months
Does drools provide Run time compilation support of java code present in .drl file
by Pardeep.Ruhil@lntinfotech.com
Hi,
I want to know , do we need to compile the the project having drl file
with java code written in it drl file.
Does drools provide Run time compilation support of java code present in
.drl file?
Please help me get out of this question.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years, 6 months
Not able to deploy drools guvnor in Apache Tomcat 5.5
by Ashok Deivasigamani
Hi
I am not able to deply the drools guvnor .war file in Apache Tomcat 5.5
server.
Deploying the .war gives the following exception
SEVERE: Exception sending context initialized event to listener instance of
class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: Could not create Component: assetLockManager
at
org.jboss.seam.init.Initialization.addComponent(Initialization.java:1155)
at
org.jboss.seam.init.Initialization.installComponents(Initialization.java:1071)
at org.jboss.seam.init.Initialization.init(Initialization.java:720)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.TypeNotPresentException: Type
javax.annotation.PostConstruct not present
at
com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38)
at
com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31)
at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:704)
at
java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:191)
at com.ibm.oti.reflect.Method.getAnnotation(Method.java:20)
at java.lang.reflect.Method.getAnnotation(Method.java:693)
at
java.lang.reflect.AccessibleObject.isAnnotationPresent(AccessibleObject.java:187)
at org.jboss.seam.intercept.Interceptor.init(Interceptor.java:130)
at org.jboss.seam.intercept.Interceptor.<init>(Interceptor.java:97)
at org.jboss.seam.Component.initDefaultInterceptors(Component.java:1029)
at org.jboss.seam.Component.initInterceptors(Component.java:927)
at org.jboss.seam.Component.<init>(Component.java:251)
at org.jboss.seam.Component.<init>(Component.java:205)
at
org.jboss.seam.init.Initialization.addComponent(Initialization.java:1139)
... 18 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct
at java.lang.Class.forNameImpl(Native Method)
at java.lang.Class.forName(Class.java:160)
at
com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:33)
... 32 more
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/drools-guvnor] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbweb\WEB-INF\lib\jsp-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/jsp/JspPage.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbweb\WEB-INF\lib\servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Error configuring application listener of class
com.odb.web.servlet.MemoryCleanupListener
java.lang.ClassNotFoundException: com.odb.web.servlet.MemoryCleanupListener
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jodbweb] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbcache\WEB-INF\lib\jsp-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/jsp/JspPage.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO:
validateJarFile(C:\ViewStore\adeivasigamani_cmsToRS\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jodbcache\WEB-INF\lib\servlet-api.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.NamingContextListener
addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not
load resource factory class [Root exception is
java.lang.ClassNotFoundException:
org.apache.commons.dbcp.BasicDataSourceFactory]
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Jul 9, 2009 10:22:00 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/jodbcache] startup failed due to previous errors
Jul 9, 2009 10:22:00 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8081
Jul 9, 2009 10:22:01 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8010
Jul 9, 2009 10:22:01 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
Jul 9, 2009 10:22:01 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 9, 2009 10:22:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3993 ms
Kindly give some solution to deploy
--
View this message in context: http://www.nabble.com/Not-able-to-deploy-drools-guvnor-in-Apache-Tomcat-5...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 6 months
How to iterate ArrayList object
by Ashok Deivasigamani
I have a Message Object which has a Attribute Object which has a ArrayList
of AttributeParams Objects. How can I iterate through the ArrayList to get
to a perticular AttributeParans Object in the drl file.
The java representation of these Objects are as Follows
Class Message {
private Attributes attributes;
}
Class Attributes {
private ArrayList<AttributeParams> attributeParams;
}
Class AttributeParsms {
private String name;
}
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
--
Ashok Deivasigamani
15 years, 6 months
Detect changes in rules at runtime
by rviswanathan
Hi
I am using Guvnor for editing my business rules. I am able to write a test
program in java that would fire one sample rule that I have created in
guvnor.
public static final void main(String[] args) {
try {
// load up the knowledge base
//KnowledgeBase kbase = readKnowledgeBase();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "MyAgent"
);
kagent.applyChangeSet(
ResourceFactory.newFileResource("C:/Test/changeset.xml"));
KnowledgeBase kbase1 = kagent.getKnowledgeBase();
StatefulKnowledgeSession ksession =
kbase1.newStatefulKnowledgeSession();
Message message = new Message();
message.setMessage("Hello World");
message.setStatus(Message.HELLO);
ksession.insert(message);
ksession.fireAllRules();
ksession.dispose();
}
catch (Exception ex) {
ex.printStackTrace();
}
}
Now I am trying to see if I would be able to detect changes in the rules
that I edit in Guvnor at runtime. What I am trying to do is to edit one of
the rules and save it, and I need this change to be picked up automatically
by my java application.
Is this possible? How do I do this?
Thanks
Ram
--
View this message in context: http://www.nabble.com/Detect-changes-in-rules-at-runtime-tp24379025p24379...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 6 months
How to iterate ArrayList object
by Ashok Deivasigamani
I have a Message Object which has a Attribute Object which has a ArrayList
of AttributeParams Objects. How can I iterate through the ArrayList to get
to a perticular AttributeParans Object in the drl file.
The java representation of these Objects are as Follows
Class Message {
private Attributes attributes;
}
Class Attributes {
private ArrayList<AttributeParams> attributeParams;
}
Class AttributeParsms {
private String name;
}
This is my drl file,
when
m : Message( myAttributes : attributes)
then
System.out.println(myAttributes);
System.out.println(myAttributes.getAttributeParams());
System.out.println( myMessage );
when I fire my rule, this is the output I am getting.
com.sample.Attributes@39c639c6
[com.sample.AttributeParams@39a639a6, com.sample.AttributeParams@39ac39ac]
>From the result we can see that we have two Attribute objects in the
ArrayList.
How can I iterate through the ArrayList to get a perticular AttributeParams
object
--
Ashok Deivasigamani
15 years, 6 months
Error deploying Guvnor in WAS 6.1
by Sobhana
When we deploy Guvnor web application in WebSphere AppServer 6.1, we get the
following error
[7/9/09 16:18:09:453 IST] 0000001c WebApp E Exception caught while
initializing context
java.lang.RuntimeException: error while reading /WEB-INF/components.xml
at
org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:221)
at org.jboss.seam.init.Initialization.create(Initialization.java:124)
at
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
at
com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:652)
at
com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:355)
at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:292)
at
com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:92)
at
com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:671)
at
com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:624)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
at
com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1274)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)
at
com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
at
com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:921)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1461)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4132)
at
com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4229)
at
com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:245)
at
com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1466)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:62)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:265)
at
javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1092)
at
javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:973)
at
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1106)
at
com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:999)
at
com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:139)
at
com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:179)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at
com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:627)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:480)
at com.ibm.rmi.iiop.ORB.process(ORB.java:512)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1571)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2717)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2582)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Caused by: java.lang.RuntimeException: Error loading element
RoleBasedPermissionResolver with component name null and component class
null
at
org.jboss.seam.init.Initialization.installComponentsFromXmlElements(Initialization.java:342)
at
org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:217)
... 52 more
--
View this message in context: http://www.nabble.com/Error-deploying-Guvnor-in-WAS-6.1-tp24408096p244080...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 6 months
How work the sliding windows?
by linolia83
Hi all, I’m trying to build the example 2.14 in Drools Fusion at follow
link:
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-fusion/ht...
two notes:
• Important: Sliding Windows are only available when running the engine in
STREAM mod (paragraph 2.6 – Sliding window )
• Drools generalized the concept of a stream as an "entry point" into the
engine. An entry point is for drools a gate from which facts come. The facts
may be regular facts or special facts like events. (paragraph 2.3 - Stream
support )
1) Presupposing that the SensorReading object is an event, why in order to
develop the example 2.14 the SensorReading object it didn’t use a
entrypoint? I have developed it in this way:
my regoleStream.drl file rule:
declare SensorReading
@role( event )
@timestamp ( timestamp )
@duration ( timeduration )
end
rule "Alarm"
when
TemperatureThreshold( $max : max )
$lettore: SensorReading( ) from entry-point "entry"
$media: Number( doubleValue >= $max ) from accumulate(
SensorReading( $temp : temperature )
over window:time( 5s ) from entry-point "entry" ,
average( $temp ) )
then
System.err.println("Temp media: " + $media);
end
I have defined my class SensorReading.java and Sensor.java
public class SensorReading {
private double temperature;
private long timestamp;
private long timeduration;
// constructor, getters, setters...
}
public class Sensor {
private Random random = new Random();
public double nextReading() {
return (20.5 + random.nextGaussian());
}
}
my class: DroolsTest is defined in STREAM MODE and PSEUDO CLOCK SESSION
configuration
(see the file DroolsTest.java)
http://www.nabble.com/file/p24406682/exampleSensorReading.zip
exampleSensorReading.zip
I have another question: using the accumulated function in order to
calculate the average, I must use update or an insert for a new reading? in
other words:
entrypoint.update( eventhandle, reading ); or
entrypoint.insert(reading);
Using the statement insert my output it is:
Tempo: 0s T: 21.799588922737122
Temp media: 21.799588922737122
Tempo: 1s T: 22.88313013240042
Temp media: 22.88313013240042
Temp media: 22.34135952756877
Tempo: 2s T: 21.421353538299165
Temp media: 21.42135353829916
Temp media: 22.395871267700002
Temp media: 22.034690864478904
Tempo: 3s T: 19.458193737965093
Temp media: 20.930563588215644
Temp media: 21.661451885266274
Temp media: 21.39056658285045
Tempo: 4s T: 20.8832973982136
Temp media: 20.8832973982136
Temp media: 20.921110350215237
Temp media: 21.50582098785574
Temp media: 21.28911274592308
Tempo: 5s T: 19.97430560962051
Tempo: 6s T: 20.518826117217664
Temp media: 20.518826117217664
Temp media: 20.518826117217664
Temp media: 20.518826117217664
Temp media: 20.51882611721767
Temp media: 20.51882611721765
Temp media: 20.51882611721766
Temp media: 20.518826117217674
Tempo: 7s T: 19.189461637685618
Tempo: 8s T: 19.187724324701474
Tempo: 9s T: 18.158118482083236
Tempo: 10s T: 20.587196329519568
Using the statement update my output it is:
Tempo: 0s T: 20.688079808657893
Temp media: 20.688079808657893
Tempo: 1s T: 21.369835728163952
Temp media: 21.369835728163952
Tempo: 2s T: 21.975416358939214
Temp media: 21.975416358939214
Tempo: 3s T: 21.6785090963422
Temp media: 21.6785090963422
Tempo: 4s T: 19.93979461762877
Tempo: 5s T: 20.355758074646886
Temp media: 20.355758074646886
Tempo: 6s T: 21.76122923383071
Temp media: 21.76122923383071
The output that I would wish to obtain (after 5 sec) is the following one:
Tempo: 0s T: 21.799588922737122
Tempo: 1s T: 22.88313013240042
Tempo: 2s T: 21.421353538299165
Tempo: 3s T: 19.458193737965093
Tempo: 4s T: 20.8832973982136
Tempo: 5s T: 19.97430560962051
Temp media: 21.xxxxxxx (fire only if avg is > 20)
You thoughts that my error has had:
A) I use in wrong way the API, in phase of configuration of rule the engine
B) is an logical error of my rule
C) I mistake me and the sliding windows they can’t be used as I would wish
--
View this message in context: http://www.nabble.com/How-work-the-sliding-windows--tp24406682p24406682.html
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 6 months
Re: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration: (Pradeep Ruhil)
by Pardeep.Ruhil@lntinfotech.com
Hi,
Thanks Mark for answering my query.
Now I have set all the jars file in the classpath, but still m getting the
same exception.
The exception is caused by : Null pointer exception.
I am not able to understand why it is giving me this exception, while in
the mailing list I didn't found anybody having this
problem.
This is my code snippet :
KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory.
newKnowledgeBuilderConfiguration();
config.setProperty("drools.dialect.java.compiler", "ECLIPSE");
KnowledgeBuilder kbuilder =KnowledgeBuilderFactory.newKnowledgeBuilder(
config );
//KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(
"shopingdiscount.drl"), ResourceType.DRL);
Am I missing anything that is to initialized , so that I can get through
this Null Pointer Exception.
Please help me to through of this situation. I am stuck in this.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years, 6 months
Re: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:
by Pardeep.Ruhil@lntinfotech.com
Thanks Mark for answering my query.
Now I have set all the jars file in the classpath, but still m getting the
same exception.
The exception is caused by : Null pointer exception.
I am not able to understand why it is giving me this exception, while in
the mailing list I didn't found anybody having this
problem.
This is my code snippet :
KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory.
newKnowledgeBuilderConfiguration();
config.setProperty("drools.dialect.java.compiler", "ECLIPSE");
KnowledgeBuilder kbuilder =KnowledgeBuilderFactory.newKnowledgeBuilder(
config );
//KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource(
"shopingdiscount.drl"), ResourceType.DRL);
Am I missing anything that is to initialized , so that I can get through
this Null Pointer Exception.
Please help me to through of this situation. I am stuck in this.
Thanks & Regards
Pardeep Ruhil
______________________________________________________________________
15 years, 6 months