[JBoss JIRA] Created: (JBRULES-2040) Drools, Jboss AS, Dynamic Bean Generation
by Shawn Ritchie (JIRA)
Drools, Jboss AS, Dynamic Bean Generation
------------------------------------------
Key: JBRULES-2040
URL: https://jira.jboss.org/jira/browse/JBRULES-2040
Project: JBoss Drools
Issue Type: Task
Security Level: Public (Everyone can see)
Components: All
Affects Versions: 4.0.7
Environment: Jboss Application Server v4.2
Drools 4.0.7
Javassist
JDK1.6
Reporter: Shawn Ritchie
Assignee: Mark Proctor
The issues is this guys i am creating a bean dynamically in this simple example i have an arraylist of strings which will create a private field, and a getXXX and a setXXX method for each of these fields
The problem arises when i try to load the .drl file in the package builder which gives me the follow error (SEE BELOW)
I suspect it has something to do with the class loader or the package structure in the rules?
Any suggestion reading material or help would be greatly usefull
the code i have loaded is a simple application which replicates the error
22:20:59,435 ERROR [STDERR] Unable to create Field Extractor for 'name' of '[ClassObjectType class=com.beancreation.personXYZ]' in rule 'Credit Allowed' : [Rule name=Credit Allowed, agendaGroup=MAIN, salience=0, no-loop=false]
22:20:59,435 ERROR [STDERR] Rule Compilation error : [Rule name=Credit Allowed, agendaGroup=MAIN, salience=0, no-loop=false]
com/beancreation/Rule_Credit_Allowed_0.java (1:0) : The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
com/beancreation/Rule_Credit_Allowed_0.java (1:8) : The package com.beancreation collides with a type
com/beancreation/Rule_Credit_Allowed_0.java (2:34) : The import com.beancreation cannot be resolved
22:20:59,435 INFO [STDOUT] Could not parse knowledge.
22:20:59,435 ERROR [STDERR] java.lang.IllegalArgumentException: Could not parse knowledge.
22:20:59,435 ERROR [STDERR] at com.expertsystem.DroolsExecution.loadRules(DroolsExecution.java:49)
22:20:59,435 ERROR [STDERR] at com.create.TestCase.run(TestCase.java:52)
22:20:59,445 ERROR [STDERR] at org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
22:20:59,445 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
22:20:59,445 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
22:20:59,445 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
22:20:59,445 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
22:20:59,445 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
22:20:59,445 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
22:20:59,445 ERROR [STDERR] java.lang.IllegalArgumentException: Could not parse knowledge.
22:20:59,445 ERROR [STDERR] at com.expertsystem.DroolsExecution.loadRules(DroolsExecution.java:49)
22:20:59,445 ERROR [STDERR] at com.create.TestCase.run(TestCase.java:52)
22:20:59,445 ERROR [STDERR] at org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
22:20:59,445 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
22:20:59,445 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
22:20:59,445 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
22:20:59,445 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
22:20:59,445 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
22:20:59,445 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
22:20:59,445 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
22:20:59,445 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
22:20:59,445 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-1829) Nested From Tag Not Supported in Drools
by Nagarajan Shanmugam (JIRA)
Nested From Tag Not Supported in Drools
---------------------------------------
Key: JBRULES-1829
URL: https://jira.jboss.org/jira/browse/JBRULES-1829
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.0.M2
Environment: Windows XP, Eclipse 3.3.
Reporter: Nagarajan Shanmugam
Assignee: Mark Proctor
HI i have Created one rule file that have two From tag. Using XmlDumper I create Xml rule file. When i try to parse that Xml rule file its throwing Error. And also the parsed Xml files also Wrong.
Exception in thread "main" org.drools.compiler.DroolsParserException: org.xml.sax.SAXParseException: <from> may not be nested
at com.drools.service.ConvertDrlToXml.main(ConvertDrlToXml.java:47)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-1009) Can't execute rules twice with a second classloader
by aaron dixon (JIRA)
Can't execute rules twice with a second classloader
---------------------------------------------------
Key: JBRULES-1009
URL: http://jira.jboss.com/jira/browse/JBRULES-1009
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Reteoo
Affects Versions: 4.0.0.MR3
Reporter: aaron dixon
Assigned To: Mark Proctor
Priority: Minor
Attachments: drools-test.zip
I am trying to sequentially perform two rules executions using two
different classloaders in the same VM. I create completely new state
for each execution, yet I still fail on the second execution (the first execution succeeds). I
believe this has to do with some internal static cached state that
JBossRules is maintaining. An integration test is attached as an archived Eclipse project (zip).
Exception thrown:
Exception in thread "main" java.lang.ClassCastException: test.drools.classloader.FooShadowProxy
at org.drools.base.test.drools.classloader.Foo$getName.getValue(Unknown Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:94)
at org.drools.base.evaluators.StringFactory$StringEqualEvaluator.evaluate(StringFactory.java:85)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:63)
at test.drools.classloader.Driver.testRules(Driver.java:49)
at test.drools.classloader.Driver.go(Driver.java:35)
at test.drools.classloader.Driver.main(Driver.java:19)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-2031) Enhancements to spreadsheet based testing tool
by Michael Neale (JIRA)
Enhancements to spreadsheet based testing tool
----------------------------------------------
Key: JBRULES-2031
URL: https://jira.jboss.org/jira/browse/JBRULES-2031
Project: JBoss Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-testing
Reporter: Michael Neale
Assignee: Michael Neale
Fix For: FUTURE
As mentioned by Ansgar in blog comments: http://blog.athico.com/2009/03/new-testing-tool.html
Hi,
we're using Drools to perform mortgage scoring. For testing, we developed a somewhat similar, but already more sophisticated testing framework. Currently, our test set comprises of roughly 800 test scenarios/test cases.
Similarities:
* also uses spreadsheet tables to define test cases.
* each column resembles a test case
* leftmost column used to name elements of input facts or define expected conditions (see below)
Differences:
* concept of "expected values" not expressed as mere values, but as drools conditions which are expected to hold after rules all under test finished execution. These conditions are automagically converted into a drools query which is run against the working memory after rule execution.
Enhancements:
* conditions support simple text replacement, like a macro preprocessor. Wildcards in drools condition can be replaced by test case-specific text
* allows skipping of certain condition checks on a per-test-case basis
* event logging of the drools working memory embedded into fit output file for failed checks. visibility of log can be toggled using html-embedded javascript. allows for simple copy/paste into "audit view" window in eclipse. This eases debugging rules a lot!
* possibility to define a subset of rules contained in a *.drl file to be tested
Open issues:
* Syntax of initial facts specification is probably a bit cumbersome. We're using a self-brewed language to do this. Already thought of replacing this by MVEL, but not done yet. For us, the current solution works ok.
* Up to now, requires explicit import of all used Java classes. This is rather a limitation of drools - we did not manage to get package imports in *.drl files to work. Could probably be solved.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] Created: (JBRULES-3155) Bug with default properties in KnowledgeStoreServiceImpl
by Pavel Sknar (JIRA)
Bug with default properties in KnowledgeStoreServiceImpl
--------------------------------------------------------
Key: JBRULES-3155
URL: https://issues.jboss.org/browse/JBRULES-3155
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.2.0.Final
Reporter: Pavel Sknar
Assignee: Mark Proctor
Priority: Critical
Method setDefaultImplementations() set default properties in configProps (class KnowledgeStoreServiceImpl). mergeConfig() execute after specific properties loaded to configuration. This overlaps specific properties.
[17:08] <pavlz> hi
[17:09] <pavlz> I have bug for you
[17:09] <Rikkola> :(
[17:10] <pavlz> Problem with KnowledgeStoreServiceImpl
[17:10] <pavlz> in org.drools.persistence.jpa
[17:12] <pavlz> default properties merged first in config (in ChainedProperties: this.props.add( 0, properties ))
[17:14] <pavlz> and this overlaps specific properties
[17:15] <pavlz> drools.commandService, drools.timerService and else
[17:15] <pavlz> I have this bug in 5.2.0.Final
[17:23] <conan> pavlz: do you have a fix?
[17:25] <pavlz> No, I see this now
[17:27] <pavlz> but I think: need to create in ChainedProperties new method "setDefaultProperties"
[17:29] <pavlz> and in SessionConfiguration too, to use this method in KnowledgeStoreServiceImpl.mergeConfig()
[17:30] <pavlz> then default properties loaded later
[17:31] <Rikkola> pavlz: best to make a jira about it
[17:31] <Rikkola> https://issues.jboss.org/browse/JBRULES
[17:31] <pavlz> ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month