Re: [rules-users] Drools 6 support for changeset
please cut and paste code example -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027295.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools WB does not generate correct kmodule.xml
I’m defining in Drools WB several Knowledge Bases and Sessions therein. After that the project is saved, built and deployed. There are no exceptions. However, the kmodule.xml in the jar does not contain the knowledge bases and session created. It contains the default knowledge base and session (it is always 674 bytes long). Any clue what is going wrong? Can I debug somehow what is the problem? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools WB does not generate correct kmodule.xml
It was a bug that has been fixed. It is available in github sources and will be in the forthcoming release. You can work around it by changing anything in the pom (e.g. name, description) and saving. Sent on the move On 14 Dec 2013 08:47, marjan.sterjev sterj...@mt.net.mk wrote: I’m defining in Drools WB several Knowledge Bases and Sessions therein. After that the project is saved, built and deployed. There are no exceptions. However, the kmodule.xml in the jar does not contain the knowledge bases and session created. It contains the default knowledge base and session (it is always 674 bytes long). Any clue what is going wrong? Can I debug somehow what is the problem? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration
I had a similar problem once related to having two sets of drools dependencies in the classpath. Have you tried removing the org.apache.servicemix.bundles.drools dependency from your pom file? if this is a servicemix Service and you can't remove that from the actual runtim e, you might try a PARENT_LAST class loader configuration -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293p4027298.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools WB does not generate correct kmodule.xml
daily snapshot builds are here for you to test: http://downloads.jboss.org/drools/release/snapshot/6.0.x/ Mark On 14 Dec 2013, at 08:52, Michael Anstis michael.ans...@gmail.com wrote: It was a bug that has been fixed. It is available in github sources and will be in the forthcoming release. You can work around it by changing anything in the pom (e.g. name, description) and saving. Sent on the move On 14 Dec 2013 08:47, marjan.sterjev sterj...@mt.net.mk wrote: I’m defining in Drools WB several Knowledge Bases and Sessions therein. After that the project is saved, built and deployed. There are no exceptions. However, the kmodule.xml in the jar does not contain the knowledge bases and session created. It contains the default knowledge base and session (it is always 674 bytes long). Any clue what is going wrong? Can I debug somehow what is the problem? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration
If I take that dependency out I get java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.builder.KnowledgeBuilderFactoryService' at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166) at org.drools.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130) at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124) at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:85) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.readKnowledgeBase(EnterpriseDroolsService.java:66) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.getDroolsDTO(EnterpriseDroolsService.java:38) at com.cambiahealth.enterprise.service.delegate.EnterpriseDroolsDelegate.compareNumbers(EnterpriseDroolsDelegate.java:22) at com.cambiahealth.enterprise.service.endpoint.DroolsEndPoint.compareNumbers(DroolsEndPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:910) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:858) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:812) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.cambiahealth.enterprise.service.common.filter.LoggerFilter.doFilter(LoggerFilter.java:32) 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:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.IllegalArgumentException: Unable to instantiate 'org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl' at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:217) at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:209) at
Re: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue
As far as I know, older versions of Drools were not guaranteed to be thread-safe, and the whole (de)serialization subsystem has been upgraded since 5.3.0.Final. Could you try a later version such as 5.5.0.Final or 5.6.0.CR1? Bugs and issues are usually reported using JIRA (community) or Bugzilla (product) You can find more information on how to report/contribute here: http://www.jboss.org/contribute or in the drools documentation, chapter 1.2 Davide On 12/13/2013 12:39 PM, adarsh.cha...@hsbcib.com wrote: Hi, We have found that some of the drools classes are not thread safe and hence causing the whole KB serialisation and deserialisation issues in a highly concurrent distributed cluster. The below is an example of one of the instances we have come across where the usage of a non thread safe collection as instance variables has caused the issue. Could someone look into this and advise: 1) If this has been reported /identified and logged somewhere as an issue already 2)If there has been any fix to problems like this in later versions of * 5.3.0.Final ?.* 3)If not fixed already what is the process to initiate a fix. Caused by: java.io.InvalidObjectException: Illegal mappings count: -1 *at java.util.HashMap.readObject(**_HashMap.java:1130_**)* at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_) at java.lang.reflect.Method.invoke(_Method.java:601_) at java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_) at java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1796_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) *at org.jbpm.workflow.core.DroolsAction.readExternal(**_DroolsAction.java:61_**)* at org.jbpm.workflow.core.impl.DroolsConsequenceAction.readExternal(_DroolsConsequenceAction.java:49_) at java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) at org.drools.rule.JavaDialectRuntimeData.readExternal(_JavaDialectRuntimeData.java:182_) at java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) at java.util.HashMap.readObject(_HashMap.java:1155_) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_) at java.lang.reflect.Method.invoke(_Method.java:601_) at java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_) at java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1796_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) at org.drools.rule.DialectRuntimeRegistry.readExternal(_DialectRuntimeRegistry.java:59_) at java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) at org.drools.rule.Package.readExternal(_Package.java:197_) at java.io.ObjectInputStream.readExternalData(_ObjectInputStream.java:1835_) at java.io.ObjectInputStream.readOrdinaryObject(_ObjectInputStream.java:1794_) at java.io.ObjectInputStream.readObject0(_ObjectInputStream.java:1348_) at java.io.ObjectInputStream.readObject(_ObjectInputStream.java:370_) at java.util.HashMap.readObject(_HashMap.java:1155_) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:43_) at java.lang.reflect.Method.invoke(_Method.java:601_) at java.io.ObjectStreamClass.invokeReadObject(_ObjectStreamClass.java:1004_) at java.io.ObjectInputStream.readSerialData(_ObjectInputStream.java:1891_)
Re: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration
The class org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl is in drools-compiler. It is very likely that there is still some configuration issue.. even if you removed the explicit dependencies, are the servicemix jars still on the classpath? Moreover, using servicemix-drools 5.1.1 seems to suggest that it would include/reference drools 5.1... Can you try servicemix-drools 5.5.0? http://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools/5.5.0.Final_2 afaik, this integration piece is not maintained by the drools community directly Davide On 12/14/2013 08:14 AM, anjana.ackroyd wrote: If I take that dependency out I get java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.builder.KnowledgeBuilderFactoryService' at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166) at org.drools.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130) at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124) at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:85) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.readKnowledgeBase(EnterpriseDroolsService.java:66) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.getDroolsDTO(EnterpriseDroolsService.java:38) at com.cambiahealth.enterprise.service.delegate.EnterpriseDroolsDelegate.compareNumbers(EnterpriseDroolsDelegate.java:22) at com.cambiahealth.enterprise.service.endpoint.DroolsEndPoint.compareNumbers(DroolsEndPoint.java:45) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:910) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:858) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:812) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.cambiahealth.enterprise.service.common.filter.LoggerFilter.doFilter(LoggerFilter.java:32) 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:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
Re: [rules-users] permgen leak
Thanks, I have reproduced the issue using the provided test case. Indeed there are two relatively independent ways to hit the permgen : jitted constraints and rule consequences (when the java dialect is used). In the test, with the default values a permgen of ~300MB is needed to accomodate the 15000 rules and their constraints. The problem is that, for each oneIteration, a brand new Knowledge Base is rebuilt from scratch, requiring additional ~300MB of permgen. I guess that this is done to simulate the multiple deployments.. disposing the session, obviously, does not dispose the knowledge base - there might be other sessions - and at the moment there is no way to dispose a KB: the classes generated for that KB are referenced indirectly by the main classloader (through drools 5.x's composite classloader), which is shared between the KBs. I'll make some experiments and see what can be done about it. Of course, if one can avoid multiple KBs and just work with one KB and multiple sessions, the problem is less likely to arise. Davide On 12/05/2013 08:58 AM, brachi wrote: yes because of permgen leak, see previous page... I must use mvel because only if I use it I don't have permgen. drools version: 5.4.0.Final also on 5.5.0.Final -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027115.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users