Two Guvnor instances sharing repository
by Demian Calcaprina
Hi Guys,
I have two guvnor instances. They are using a mysql db repository. I would
like both to point to the same database.
I configured them both to use the same database in the repository.xml, but
it starting throwing errors and they were not in sync.
Errors are like this
11:43:29,597 WARN [com.arjuna.ats.arjuna] (Transaction Reaper)
ARJUNA012117: TransactionReaper::check timeout for TX
0:ffff7f000101:55ee0fc5:527e486a:3f in state RUN
11:43:29,599 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012095: Abort of action id 0:ffff7f000101:55ee0fc5:527e486a:3f
invoked while multiple threads active within it.
11:43:29,601 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012108: CheckedAction::check - atomic action
0:ffff7f000101:55ee0fc5:527e486a:3f aborting with 1 threads active!
11:43:29,602 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0)
ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction
Reaper Worker 0,5,main] successfully canceled TX
0:ffff7f000101:55ee0fc5:527e486a:3f
11:44:37,245 INFO [org.apache.jackrabbit.core.query.lucene.IndexMerger]
(jackrabbit-pool-5) merged 791 documents in 568 ms into _p.
11:44:37,377 INFO [org.apache.jackrabbit.core.query.lucene.IndexMerger]
(jackrabbit-pool-2) merged 1370 documents in 709 ms into _o.
11:48:07,300 WARN [org.jboss.seam.transaction.TransactionServletListener]
(http--127.0.0.1-8080-5) Error starting the transaction:
javax.transaction.NotSupportedException:
BaseTransaction.checkTransactionState - ARJUNA016051: thread is already
associated with a transaction!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:63)
at
com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:65)
at
org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:142)
at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:51)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.jboss.seam.transaction.DefaultSeamTransaction.begin(DefaultSeamTransaction.java:88)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:110)
[seam-transaction-3.1.0.Final.jar:3.1.0.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.13.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.13.Final.jar:]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: java.lang.IllegalStateException:
BaseTransaction.checkTransactionState - ARJUNA016051: thread is already
associated with a transaction!
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.checkTransactionState(BaseTransaction.java:257)
at
com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:59)
... 13 more
I also tried both instances to also share the repository folder, both this
is failing because it lockes the file
Caused by: javax.jcr.RepositoryException: The repository home
/home/calcacuervo/development appears to be in use since the file named
.lock is locked by another process.
at
org.apache.jackrabbit.core.util.RepositoryLock.tryLock(RepositoryLock.java:166)
Any idea on how could I do it?
Thanks!
Demian
12 years, 1 month
Drools in a web application
by forsakendoll
I'm very new to drools. I know this question is really a noob question but
please bear with me. I'm using Spring MVC and I want to integrate drools
expert to my project. What I've done so far is to integrate the hello world
sample of drools expert. But now what I want to do is:
1. Send a bean to the rules for it to evaluate.
2. Modify the bean depending on the rules
3. Send it back to the controller to make a response to the user.
I was able to do the number 1. But for number 2 and 3. I don't know how to
do it. I want to have a nested rule. But now I'm only capable of doing this
rule:
global String $test;
rule "Excellent"
when
$m: FLTBean ( listeningScore > 85 )
$p: FLTBean ( listeningScore < 101 )
then
$test = "Excellent";
System.out.println( $test );
end
I don't know yet how can I make a nested rule. Please give me a simple
example that a newbie like me can understand.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-in-a-web-application-tp4026704.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Where to cache KnowledgeAgent
by darrell.pittman
Hello,
I am new to Drools a starting a new Java EE 6 application that will use
drools. We are not using Guvnor. I am wondering what is the suggested way
of creating the knowledge agent and where to cache it. EJB's shouldn't read
from the file system so I guess a Singleton EJB is out as far as loading the
knowledgebase goes. Should I load knowledgebase in a ServletContextListener
and store it in the ServletContext and pass it into my EJB's? What is the
recommend practice?
--
View this message in context: http://drools.46999.n3.nabble.com/Where-to-cache-KnowledgeAgent-tp4026696...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
How to forsee mid way planning team changes
by ns
Hi,
I am working on a planning tool based on the nurse rostering example. I have
encountered a problem which I do not know how to solve correctly.
Our employees are divided into teams. But sometimes employees switch between
teams, to for example cover the illness or pregnancy of a colleague. Each
team has its own shifts.
So for example Optaplanner may propose a roster for a month. In the middle
of the month the employee changes team. I know this when I start the
planning. But how do I tell Optaplanner that in the middle of the month the
employee changes team and hence has different shifts?
Thanks.
Kind regards,
Nick
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-forsee-mid-way-planning-team-cha...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 1 month
Drools 5,3.1 with MVEL 2.1 Concurrency issue
by adarsh.chaini@hsbcib.com
Hi ,
We have noted another incident in our testing environment where we
have noted that there is a concurrency issue with the drools and mvel
version we are using where the threads are blocked for a long time
resulting the application node/JVM reach an unexpected state which
needed to be restarted.Could some one look into this if there is a known
defect on this and if it has been resolved in a later version?.
Thread[DSLFpmlDataRecordKeepingTradeViewCacheWorker:5,5,DSLFpmlDataRecordKeepingTradeViewCache]
java.util.WeakHashMap.get(WeakHashMap.java:470)
org.mvel2.util.ParseTools.getBestCandidate(ParseTools.java:246)
org.mvel2.util.ParseTools.getBestCandidate(ParseTools.java:224)
org.mvel2.compiler.PropertyVerifier.getMethod(PropertyVerifier.java:509)
org.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:120)
org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:381)
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:273)
org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62)
org.mvel2.MVEL.compileExpression(MVEL.java:810)
org.drools.base.mvel.MVELCompilationUnit.compile(MVELCompilationUnit.java:426)
org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:243)
org.drools.base.dataproviders.MVELDataProvider.compile(MVELDataProvider.java:83)
org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:162)
org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:138)
org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:295)
org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:223)
org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:116)
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
Thread[DSLFpmlDataRecordKeepingCacheWorker:39,5,DSLFpmlDataRecordKeepingCache]
java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:386)
java.util.WeakHashMap.getTable(WeakHashMap.java:417)
java.util.WeakHashMap.get(WeakHashMap.java:464)
org.mvel2.util.ParseTools.getBestCandidate(ParseTools.java:246)
org.mvel2.util.ParseTools.getBestCandidate(ParseTools.java:224)
org.mvel2.compiler.PropertyVerifier.getMethod(PropertyVerifier.java:509)
org.mvel2.compiler.PropertyVerifier.analyze(PropertyVerifier.java:120)
org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:381)
org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:273)
org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62)
org.mvel2.MVEL.compileExpression(MVEL.java:810)
org.drools.base.mvel.MVELCompilationUnit.compile(MVELCompilationUnit.java:426)
org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:243)
org.drools.base.mvel.MVELPredicateExpression.compile(MVELPredicateExpression.java:69)
org.drools.rule.MVELDialectRuntimeData.onBeforeExecute(MVELDialectRuntimeData.java:162)
org.drools.rule.DialectRuntimeRegistry.onBeforeExecute(DialectRuntimeRegistry.java:138)
org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:295)
org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:223)
org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:116)
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1835)
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1794)
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
We have found a similar BUG in the drools defect database
https://issues.jboss.org/i#browse/DROOLS-81 but the scenarios are bit
different.
In our case it has happened when we deserialize the serilized
KnowledgeBaseImpl by multiple threads and it seems that the problem is
due to usage of a java.util.WeakHashMap as a class variable in
org.mvel2.util.ParseTools.getBestCandidate(ParseTools.java:246)
Thanks
&
Regards,
Adarsh
SENIOR LEAD DEVELOPMENT SPECIALIST
SCJP, SCWCD
FINANCE TECHNOLOGY
HSBC BANK PLC HBEU
8 Canada Square,Canary Wharf,
London,E14 5HQ,United Kingdom
------------------------------------------------------
Phone +44 207914720
Mobile 07595530105
Email. adarsh.chaini(a)hsbcib.com
________________________________
From:
Imran Shafiq <ishafiq(a)redhat.com>
To:
Adarsh CHAINI/IBEU/HSBC@HSBC
Date:
17/09/2013 18:55
Subject:
Drools Community Issue.
Hi Ardash,
I've seen details of the recent issue you have experienced with the
community Drools product; I was keen to contact you regarding this.
We have been a strategic and global supplier to HSBC for many years, and
have built our success largely on our ability to provide full enterprise
services and productised versions of community products, that are fit for
enterprise use.
In the case of community Drools, our productised version (JBoss BRMS)
provides a full testing, certification, commercial assurance eco-system,
and 24*7 SLA support service - which would appear to be ideally positioned
to help address issues such as that which you are currently experiencing.
Ardash, given the appetite of HSBC to mitigate the risk associated with
the use of community software alone, I would welcome the opportunity to
have a brief initial conversation with you concerning the above.
Might there be a suitable number for me to reach you in the coming days?
Kind regards
Imran
Imran Shafiq
Strategic & Global Accounts Team
Red Hat UK
Direct: +44 (0) 1252 362766
Mobile: +44 (0) 7506 765 287
ishafiq(a)redhat.com
www.europe.redhat.com
************************************************************
HSBC Bank plc may be solicited in the course of its placement efforts for
a new issue, by investment clients of the firm for whom the Bank as a firm
already provides other services. It may equally decide to allocate to its
own proprietary book or with an associate of HSBC Group. This represents a
potential conflict of interest. HSBC Bank plc has internal arrangements
designed to ensure that the firm would give unbiased and full advice to
the corporate finance client about the valuation and pricing of the
offering as well as internal systems, controls and procedures to identify
and manage conflicts of interest.
HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
Registered in England - Number 14259
Authorised by the Prudential Regulation Authority and regulated by the
Financial Conduct Authority and the Prudential Regulation Authority
************************************************************
-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!
This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and/or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer
which forms part of it. Unless otherwise stated, this transmission
is neither an offer nor the solicitation of an offer to sell or
purchase any investment. Its contents are based on information
obtained from sources believed to be reliable but HSBC makes no
representation and accepts no responsibility or liability as to its
completeness or accuracy.
12 years, 1 month
lock-on-active
by Stephen Masters
Hi folks,
According to the user guide, lock-on-active “inhibits additional activations of all rules with this flag set within the same rule flow or agenda group”.
I was doing a little testing of some rules earlier today, and noticed that lock-on-active seems to change behaviour when applied to rules which don’t have an agenda-group or rules flow-group defined. It also seemed to have a slightly inconsistent effect, although that may just be me not realising what it’s supposed to do.
There doesn’t appear to be any documentation of what the attribute means when a rule is not part of a rule flow or agenda group. So I was wondering whether perhaps there is an expected/official behaviour, which is just not documented. Or is lock-on-active without a rule flow or agenda group an error? In which case is there a reason why it doesn’t cause a compilation error when the knowledge base is built?
Yours curiously...
Steve
12 years, 1 month