compiling performance dropped with 5.0.1 to 5.1.1 upgrade
by Justin Case
Hi all,
my set of rules (100 files, 20 rules/file) was taking 30 seconds to compile
until yesterday. Now I upgraded DRools to 5.1.1 and it takes about 2 minutes to
compile. I'm on Windows XP and cannot notice any memory or CPU bottlenecks.
I'm using an Ant task to do it, and the timing is exactly the same whether I'm
using the DRools Ant compiler task, or I define a compiler task of my own. I can
see in my own compiler task that this particular line is spending a few seconds
per DRL file:
builder.add( res, ResourceType.DRL );
so the effective compilation is the culprit right? I tried also to merge all the
DRL files and compile them all-at-once but this didn't change anything.
Do you have any idea what might have changed between 5.0 and 5.1 or what I could
do to have it like before? Or even faster, of course :)
Thanks a lot,
JC
14 years
drools flow 5.2.0.SNAPSHOT
by melc
Hi all,
Has anyone tried from the lastSuccessfulBuild - #6023, the drools flow
part?? i.e. create a process in guvnor and view it from gwt-console or
gwt-console-server or should we not touch that yet?? and play with the 5.1
version of the gwt-console/gwt-console-server??
The log with the exceptions follows and it seems that
org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable is
not found. Tried to place the package containing the variabletypes from
drools-persistence-jpa-5.1.1 into
drools-flow-persistence-jpa-5.2.0.SNAPSHOT.jar of
gwt-console-server-drools.war but no luck, I get another exception and a new
adventure begins....
Any help will be greatly appreciated, thank you!!
2010-11-17 11:32:51,578 INFO [STDOUT] 11:32:51,578 INFO [Environment]
Bytecode provider name : javassist
2010-11-17 11:32:51,578 INFO [STDOUT] 11:32:51,578 INFO [Environment]
using JDK 1.4 java.sql.Timestamp handling
2010-11-17 11:32:51,718 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/gwt-console-server].[Resteasy]]
Servlet.service() for servlet Resteasy threw exception
org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could
not initialize stateful knowledge session: [PersistenceUnit:
org.drools.persistence.jpa] class or package not found
at
org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)
at
org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)
at
org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)
at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Could not initialize stateful
knowledge session: [PersistenceUnit: org.drools.persistence.jpa] class or
package not found
at
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:102)
at
org.drools.integration.console.DroolsFlowCommandDelegate.getSession(DroolsFlowCommandDelegate.java:110)
at
org.drools.integration.console.DroolsFlowCommandDelegate.<init>(DroolsFlowCommandDelegate.java:53)
at
org.drools.integration.console.DroolsFlowProcessManagement.<init>(DroolsFlowProcessManagement.java:36)
at
org.drools.integration.console.DroolsFlowManagementFactory.createProcessManagement(DroolsFlowManagementFactory.java:27)
at
org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:98)
at
org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)
at
org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)
at
org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)
at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
... 26 more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit:
org.drools.persistence.jpa] class or package not found
at
org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1089)
at
org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:886)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:772)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:183)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:240)
at
org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at
org.drools.integration.console.DroolsFlowCommandDelegate.newStatefulKnowledgeSession(DroolsFlowCommandDelegate.java:63)
... 42 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for:
org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable
at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
at
org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:112)
at
org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1005)
at
org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1077)
... 50 more
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-flow-5-2-0-SNA...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Drools Human Task Issue on Server Restart
by ramram
Hi All,
I Have an issue with Human Task in Drools. I have a simple scenario.
Start --> Human Task1 ---> Human Task2 ---> Human Task3 ---> End
I persisted the Task Service as well as the Human Task info to Oracle.
But what is happening is that I have the Human Task1 once completed a Human
Task2 is being created, After that I restart the jboss server (trying to
imitate a power shutdown issue to test if the process will continue) the
human task data are persisted to Oracle but on the restart the server I can
see the task and once I completed it it is changing its status from reserved
to completed but the process stops and Human Task3 is not being created.
Any Ideas? on what is happening.
Is there any recommendation on this issue?
Thanks in advance.
Regards,
Ram
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Human-Task-Iss...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Drools Spring module
by ahmed fayed
Hi,
Are the new Spring Module support creating POJO Rules? I could't find the
rule, condition, and consequence annotations classes in the new JARs in 5.1,
any idea if it's still supported and in which JAR?
Thanks in advance.
14 years
Re: [rules-users] Replacement for eval
by Greg Barton
If you use bean property conventions for naming your methods you can use a regular condition element. for instance, you could rename emptyMessageFinder() to isMessageFound() or getMessageFound() and your condition would look like this:
when
m : Message(messageFound == true)
then
...
end
And when you do this the rete is used, birds sing in the trees, and world peace will be declared.
GreG
On Nov 16, 2010, at 5:37, Nirmal Fernando <nirmal070125(a)gmail.com> wrote:
Hi,
I have two questions.
1) Is there any other way/method in Drools to test the truth value of a condition other than "eval"?
In almost all rules of my application needs to test conditions, and it takes ages to run using "eval".
2) Say I have a java method which returns a boolean, and I have used it within an "eval" function. (eg: eval(message.emptyMessageFinder()) )
This "emptyMessageFinder()" method will return a "boolean" if there's an empty message. This function is containing many loops and recursive operations.
Will I get a performance improvement if I alternate the above such that the "emptyMessageFinder()" method sets a boolean attribute (anyEmptyMessage)
in the Message class to true and false, and I'm using following in my drl.
when
m: Message()
m.emptyMessageFinder()
eval(m.anyEmptyMessage) //can I use eval here??
......
If someone can answer these questions it would be a great help!
Thank you in advance!
--
Best Regards,
Nirmal
C.S.Nirmal J. Fernando
Department of Computer Science & Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.
Blog: http://nirmalfdo.blogspot.com/
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years
OutOfMemoryError during marshalling with NOT conditions
by ulibube
A little while back someone posted a message about an OutOfMemoryError
problem when marshalling a knowledgebase containing rules with NOT
conditions:
http://drools-java-rules-engine.46999.n3.nabble.com/OutOfMemoryError-on-m...
Someone created a JIRA issue for him, which says that it's fixed, but there
are two comments on it now saying that it is not (in 5.1.1), one of them
being mine:
https://jira.jboss.org/browse/JBRULES-2453
I don't know the recommended procedure for requesting a bug to be reopened
or cloned, which is why I am posting here. My apologies. I am quite
convinced that there is still a bug in that code.
For illustration, below is a little rule base which lets me reproduce the
issue. The three fact types are pretty simple, and I insert 2 facts for
DCMSeries and about 630 for DCMInstance. The marshalling breaks if done
after inserting the facts and before a call to fireAllRules. Marshalling
afterwards does not consistently exhibit this issue. Eliminating the "not"
condition also "fixes" the problem.
Uli
package mypackage
import somepackage.DCMInstance
import somepackage.DCMSeries
import somepackage.StackingOrder
rule "Stack Default"
when
DCMSeries( $suid : uid )
DCMInstance( seriesUID == $suid, $iuid: uid )
not StackingOrder(instanceUID == $iuid)
then
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/OutOfMemoryError-duri...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years
Fusion temporal operators, time units
by Nathan Bell
Fusion seems to only support days, hours, minutes, seconds and
milliseconds for the units of time used with temporal operators. For
example consider the following rule (which works correctly):
rule "AdmittedInLast7Days"
dialect "java"
when
$now : RuleTime()
$account : PatientAccount(this after[-7d,0s] $now )
then
System.out.println("AdmittedInLast7Days fired");
End
Now suppose that I want an alternate version of this rule that instead
of firing for patients admitted in the last 7 days it fires for patients
admitted in the last 7 months, or years. Is there built-in support for
doing this? If not, does anyone have suggestions on the best way to
approach this?
Thank You,
Nathan Bell
14 years