Re: [rules-users] Drools 6 MBeans not getting listed in Oracle JConsole
by Rupesh M G
Hi Edson,
Thanks for the reply. I'm attaching two maven projects from the drools 6 samples.
The named-kiesession project should be first installed to maven.
The kiecontainer-from-kierepo project will fetch the module from the local maven repository.
The class KieContainerFromKieRepoExample loops inserting facts to the working memory, at an interval of 3 seconds.
My expectation is to see the org.drools hierarchy in the MBeans tab of JConsole.
The JVM arguments are as follows. JConsole was started locally.
-Ddrools.mbeans=enabled -Dcom.sun.management.jmxremote.port=19988 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
Regards,
Rupesh
DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."
10 years, 11 months
drools.package ResourceType?
by rjr201
Hi,
I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL
code and adding it to the KnowledgeBuilder. I'm also loading the object
model jar using a class loader. This works fine if all the classes the rule
is using are at the root of the object model jar.
My question is, can I add the class imports (what the package.drools file
does in guvnor) programmatically using KnowledgeBuilder, so my object model
doesn't have to be flat? I was hoping there would be a ResourceType for
drools.package, so I could do something like kbuilder.add("import
package.classname", ResourceType.?), but can't seem to find one.
Hopefully that makes some kind of sense to someone..
Any help on this would be greatly appreciated.
Rich.
--
View this message in context: http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Exception when executing drools-wb-jcr2vfs-migration
by nelson.wan
We defined a lot of rules using Drools 5.5.0.
Since Drools 6 has been released, we used "drools-wb-jcr2vfs-migration"
script to migrate the repository from 5.5.0 to 6.
The script generated exception during execution.
It said modules migrated. But when migrating categories, it fails.
Hope to seek advice. Below is the output with errors:
D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin>runMigration.bat
Migration started. Reading from inputJcrRepository
({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\inputJcr}).
Module migration started
=============== session-guest-4
Module [ForrestGumpSample] migrated.
Module [com.austin.callmethod] migrated.
Module [com.austin.complex] migrated.
Module [com.austin.scorecard] migrated.
Module [com.austin.test] migrated.
Module [com.austin.testRep] migrated.
Module [com.austin.workitem] migrated.
Module [com.boc.demo] migrated.
Module [com.boc.riskmgmt.drools.florence] migrated.
Module [com.boc.riskmgmt.drools.florence2] migrated.
Module [com.boc.riskmgmt.nelson] migrated.
Module [com.declarative.test] migrated.
Module [com.demo.strata] migrated.
Module [com.philip] migrated.
Module [defaultPackage] migrated.
=============== session-guest-4
Global migrated.
Module migration ended
Category migration started
=============== session-guest-4
=============== session-guest-4
=============== session-guest-4
=============== session-guest-4
=============== session-guest-4
org.drools.repository.RulesRepositoryException: Unable to load the category
: [M_Model] does not exist.
at
org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1098)
at
org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.loadCategory(RulesRepository$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryCategoryOperations.loadChildCategories(RepositoryCategoryOperations.java:64)
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.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
at
org.drools.guvnor.server.RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryCategoryService.loadChildCategories(RepositoryCategoryService.java:54)
at
org.drools.guvnor.server.RepositoryCategoryService$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryService$Proxy$_$$_WeldClientProxy.java)
at
org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:42)
at
org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49)
at
org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49)
at
org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.migrateAll(CategoryMigrater.java:34)
at
org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater$Proxy$_$$_WeldClientProxy.migrateAll(CategoryMigrater$Proxy$_$$_WeldClientProxy.java)
at
org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater.migrateAll(Jcr2VfsMigrater.java:90)
at
org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.migrateAll(Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.java)
at
org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.migrate(Jcr2VfsMigrationApp.java:64)
at
org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.run(Jcr2VfsMigrationApp.java:52)
at
org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.main(Jcr2VfsMigrationApp.java:37)
Caused by: javax.jcr.PathNotFoundException: M_Model
at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135)
at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2129)
at
org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2129)
at
org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1088)
... 21 more
Migration ended with errors. Written into outputVfsRepository
({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\outputVfs}).
--
View this message in context: http://drools.46999.n3.nabble.com/Exception-when-executing-drools-wb-jcr2...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Drools 6 : unable to login to kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0
by anij
I download the *kie-drools-wb-distribution-6.0.0.Final.zip* and deployed the
*kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0.war* in
*jboss-as-7.1.1.Final* in standalone mode. Now, when I'm tring to login
using default username : admin password: admin. It's saying Login failed:
Invalid UserName or Password
Log is showing this error message.
17:38:30,683 ERROR
[org.jboss.security.authentication.JBossCachedAuthenticationManager]
(http--127.0.0.1-8080-1) Login failure:
javax.security.auth.login.FailedLoginException: Password Incorrect/Password
Required
at
org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270)
[picketbox-4.0.7.Final.jar:4.0.7.Final]
at
org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155)
[picketbox-4.0.7.Final.jar:4.0.7.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.7.0_21]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_21]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_21]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
[rt.jar:1.7.0_21]
at
javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
[rt.jar:1.7.0_21]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
[rt.jar:1.7.0_21]
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
[rt.jar:1.7.0_21]
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.7.0_21]
at
javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
[rt.jar:1.7.0_21]
at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
[rt.jar:1.7.0_21]
at
org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449)
[picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
at
org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383)
[picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
at
org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371)
[picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
at
org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160)
[picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final]
at
org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280)
[jbossweb-7.0.13.Final.jar:]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:381)
[jbossweb-7.0.13.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
[jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[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]
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-6-unable-to-login-to-kie-drools-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Refence manual
by Wolfgang Laun
Reading drools-distribution-6.0.0.Final/reference_manual/html_single/index.html,
section 4.2.5., Build, Deploy and Utilize Examples, I get the
improssion that you have to use the incantation
mvn install
in *any* case as it occurs with each and every example. Surely that
can't be right...?
-W
10 years, 11 months
how to use dynamic drl file in drools 6
by merry0900
drools 6 has a great advance from drools5.
I am a begginer of both drools 5 and drools6.
My question is that I don't know how to impliment dynamic drl which means
my drl(rule) file may change during the running of my app since in drools 6
target a drl file like this:
<?xml version="1.0" encoding="UTF-8"?>
<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://jboss.org/kie/6.0.0/kmodule">
<kbase name="HelloWorldKB" packages="org.drools.examples.helloworld">
<ksession name="HelloWorldKS"/>
</kbase>
....................
this file is located in src/main/resources/META-INF/kmodule.xml.
And then the drl file will be packaged in the jar file.
when i want to change my drl file, how can i do. note:i don't want to
rebuild my java source to jar.
for any help? thank you all, from china.
--
View this message in context: http://drools.46999.n3.nabble.com/how-to-use-dynamic-drl-file-in-drools-6...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 11 months
Drools 6 MBeans not getting listed in Oracle JConsole
by Rupesh M G
Hi,
JConsole (of Oracle JDK 1.7) is not listing the drools expert 6 mbeans.
I tried the following Drools 6 sample KieContainerFromKieRepoExample.
I set the JVM option -Ddrools.mbeans=enabled, but JConsole did not list the mbeans.
When I tried the same in a Drools 5.5 sample, the mbeans were listed in JConsole.
Is it a bug in Drools expert 6? Or did I miss any required step for 6? Please help.
public void go(PrintStream out) {
KieServices ks = KieServices.Factory.get();
// Install example1 in the local maven repo before to do this
KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.drools", "named-kiesession", "6.0.0-SNAPSHOT"));
KieSession kSession = kContainer.newKieSession("ksession1");
kSession.setGlobal("out", out);
Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do you read me, HAL?");
kSession.insert(msg1);
kSession.fireAllRules();
}
Thanks & Regards,
Rupesh
DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect."
10 years, 11 months