Re: [rules-users] rules-users Digest, Vol 80, Issue 34
by pritha.ghosh@wipro.com
I have only one rule employeemaprule
________________________________________
From: rules-users-bounces(a)lists.jboss.org [rules-users-bounces(a)lists.jboss.org] on behalf of rules-users-request(a)lists.jboss.org [rules-users-request(a)lists.jboss.org]
Sent: Wednesday, July 17, 2013 8:13 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 80, Issue 34
Send rules-users mailing list submissions to
rules-users(a)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
You can reach the person managing the list at
rules-users-owner(a)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: help on drools guvnor (rjr201)
2. Re: DRL always posting the format as txt instead of model.drl
(learnbrms)
3. Re: rules-users Digest, Vol 80, Issue 33 - help on drools
guvnor (pritha.ghosh(a)wipro.com)
4. Re: rules-users Digest, Vol 80, Issue 33 - help on drools
guvnor (rjr201)
5. Re: Problems with the Mrs Manners Benchmark (Mark Proctor)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jul 2013 06:28:45 -0700 (PDT)
From: rjr201 <rich.j.riley(a)gmail.com>
Subject: Re: [rules-users] help on drools guvnor
To: rules-users(a)lists.jboss.org
Message-ID: <1374067725846-4024977.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
What are your rules?
--
View this message in context: http://drools.46999.n3.nabble.com/rules-users-help-on-drools-guvnor-tp402...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 2
Date: Wed, 17 Jul 2013 06:32:18 -0700 (PDT)
From: learnbrms <srivats.rayaprolu(a)gmail.com>
Subject: Re: [rules-users] DRL always posting the format as txt
instead of model.drl
To: rules-users(a)lists.jboss.org
Message-ID: <1374067938811-4024978.post(a)n3.nabble.com>
Content-Type: text/plain; charset=us-ascii
Can anyone please advise to my above problem ?
Thanks,
Sri
--
View this message in context: http://drools.46999.n3.nabble.com/DRL-always-posting-the-format-as-txt-in...
Sent from the Drools: User forum mailing list archive at Nabble.com.
------------------------------
Message: 3
Date: Wed, 17 Jul 2013 13:34:10 +0000
From: <pritha.ghosh(a)wipro.com>
Subject: Re: [rules-users] rules-users Digest, Vol 80, Issue 33 - help
on drools guvnor
To: <rules-users(a)lists.jboss.org>
Message-ID:
<6374181C9192E7459C135FEE70E5E16509F1E31F(a)CHN-SNR-MBX-8.wipro.com>
Content-Type: text/plain; charset="us-ascii"
The same code runs fine with
urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
.newUrlResource(new java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSP..."));
And resourse type "DRL"
Please find below the source code of the rule
rule "EmployeeMapRule"
no-loop true
enabled true
dialect "mvel"
when
EmployeeMap : EmployeeMap( employeeID : EmployeeID != null , employeeName : EmployeeName != null , employeeCountry : EmployeeCountry in ( "INDIA", "Australia", "USA" ) )
then
EmployeeMap.setEmployeeName( employeeName+" Success" );
EmployeeMap.setEmployeeCountry( employeeCountry );
EmployeeMap.setEmployeeID( employeeID );
update( EmployeeMap );
end
I have written the rule in guvnor.
Drools version 5.5
Please find below the source code for my model employeemap
declare EmployeeMap
EmployeeName: String
EmployeeCountry: String
EmployeeID: Integer
end
I have attached the pojo class I am using to fire the rule
Thanks,
Pritha
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Wednesday, July 17, 2013 6:50 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 80, Issue 33
Send rules-users mailing list submissions to
rules-users(a)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
You can reach the person managing the list at
rules-users-owner(a)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: help on drools guvnor (Stephen Masters)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jul 2013 14:19:21 +0100
From: Stephen Masters <stephen.masters(a)me.com>
Subject: Re: [rules-users] help on drools guvnor
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <93FD4B72-09E1-4AEB-8ACD-CFC3B4BD36A9(a)me.com>
Content-Type: text/plain; charset="us-ascii"
Have you tested that the rules fire when you load them as DRL?
It would probably be worth showing us what EmployeeMap looks like and the rule which you expect to fire if there is an EmployeeMap in working memory.
The Drools version would also be useful.
Steve
On 17 Jul 2013, at 14:04, pritha.ghosh(a)wipro.com wrote:
> Hi,
>
> I am not able to run rules from .pkg resources.
>
> Knowledgesession is getting populated with package and rules inside the packages but when I am firing ksession.fireAllRules(); no rules are getting executed.
>
> Below is my program
>
> final KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> // Use this line if calling rule defined using guvnor package
> org.drools.io.impl.UrlResource urlResource;
> try {
> urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
> .newUrlResource(new
> java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Gu
> vnor/package/OBSPOC/OBSSNAP/OBSPOC_OBSSNAP.pkg"));
>
>
> urlResource.setBasicAuthentication("enabled");
> urlResource.setUsername("admin");
> urlResource.setPassword("admin");
> kbuilder.add(urlResource,ResourceType.PKG);
> }
> catch (MalformedURLException e) {
> System.out.println("malformed URL");
> e.printStackTrace();
> }
> catch (Exception e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> // create the knowledge base
> KnowledgeBase kbase =
> KnowledgeBaseFactory.newKnowledgeBase();
>
>
>
>
> // Check the builder for errors
> if (kbuilder.hasErrors()) {
> System.out.println(kbuilder.getErrors().toString() + "********");
> throw new RuntimeException("Unable to compile the rule file.");
> }else{
> System.out.println(".....Rule File is Read Successfully....");
> }
>
> // get the compiled packages (which are serializable)
> final Collection pkgs = kbuilder
> .getKnowledgePackages();
>
> // add the packages to a knowledgebase (deploy the knowledge packages).
> // final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages(pkgs);
>
>
> final StatefulKnowledgeSession ksession = kbase
>
> .newStatefulKnowledgeSession();
>
> ksession.addEventListener(new DebugAgendaEventListener());
> ksession.addEventListener(new
> DebugWorkingMemoryEventListener());
>
> EmployeeMap employeeMap = new EmployeeMap();
> employeeMap.setEmployeeCountry("INDIA");
> employeeMap.setEmployeeID(1);
> employeeMap.setEmployeeName("USERP");
>
> ksession.insert(employeeMap);
> ksession.fireAllRules();
>
>
> ksession.dispose();
>
>
> Thanks,
> Pritha
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
12 years, 5 months
Problems with the Mrs Manners Benchmark
by Sven Böcherer
Hello,
I am writing my dissertation on BRMS. I want to analyze the performance of
different systems. Drools is one of them.
I installed Drools 6 and wanted to start the Mrs Manners Benchmark for a
first analysis.
Unfortunately if I chose anything else but 5 guests, I get an infinite loop
where the program is never able to find the seating arrangement.
Attached you find a screenshot of what the console looks like.
I really hope you can help me with this problem.
Best regards,
Sven Böcherer
Sven Böcherer
Bachelorthesis
EXXETA AG
Albert-Nestler-Str. 11
76131 Karlsruhe
fon +49 721 6105-1500
fax +49 721 6105-1599
mail <mailto:Sven.Boecherer@EXXETA.com> Sven.Boecherer(a)EXXETA.com
web <http://www.exxeta.de/> www.EXXETA.com
Sitz der Gesellschaft:
EXXETA AG
Albert-Nestler-Str. 11, 76131 Karlsruhe
Vorstände: Achim Kirchgässner, Andreas Ritter
Aufsichtsratsvorsitzender: Ulrich A. Götz
Ust-IdNr. DE813026499
Eingetragen beim Amtsgericht Mannheim HRB 702566
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind,
informieren Sie bitte sofort den Absender und loeschen Sie diese E-Mail.
Das unbefugte Kopieren dieser E-Mail oder die unbefugte Weitergabe der
enthaltenen Informationen ist nicht gestattet.
The information contained in this message is confidential or protected by
law.
If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorized copying of this message or
unauthorized distribution of the information contained herein is prohibited.
12 years, 5 months
Re: [rules-users] rules-users Digest, Vol 80, Issue 33 - help on drools guvnor
by pritha.ghosh@wipro.com
The same code runs fine with
urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
.newUrlResource(new java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSP..."));
And resourse type "DRL"
Please find below the source code of the rule
rule "EmployeeMapRule"
no-loop true
enabled true
dialect "mvel"
when
EmployeeMap : EmployeeMap( employeeID : EmployeeID != null , employeeName : EmployeeName != null , employeeCountry : EmployeeCountry in ( "INDIA", "Australia", "USA" ) )
then
EmployeeMap.setEmployeeName( employeeName+" Success" );
EmployeeMap.setEmployeeCountry( employeeCountry );
EmployeeMap.setEmployeeID( employeeID );
update( EmployeeMap );
end
I have written the rule in guvnor.
Drools version 5.5
Please find below the source code for my model employeemap
declare EmployeeMap
EmployeeName: String
EmployeeCountry: String
EmployeeID: Integer
end
I have attached the pojo class I am using to fire the rule
Thanks,
Pritha
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of rules-users-request(a)lists.jboss.org
Sent: Wednesday, July 17, 2013 6:50 PM
To: rules-users(a)lists.jboss.org
Subject: rules-users Digest, Vol 80, Issue 33
Send rules-users mailing list submissions to
rules-users(a)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
You can reach the person managing the list at
rules-users-owner(a)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: help on drools guvnor (Stephen Masters)
----------------------------------------------------------------------
Message: 1
Date: Wed, 17 Jul 2013 14:19:21 +0100
From: Stephen Masters <stephen.masters(a)me.com>
Subject: Re: [rules-users] help on drools guvnor
To: Rules Users List <rules-users(a)lists.jboss.org>
Message-ID: <93FD4B72-09E1-4AEB-8ACD-CFC3B4BD36A9(a)me.com>
Content-Type: text/plain; charset="us-ascii"
Have you tested that the rules fire when you load them as DRL?
It would probably be worth showing us what EmployeeMap looks like and the rule which you expect to fire if there is an EmployeeMap in working memory.
The Drools version would also be useful.
Steve
On 17 Jul 2013, at 14:04, pritha.ghosh(a)wipro.com wrote:
> Hi,
>
> I am not able to run rules from .pkg resources.
>
> Knowledgesession is getting populated with package and rules inside the packages but when I am firing ksession.fireAllRules(); no rules are getting executed.
>
> Below is my program
>
> final KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
>
> // Use this line if calling rule defined using guvnor package
> org.drools.io.impl.UrlResource urlResource;
> try {
> urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
> .newUrlResource(new
> java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Gu
> vnor/package/OBSPOC/OBSSNAP/OBSPOC_OBSSNAP.pkg"));
>
>
> urlResource.setBasicAuthentication("enabled");
> urlResource.setUsername("admin");
> urlResource.setPassword("admin");
> kbuilder.add(urlResource,ResourceType.PKG);
> }
> catch (MalformedURLException e) {
> System.out.println("malformed URL");
> e.printStackTrace();
> }
> catch (Exception e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> // create the knowledge base
> KnowledgeBase kbase =
> KnowledgeBaseFactory.newKnowledgeBase();
>
>
>
>
> // Check the builder for errors
> if (kbuilder.hasErrors()) {
> System.out.println(kbuilder.getErrors().toString() + "********");
> throw new RuntimeException("Unable to compile the rule file.");
> }else{
> System.out.println(".....Rule File is Read Successfully....");
> }
>
> // get the compiled packages (which are serializable)
> final Collection pkgs = kbuilder
> .getKnowledgePackages();
>
> // add the packages to a knowledgebase (deploy the knowledge packages).
> // final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages(pkgs);
>
>
> final StatefulKnowledgeSession ksession = kbase
>
> .newStatefulKnowledgeSession();
>
> ksession.addEventListener(new DebugAgendaEventListener());
> ksession.addEventListener(new
> DebugWorkingMemoryEventListener());
>
> EmployeeMap employeeMap = new EmployeeMap();
> employeeMap.setEmployeeCountry("INDIA");
> employeeMap.setEmployeeID(1);
> employeeMap.setEmployeeName("USERP");
>
> ksession.insert(employeeMap);
> ksession.fireAllRules();
>
>
> ksession.dispose();
>
>
> Thanks,
> Pritha
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
>
> www.wipro.com
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)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/20130717/6d327e7...
------------------------------
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
End of rules-users Digest, Vol 80, Issue 33
*******************************************
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
12 years, 5 months
help on drools guvnor
by pritha.ghosh@wipro.com
Hi,
I am not able to run rules from .pkg resources.
Knowledgesession is getting populated with package and rules inside the packages but when I am firing ksession.fireAllRules(); no rules are getting executed.
Below is my program
final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
// Use this line if calling rule defined using guvnor package
org.drools.io.impl.UrlResource urlResource;
try {
urlResource = (org.drools.io.impl.UrlResource) org.drools.io.ResourceFactory
.newUrlResource(new java.net.URL("http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/OBSP..."));
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("admin");
urlResource.setPassword("admin");
kbuilder.add(urlResource,ResourceType.PKG);
}
catch (MalformedURLException e) {
System.out.println("malformed URL");
e.printStackTrace();
}
catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// create the knowledge base
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
// Check the builder for errors
if (kbuilder.hasErrors()) {
System.out.println(kbuilder.getErrors().toString() + "********");
throw new RuntimeException("Unable to compile the rule file.");
}else{
System.out.println(".....Rule File is Read Successfully....");
}
// get the compiled packages (which are serializable)
final Collection pkgs = kbuilder
.getKnowledgePackages();
// add the packages to a knowledgebase (deploy the knowledge packages).
// final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(pkgs);
final StatefulKnowledgeSession ksession = kbase
.newStatefulKnowledgeSession();
ksession.addEventListener(new DebugAgendaEventListener());
ksession.addEventListener(new DebugWorkingMemoryEventListener());
EmployeeMap employeeMap = new EmployeeMap();
employeeMap.setEmployeeCountry("INDIA");
employeeMap.setEmployeeID(1);
employeeMap.setEmployeeName("USERP");
ksession.insert(employeeMap);
ksession.fireAllRules();
ksession.dispose();
Thanks,
Pritha
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
12 years, 5 months
Deploying Guvnor 5.5.1 in JBoss 7.1.1.Final
by rjr201
Hi,
I've just checked out and successfully compiled:
https://github.com/droolsjbpm/guvnor/tree/5.5.x
I've tried to deploy this in jboss-as-7.1.1.Final but got the following
error:
16:48:14,132 ERROR [org.apache.catalina.core.StandardContext] (MSC service
thread 1-4) Context [/guvnor-webapp-drools-5.5.1-SNAPSHOT] startup failed
due to previous errors: java.lang.IllegalArgumentException: Duplicate
context initialization parameter resteasy.injector.factory
at
org.apache.catalina.core.StandardContext.addParameter(StandardContext.java:2186)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.JBossContextConfig.processWebMetaData(JBossContextConfig.java:261)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.jboss.as.web.deployment.JBossContextConfig.applicationWebConfig(JBossContextConfig.java:169)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:417)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:182)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.JBossContextConfig.lifecycleEvent(JBossContextConfig.java:162)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3790)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
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:1145)
[rt.jar:1.7.0_13]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
16:48:14,142 ERROR [org.apache.catalina.core.StandardContext] (MSC service
thread 1-4) Context [/guvnor-webapp-drools-5.5.1-SNAPSHOT] startup failed
due to previous errors
16:48:14,149 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4)
MSC00001: Failed to start service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
JBAS018040: Failed to start context
at
org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:95)
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:1145)
[rt.jar:1.7.0_13]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
16:48:14,157 INFO [org.jboss.as] (MSC service thread 1-4) JBAS015951: Admin
console listening on http://127.0.0.1:9990
16:48:14,158 ERROR [org.jboss.as] (MSC service thread 1-4) JBAS015875: JBoss
AS 7.1.1.Final "Brontes" started (with errors) in 13913ms - Started 295 of
374 services (2 services failed or missing dependencies, 76 services are
passive or on-demand)
16:48:14,358 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2)
JBAS015870: Deploy of deployment "guvnor-webapp-drools-5.5.1-SNAPSHOT.war"
was rolled back with failure message {"JBAS014671: Failed services" =>
{"jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\""
=> "org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\":
JBAS018040: Failed to start context"}}
16:48:14,384 INFO [org.jboss.weld.deployer] (MSC service thread 1-3)
JBAS016009: Stopping weld service for deployment
guvnor-webapp-drools-5.5.1-SNAPSHOT.war
16:48:17,110 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1)
JBAS015877: Stopped deployment guvnor-webapp-drools-5.5.1-SNAPSHOT.war in
2745ms
16:48:17,111 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2)
JBAS014774: Service status report
JBAS014777: Services which failed to start: service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host."/guvnor-webapp-drools-5.5.1-SNAPSHOT":
JBAS018040: Failed to start context
16:48:17,113 ERROR [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and
was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671:
Failed services" =>
{"jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\""
=> "org.jboss.msc.service.StartException in service
jboss.web.deployment.default-host.\"/guvnor-webapp-drools-5.5.1-SNAPSHOT\":
JBAS018040: Failed to start context"}}}}
Am I doing something wrong? Or has anyone else come across this error?
Any help with this would be gratefully appreciated.
Thanks,
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/Deploying-Guvnor-5-5-1-in-JBoss-7-1-1-F...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
Getting infinite loops even with limitation of fires
by Bojan Janisch
Hello everyone,
Recently I'm using Drools in a multithreaded environment. But after a while I see that Drools is running for endless time even though I gave him with fireAllRules(1000) a limitation to fire only 1000 rules. The occurrence is rule-independent, I've checked multiple times and each time it's another rule which works well if I run it separately.
Could someone check the code of this stack trace? That's a thread dump of my last run.
"ECJ Evaluation Thread 9" daemon prio=10 tid=0x00002b08a4fd9000 nid=0x2f90 runnable [0x00002b08a9a82000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.getEntry(HashMap.java:347)
at java.util.HashMap.containsKey(HashMap.java:335)
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:244)
at org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237)
at org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at defaultpkg.Rule_308_7dd58592a49c4dd1a6fd98dc64c74466DefaultConsequenceInvokerGenerated.evaluate(Unknown Source)
at defaultpkg.Rule_308_7dd58592a49c4dd1a6fd98dc64c74466DefaultConsequenceInvoker.evaluate(Unknown Source)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
- locked <0x000000020865c080> (a org.drools.common.DefaultAgenda)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:679)
at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:234)
at rulevolution.RulEvolution.runDrools(RulEvolution.java:348)
at rulevolution.RulEvolution.evaluate(RulEvolution.java:183)
at ec.simple.SimpleEvaluator.evalPopChunk(SimpleEvaluator.java:259)
at ec.simple.SimpleEvaluator$SimpleEvaluatorThreadCG.run(SimpleEvaluator.java:341)
at ec.util.ThreadPool$PoolThread.run(ThreadPool.java:57)
Locked ownable synchronizers:
- None
Also here the rule and code snipped I'm using to prove that the infinite loop does not come from my code:
//kSession is a StatefulKnowledgeSession
try {
//Limiting the Activation will prevent infinite loops
kSession.fireAllRules(1000);
} catch (Exception e) {
System.out.println("error while processing :: " + e.toString());
System.out.println(rule);
} finally {
kSession.dispose();
}
-------------------------------------------------------------------
rule "308"
no-loop
when
$0:NormalizedNamedEntity(
ct_0:CoveredText,
cp_0:Concept,
label_0:getConcept().getPrefLabel().value,
getConcept().identifierSource.toLowerCase.contains("ops"))
$1:NormalizedNamedEntity(
ct_1:CoveredText,
cp_1:Concept,
label_1:getConcept().getPrefLabel().value,
getConcept().identifierSource.toLowerCase.contains("bodyside"))
then
int start = getStart($0,$1);
int ende = getStop($0,$1);
String attribute = label_0+" "+label_1;
insert(annotate(aJCas, "Operation", 309, attribute, start, ende, "", attribute));
end
I appreciate any help to solve this occurrence.
Greetings
Bojan
12 years, 5 months
Replacing an old function in drl
by Sonata
Hi, I want to replace an outdated function defined in a drl file without
touching that file, is this possible? (in 5.5.0)
The java application part that loads the resources cannot be touched as
well. It is configured to read all the drl files from a predefined folder, I
am only allowed to add-in new drl files.
Here are what I have tried:
1. Create a new drl file with the new function with same package name and
same function name
This works *only* if the new file is loaded after the old file.
As I cannot change how the java application loads the resources, I cannot
guarantee the new file is always loaded after the old one, so I tried the
next method.
2. Create a new drl file with the new function with same function name. Add
a rule with high salience and call
drools.getKnowledgeRuntime().getKnowledgeBase().removeFunction("old_package",
"oldFunc");
Function newFunc =
((org.drools.impl.KnowledgeBaseImpl)drools.getKnowledgeRuntime().getKnowledgeBase()).getRuleBase().getPackage("new_package").getFunctions().get("oldFunc");
// a new implementation with the same name
((org.drools.impl.KnowledgeBaseImpl)drools.getKnowledgeRuntime().getKnowledgeBase()).getRuleBase().getPackage("old_package").addFunction(newFunc);
But this didn't work. When the rules are fired, it complains about the
old_package cannot find the function anymore.
Could anyone from the Drools team provide some help on this?
Thanks a lot!
--
View this message in context: http://drools.46999.n3.nabble.com/Replacing-an-old-function-in-drl-tp4024...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months
VRP with ExamTimeTabling
by saindofora30
Hi
It is possible to use the example of VRP with the example Exam Timetabling??
Explaining better:
I would like the services that were not performed today could be relocated
on another day. That is, the services could be designated in several days
respecting the deadline.
I would like a guide if it is possible to do this and what would be the best
way to implement this idea.
Thank you.
--
View this message in context: http://drools.46999.n3.nabble.com/VRP-with-ExamTimeTabling-tp4024876.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 5 months