Potential memory leak in package analysis tool in Guvnor 5.3
by Chris Selwyn
I have recently been looking at upgrading our installation from 5.1 to 5.3 (latest supported by RedHat).
As part of this I noticed the Package Analysis tool so I started experimenting with it.
All that happens is that I get an exceptio message in the JBoss AS server.log file and an apparent memory leak.
The exception relates to a SerializationException thrown by VerificationService.analysePackage and contains many (many) Verifier Errors saying
<quote>
[ERR 107] Line 2:0 mismatched input 'when' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
</quote>
Using jvisualvm, I can see that the memory usage takes a step jump each time I use the analysis tool and eventually (actually after only 2 usages) I get OutOfMemoryErrors.
The package compiles just fine.
Is there a known problem with the analysis tool?
Chris Selwyn
11 years, 10 months
add guvnor-webapp-core as a dependency to project
by kooper
Hi,I'm trying to add guvnor-webapp-core as a dependency to my project, but
after when deploying app to JBOSS 7(tried 7.1.1 and 7.0.2), I have following
exception:
11:19:50,138 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8)
MSC00001: Failed to start service
jboss.deployment.unit."my_app-1.0-SNAPSHOT.war".WeldService:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."my_app-1.0-SNAPSHOT.war".WeldService:
org.jboss.weld.exceptions.DeploymentException: Exception List with 3
exceptions:Exception 0 :org.jboss.weld.exceptions.DeploymentException:
WELD-001408 Unsatisfied dependencies for type [RepositoryStartupService]
with qualifiers [@Default] at injection point [[field] @Inject private
org.drools.guvnor.server.repository.RulesRepositoryManager.repositoryStartupService]
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107) at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127) at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346) at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331) at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)Exception 0
:org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [RepositoryStartupService] with qualifiers [@Default]
at injection point [[field] @Inject private
org.drools.guvnor.server.repository.MailboxService.repositoryStartupService]
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107) at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127) at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346) at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331) at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)Exception 0
:org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [ConversionService] with qualifiers [@Default] at
injection point [[field] @Inject private
org.drools.guvnor.server.RepositoryAssetService.conversionService] at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107) at
org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127) at
org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346) at
org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331) at
org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:76) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636) at
org.jboss.as.weld.services.WeldService.start(WeldService.java:83) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[rt.jar:1.6.0_18] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[rt.jar:1.6.0_18] at java.lang.Thread.run(Thread.java:636)
[rt.jar:1.6.0_18]Caused by: org.jboss.weld.exceptions.DeploymentException:
Exception List with 3 exceptions:....
Do I need to add anything to project configuration to be able to add guvnor
as dependency?Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/add-guvnor-webapp-core-as-a-dependency-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
deadlock
by Smita S. Deshpande
Hi,
We are currently using drools 5.0.1 for processing business rules. But we are currently facing an issue where if we invoke the rule using 10 concurrent requests , thread gets locked . The error is as below .
Deadlock/Blocked
Monitor
Owns Monitor Lock on org/drools/rule/JavaDialectRuntimeData$PackageClassLoader@0E99F9B8/0E99F9C4
Waiting for Monitor Lock on org/drools/rule/CompositeClassLoader@0DB50DC0/0DB50DCC
Java Stack
at java/lang/ClassLoader.loadClass(ClassLoader.java:606(Compiled Code))
at java/lang/Class.forNameImpl(Native Method)
at java/lang/Class.forName(Class.java:163(Compiled Code))
at org/drools/rule/JavaDialectRuntimeData$PackageClassLoader.loadClass(JavaDialectRuntimeData.java:458(Compiled Code))
at java/lang/ClassLoader.loadClass(ClassLoader.java:606(Compiled Code))
at /Rule_AutoUW_Rule_BR12Constants_153_0ConsequenceInvoker.evaluate(Rule_AutoUW_Rule_BR12Constants_153_0ConsequenceInvoker.java:16)
at org/drools/common/DefaultAgenda.fireActivation(DefaultAgenda.java:934(Compiled Code))
at org/drools/common/DefaultAgenda.fireNextItem(DefaultAgenda.java:885(Compiled Code))
at org/drools/common/DefaultAgenda.fireAllRules(DefaultAgenda.java:1086(Compiled Code))
at org/drools/common/AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:661(Compiled Code))
at org/drools/common/AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:637(Compiled Code))
at org/drools/reteoo/ReteooStatelessSession.execute(ReteooStatelessSession.java:203(Compiled Code))
Can you please advice .This has been occurring on Production systems and causing failures
Thanks & Regards,
Smita Deshpande
Technical Specialist - DU UK Insurance
Mastek Ltd | Cerebrum,2nd Floor, KalyaniNagar, Pune, Maharashtra, INDIA
(M)(0)9823041314 | (T) 91 20 66072000 Extn - 2256 | VOIP: 729 | www.mastek.com<http://www.mastek.com/>
Email:- smita.deshpande(a)mastek.com<mailto:smita.deshpande@mastek.com>
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 years, 10 months
Retrieving timestamps from default Drools Fusion event
by Wan Jing Loh
Hi,
First time posting in the mailing list, so I apologise if I make any silly
mistakes.
I have two classes MachineOnline and MachineOffline, which denote when a
machine is online and offline respectively
public class MachineOnline {
int machineId
}
These are declared in the drl file as events, so Drools Fusion
automatically generates the timestamp for me (I am running in STREAM mode,
so i get real time updates on the machine status)
declare MachineOnline
@role(event)
end
I then have a rule to generate the duration when the machine is online, but
I cannot seem to extract the timestamp that drools automatically inserts. A
thread a few years ago suggested using .startTimestamp, but Drools does not
seem to recognise it as a field. I believe that needs an EventFactHandle,
but I'm not sure how to retrieve that inside the drl file.
rule "Find duration machine is online"
when $message1 : MachineOnline()
$message2: MachineOffline(machineId == $message1.machineId &&
this after $message1) // + more rules to handle edge cases
then
//processing
duration = $message2.startTimestamp - $message1.startTimestamp ?
end
The eventual aim is to allow for a query that allows me to find how long
the machine is online for during a specified time interval, so if there is
a way to do this without needing to retrieve the actual timestamp of each
event, that will be great too. Or would it be better to manually define a
timeStamp field for each event? I've been using the default one as that
together with the pseudo allows for easy unit testing.
Thanks a lot!
Regards
Jing
11 years, 10 months
'from' returns previous instance in stateful session
by ismaximum
Hi
In our rule we have a code like this:
when
$r : ReferenceCode(value == "N") from
referenceCodeService.getReferenceCode("SPLIT_YN")
then
System.out.println("----> " + $r.getValue() + " - " +
referenceCodeService.getReferenceCode("IDD_YN").getValue());
Now the problem is when we fire all rules to activate this one, the print
out is like this:
N - N
N - Y
As you see the first time it's N which is correct but second time I expect
to be Y
The ReferenceCodeService is a mock service in which we defined a Map that
contains all ref codes. Now before first firing rules I set the value of
SPLIT_YN to N and then for second I set it to Y but it seems it's still
returning the previous value.
Any idea?
Thanks
Drools 5.5
--
View this message in context: http://drools.46999.n3.nabble.com/from-returns-previous-instance-in-state...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Package Snapshot question
by IPatel
Hi,
I have read several posts regarding package snapshot and still have few
questions.
The is the goal of our exercise:
Find out a solution for a <specific process> in such a way that we can
deploy any changes made with no or minimal code changes required. We are
investigating drool as POC for this process.
This is what i know about package snapshots:
it allows one to lockdown any changes made to the assests. These changes
will not affect the application. This will help us because when our business
partners are making changes to the rules or updating the exisiting one, prod
application will not be impacted.
ChangeSet.xml file will have to point this snapshot url
These are the questions i have:
I see there are 3 options when dealing with snapshot:
1)create new one: When creating a new one, i believe i will have to make
changes to the changeset.xml file everytime its creation. Can i configure
this file in way that it automatically reads the package(s) created so i
dont have keep on updating it? Under what scenarion this is a good option to
use?
2)modify/replace existing one
If i select this option , the benifit will be that i dont have to change the
xml file. However what happens if there are problems and we have to revert
back to the old package. Does the system save old version of the package
before updating it with a new one?
3) My current POC's xml file points to the LATEST. Is there a benifit in
just using this and not using snapshot? How risky this is? will i be able
to access previous version of the package/rule in case of a disaster.
You input is greatly appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/Package-Snapshot-question-tp4022679.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Planner 5.5.1 Immovable Planning entities
by duggal
I have certain planning entities that are locked and their planning variables
should not change their current values. I am implementing this using the
SelectionFilter that returns false if an entity is NOT to be moved.
However I see that the Construction Heuristic Phase (FFD) does assign a
value to the Planning Variable of that entity.
As per my understanding the construction phase should also leave the
immovable entity alone.
Am I doing something incorrect?
--
View this message in context: http://drools.46999.n3.nabble.com/Planner-5-5-1-Immovable-Planning-entiti...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Fill dependent dropdown lists based on a web decision table
by peach_wyss
Hi
I'm using Drools and Guvnor in our project. We have the following Data Model
(simplified):
- Object C
-> has a List
-> has a List
I need to build an easy to edit web decision table in guvnor. We need the
table to fill a dropdown list (Object B) in dependency of another dropdown
list (Object A), when for example creating a new Object C on a form. The
table should look something like this:
[Object A] [Object B]
Test A1 Test B1
Test B2
Test B3
Test A2 Test B4
Test A3 Test B5
Test B6
Test A4 Test B7
Test B8
Test B9
Test B10
...so when a User creates a new Object C (Create-Form) and select on for
example "Test A3" in a dropdown list (Object A), Drools should be firing and
result "Test B5" and "Test B6", which then can be filled in the second
dropdown list (Object B).
How can I achieve such a scenario? We have already Drools Guvnor in use and
the requirement is, to have such a table to easy edit the dependencies of
this two dropdown lists.
Some thoughts:
- Is there a way to fill Objects in a List as a Action-Column in a web
decision table?
- Is there a way to add Objects to a List (global variable) in a web
decision table?
- Is there a way to achieve this with rule templates?
- Are there other ways to achieve this?
Thanks for your help.
Kind regards,
Peter
--
View this message in context: http://drools.46999.n3.nabble.com/Fill-dependent-dropdown-lists-based-on-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
11 years, 10 months
Can't obtain object from a FactHandle
by Wolfgang Laun
Given a
org.drools.event.rule.BeforeActivationFiredEvent,
method getActivation() returns a
org.drools.runtime.rule.Activation
and its method getFactHandles() is documented to return a List<FactHandle>.
It should be possible to retrieve the fact object using
session.getObject( factHandle ), and this succeeds in many instances,
but not reliably (5.5.0-Final).
Given facts of types One and Two a rule like
One( $list: listOFTwos )
Two(...) from $list
I find that Two facts, when matched via from, are not reported with
the proper fact handle, i.e., the one returned from the insert.
What's the point in reporting fact handles that can't be used to
retrieve a fact object?
If I want to obtain all facts that participate in an activation, is
method Activation.getObjects() more (and fully) reliable?
-W
11 years, 10 months