[JBoss JIRA] (JBRULES-3432) Error in error message for bad syntax in function
by Wolfgang Laun (JIRA)
Wolfgang Laun created JBRULES-3432:
--------------------------------------
Summary: Error in error message for bad syntax in function
Key: JBRULES-3432
URL: https://issues.jboss.org/browse/JBRULES-3432
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.4.0.Beta2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Priority: Minor
Without dialect "mvel", this DRL function written in MVEL
package mvel;
function Integer englishToInt(String englishNumber){
return ["one":1, "two":2, "three":3, "four":4, "five":5].get(englishNumber.toLowerCase());
}
causes this error message - NOTE THE NAME OF THE FUNCTION!
Error importing : 'mvel.EnglishToInt.englishToInt'
[ function englishToIntenglishToInt (line:12): Syntax error on tokens, Name expected instead
]
--
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, 9 months
[JBoss JIRA] (JBRULES-3433) DRL parser accepts function written in MVEL
by Wolfgang Laun (JIRA)
Wolfgang Laun created JBRULES-3433:
--------------------------------------
Summary: DRL parser accepts function written in MVEL
Key: JBRULES-3433
URL: https://issues.jboss.org/browse/JBRULES-3433
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.4.0.Beta2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
A DRL function using MVEL syntax "compiles" without any error indication when dialect "mvel" is set at package lavel.
import java.util.Map;
dialect "mvel"
function Integer x(String englishNumber){
Map m = ["one":1, "two":2, "three":3, "four":4, "five":5]; # not Java here!
Object obj = m.get(englishNumber.toLowerCase());
return Integer.parseInt(obj.toString());
}
--
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, 9 months
[JBoss JIRA] (AS7-4303) domain/host.xml cannot be parsed when a <variable> is defined under <jvm><environment-variables>
by Michael Voegele (JIRA)
Michael Voegele created AS7-4303:
------------------------------------
Summary: domain/host.xml cannot be parsed when a <variable> is defined under <jvm><environment-variables>
Key: AS7-4303
URL: https://issues.jboss.org/browse/AS7-4303
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.1.Final
Environment: Win
Reporter: Michael Voegele
Assignee: Jason Greene
Executing following dmr operation is successful:
{code:xml}
{
"operation" => "add",
"address" => [
("host" => "master"),
("server-config" => "server-1"),
("jvm" => "default")
]
"java-home" => "C:/eplatform/java/jdk1.7.0",
"heap-size" => "128m",
"max-heap-size" => "256m",
"permgen-size" => "64m",
"max-permgen-size" => "128m",
"stack-size" => "512k",
"environment-variables" => [{"foo" => "bar"}]
}
{code}
and results in following xml:
{code:xml}
<jvm name="default" java-home="C:/eplatform/java/jdk1.7.0">
<heap size="128m" max-size="256m"/>
<permgen size="64m" max-size="128m"/>
<stack size="512k"/>
<environment-variables>
<variable name="foo" value="bar"/>
</environment-variables>
</jvm>
{code}
but the server (domain mode) cannot be (re)started anymore and results in following exception:
{code}
[Host Controller] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[51,21]
[Host Controller] Message: JBAS014789: Unexpected element '{urn:jboss:domain:1.2}variable' encountered
{code}
--
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, 9 months
[JBoss JIRA] (AS7-4304) NullPointerException when trying to remove a system-property which does not exist
by Michael Voegele (JIRA)
Michael Voegele created AS7-4304:
------------------------------------
Summary: NullPointerException when trying to remove a system-property which does not exist
Key: AS7-4304
URL: https://issues.jboss.org/browse/AS7-4304
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.1.Final
Reporter: Michael Voegele
Assignee: Jason Greene
when trying to execute:
{code:xml}
{
"operation" => "remove",
"address" => [
("host" => "master"),
("server-config" => "server-1"),
("system-property" => "foo")
]
}
{code}
the answer is:
{code:xml}
{
"outcome" => "failed",
"failure-description" => {"host-failure-descriptions" => [("master" => "JBAS014749: Operation handler failed: null")]},
"rolled-back" => true
}
{code}
a NullPointerException is thrown during execution:
{code:xml}
[Host Controller] 2012-03-27 15:41:04,870 [management-handler-thread - 30] ERROR org.jboss.as.controller.management-operation executeStep 418 - JBAS014612: Operation ("remove") failed - address: ([
[Host Controller] ("host" => "master"),
[Host Controller] ("server-config" => "server-1"),
[Host Controller] ("system-property" => "foo")
[Host Controller] ]): java.lang.NullPointerException
[Host Controller] at org.jboss.as.controller.operations.common.SystemPropertyRemoveHandler.execute(SystemPropertyRemoveHandler.java:67) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.domain.controller.operations.coordination.DomainFinalResultHandler.execute(DomainFinalResultHandler.java:74) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.executeTwoPhaseOperation(OperationCoordinatorStepHandler.java:225) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.execute(OperationCoordinatorStepHandler.java:118) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.domain.controller.operations.coordination.PrepareStepHandler.execute(PrepareStepHandler.java:85) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
[Host Controller] at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
{code}
this should not happen, the normal behaviour should be as follows (just a 'not found' message with no exception):
{code:xml}
{
"operation" => "remove",
"address" => [
("host" => "master"),
("server-config" => "server-1"),
("jvm" => "default")
]
}
{code}
{code:xml}
{
"outcome" => "failed",
"failure-description" => {"host-failure-descriptions" => [("master" => "JBAS014807: Management resource '[
(\"host\" => \"master\"),
(\"server-config\" => \"server-1\"),
(\"jvm\" => \"default\")
]' not found")]},
"rolled-back" => true
}
{code}
--
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, 9 months
[JBoss JIRA] Created: (JBRULES-1665) put offending rule name in exception messages
by Alex McCarrier (JIRA)
put offending rule name in exception messages
---------------------------------------------
Key: JBRULES-1665
URL: http://jira.jboss.com/jira/browse/JBRULES-1665
Project: JBoss Drools
Issue Type: Feature Request
Components: Drl Parser/Builder
Affects Versions: FUTURE
Environment: all
Reporter: Alex McCarrier
Assigned To: Mark Proctor
Priority: Minor
It would be nice if drools compiler error messages would include the rule that caused the error. For instance, predicate eval errors, or "unable to resolve property" errors would state which rule was being evaluated when it encountered an error. Currently the developer has to go through the rules file looking for lines similar to the one reported in the error. Also, when it's this much work for a developer to find the offending rule, it is pretty much impossible for business users to figure out which rule they messed up.
If it's at all possible to add the rule name to these error messages, please do so. It would make our lives a lot easier. :)
--
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, 9 months
[JBoss JIRA] Created: (JBRULES-680) Support real-time problem modification during solving with utils for the single thread subsystem
by Geoffrey De Smet (JIRA)
Support real-time problem modification during solving with utils for the single thread subsystem
------------------------------------------------------------------------------------------------
Key: JBRULES-680
URL: http://jira.jboss.com/jira/browse/JBRULES-680
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Solver
Reporter: Geoffrey De Smet
Assigned To: Geoffrey De Smet
Rete/Drools is single threaded, and so is the current implementation of the localsearchsolver,
but this single thread subsystem should be documented
and utils should be provided to allow for real-time problem modification
A simple way would be to use a producer-consumer pattern with a non blocking queue which holds "problem moves".
Each step the problem moves could be used.
Problems:
- bestsolutionrecalled also needs it's score adjusted. so we'll need a 2th working memory:
-- EITHER temporary, just for the problem move (or set of problem moves)
-- EITHER all the time, but then we'd have to hold a chain of moves, some of which might not be doable at the end
- cached selectors must be notified of refreshing their cache
- solution cloning normally doesn't clone the problem facts, just the proposed solution references. Do we need a full clone now?
--
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, 9 months
[JBoss JIRA] Created: (JBRULES-2748) Missing drools-flow-compiler dependency in trunk\drools-examples\drools-examples-fusion\pom.xml
by Michael Anstis (JIRA)
Missing drools-flow-compiler dependency in trunk\drools-examples\drools-examples-fusion\pom.xml
-----------------------------------------------------------------------------------------------
Key: JBRULES-2748
URL: https://jira.jboss.org/browse/JBRULES-2748
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL
Environment: All
Reporter: Michael Anstis
Assignee: Mark Proctor
Fix For: FUTURE
java.lang.NullPointerException
at org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.java:432)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:468)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at org.drools.examples.broker.Broker.loadRuleBase(Broker.java:95)
at org.drools.examples.broker.Broker.createSession(Broker.java:80)
at org.drools.examples.broker.Broker.<init>(Broker.java:57)
at org.drools.examples.broker.Main.main(Main.java:53)
When running drools-examples Fusion Broker example.
Patch:-
Index: pom.xml
===================================================================
--- pom.xml (revision 35658)
+++ pom.xml (working copy)
@@ -26,6 +26,10 @@
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-flow-compiler</artifactId>
+ </dependency>
<!-- External dependencies -->
<dependency>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months