[JBoss JIRA] (JBRULES-3379) org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
by sundaranarayanan rengasamy (JIRA)
sundaranarayanan rengasamy created JBRULES-3379:
---------------------------------------------------
Summary: org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
Key: JBRULES-3379
URL: https://issues.jboss.org/browse/JBRULES-3379
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.Final
Environment: eclipse
Reporter: sundaranarayanan rengasamy
Assignee: Mark Proctor
Fix For: FUTURE
I am using Decision table for the condition. I want to compare, two properties of two different class. when creating the object types for that classes in a cell I am facing the problem. I am using drools-compiler5.2.0 FINAL jar file.
The problem is:
Description Resource Path Location Type
Unexpected exception raised while parsing. This is a bug. Please contact the Development team :
java.lang.ClassCastException: org.antlr.runtime.CommonToken cannot be cast to org.drools.lang.DroolsToken
[org.drools.lang.ParserHelper.emit(ParserHelper.java:89), org.drools.lang.DRLParser.fact(DRLParser.java:9214), org.drools.lang.DRLParser.fact_binding(DRLParser.java:8872), org.drools.lang.DRLParser.lhs_pattern(DRLParser.java:8713), org.drools.lang.DRLParser.pattern_source(DRLParser.java:7017), org.drools.lang.DRLParser.lhs_unary(DRLParser.java:5846), org.drools.lang.DRLParser.lhs_and(DRLParser.java:5559), org.drools.lang.DRLParser.lhs_or(DRLParser.java:5249), org.drools.lang.DRLParser.lhs(DRLParser.java:5047), org.drools.lang.DRLParser.normal_lhs_block(DRLParser.java:4953), org.drools.lang.DRLParser.when_part(DRLParser.java:3217), org.drools.lang.DRLParser.rule(DRLParser.java:3009), org.drools.lang.DRLParser.statement(DRLParser.java:746), org.drools.lang.DRLParser.compilation_unit(DRLParser.java:340), org.drools.compiler.DrlParser.compile(DrlParser.java:231), org.drools.compiler.DrlParser.parse(DrlParser.java:71), org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(DroolsEclipsePlugin.java:416), org.drools.eclipse.DroolsEclipsePlugin.parseXLSResource(DroolsEclipsePlugin.java:310), org.drools.eclipse.builder.DroolsBuilder.parseXLSFile(DroolsBuilder.java:306), org.drools.eclipse.builder.DroolsBuilder.parseResource(DroolsBuilder.java:206), org.drools.eclipse.builder.DroolsBuilder$DroolsBuildVisitor.visit(DroolsBuilder.java:149), org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:112), org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:64), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86), org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127), org.eclipse.core.internal.resources.Resource.accept(Resource.java:74), org.eclipse.core.internal.resources.Resource.accept(Resource.java:110), org.eclipse.core.internal.resources.Resource.accept(Resource.java:94), org.drools.eclipse.builder.DroolsBuilder.fullBuild(DroolsBuilder.java:133), org.drools.eclipse.builder.DroolsBuilder.build(DroolsBuilder.java:95), org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629), org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203), org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255), org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42), org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258), org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311), org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343), org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144), org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242), org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)] POC.xls /drools poc/src/main/rules Unknown Drools Error
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[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, 2 months
[JBoss JIRA] (JBRULES-3310) drools-camel osgi bundle
by surya aditya (Created) (JIRA)
drools-camel osgi bundle
------------------------
Key: JBRULES-3310
URL: https://issues.jboss.org/browse/JBRULES-3310
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-camel
Affects Versions: 5.3.0.Final
Environment: window, linux
Reporter: surya aditya
Assignee: Mark Proctor
Priority: Minor
Fix For: 5.3.1.Final
drools-camel is not osgi compatible i.e not an osgi bundle yet. can this be enhanced in next releases to be osgi ready? many of the apache camel components fits very well in osgi environment and drools-camel is missing this functionality. it would help if upgraded to osgi bundle like drools-core etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (JBRULES-3388) KnowledgeAgent custom classloader not working for PKG resources
by Herman Post (JIRA)
Herman Post created JBRULES-3388:
------------------------------------
Summary: KnowledgeAgent custom classloader not working for PKG resources
Key: JBRULES-3388
URL: https://issues.jboss.org/browse/JBRULES-3388
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.3.1.Final
Environment: Windows 7, Java7-5, JBoss AS7.1
Reporter: Herman Post
Assignee: Mark Proctor
I believe there may be a bug when trying to use a custom class loader with the KnowledgeAgent and the KnowledgeBuilderConfiguration, and when the ChangeSet is a PKG resource.
I have been trying to get the knowledge-agent-classloader sample from the new Drools Cookbook to work with a PKG resource. The sample works fine for a DRL resource, but when I convert it to use my fact jar, and a PKG resource containing my rules, which I downloaded from Guvnor, it throws a ClassNotFoundException for my fact model. If I put my fact model in the classpath, the error goes away and my rules can be added to the KnowledgeAgent and run correctly. Following is the code from the sample that I have converted, and I have attached a zip file with a complete project demonstrating the problem. Also, I can get my rules and fact model to work if I use a DRL ChangeSet.knowledge-agent-classloader.zip
URL modelJarURL = getClass().getResource("Patient-1.0.jar");
URLClassLoader customURLClassloader = new URLClassLoader(new URL[] {modelJarURL });
KnowledgeBuilderConfiguration kbuilderConfig = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(null,
customURLClassloader);
KnowledgeBaseConfiguration kbaseConfig = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(null, customURLClassloader);
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(kbaseConfig);
KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("test", kbase, aconf, kbuilderConfig);
// kagent.applyChangeSet(new ClassPathResource("change-set.xml", getClass())); // this goes with model.jar
// kagent.applyChangeSet(new ClassPathResource("drl-change-set.xml", getClass())); // this goes with Patient.jar
kagent.applyChangeSet(new ClassPathResource("pkg-change-set.xml", getClass())); // this goes with Patient.jar
return kagent.getKnowledgeBase();
Following is the stack trace from the error:
java.lang.NullPointerException
at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:148)
at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1016)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:785)
at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:657)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:190)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:169)
at drools.cookbook.chapter02.KnowledgeAgentClassloaderTest.createKnowledgeBase(KnowledgeAgentClassloaderTest.java:59)
at drools.cookbook.chapter02.KnowledgeAgentClassloaderTest.customClassloaderTest(KnowledgeAgentClassloaderTest.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I have been having the exact same problem when trying to use a custom class loader with just a KnowldegeBuilder and no KnowledgeAgent.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-3681) JBoss crashes when run with AspectJ java agent
by Jack Lund (JIRA)
Jack Lund created AS7-3681:
------------------------------
Summary: JBoss crashes when run with AspectJ java agent
Key: AS7-3681
URL: https://issues.jboss.org/browse/AS7-3681
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.0.CR1b, 7.0.2.Final
Environment: OS X 10.7.2, Ubuntu 11.10
Reporter: Jack Lund
Assignee: Jason Greene
Priority: Blocker
When trying to start JBoss with the AspectJ java agent (-javaagent:/path/aspectjweaver.jar) to enable load-time weaving, JBoss crashes with the following stack trace in the logs:
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /home/jack/jboss-as-7.1.0.CR1b
JAVA: java
JAVA_OPTS: -server -javaagent:/home/jack/aspectjweaver.jar -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
WARNING: Failed to load the specified logmodule org.jboss.logmanager:main
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.jboss.as.server.Main.main(Main.java:92)
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:616)
at org.jboss.modules.Module.run(Module.java:248)
at org.jboss.modules.Main.main(Main.java:313)
Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
... 7 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months