[JBoss JIRA] (WFCORE-4582) Cannot create user with underscores in the name
by Darran Lofthouse (Jira)
[ https://issues.jboss.org/browse/WFCORE-4582?page=com.atlassian.jira.plugi... ]
Darran Lofthouse commented on WFCORE-4582:
------------------------------------------
Are you sure you are testing with HTTP BASIC auth? I suspect you are testing using DIGEST which would mean your changes are Ok.
> Cannot create user with underscores in the name
> -----------------------------------------------
>
> Key: WFCORE-4582
> URL: https://issues.jboss.org/browse/WFCORE-4582
> Project: WildFly Core
> Issue Type: Enhancement
> Affects Versions: 10.0.0.Beta2
> Reporter: Thorsten Heit
> Assignee: Jeff Mesnil
> Priority: Minor
>
> On a fresh a Wildfly install (tested on 11.0.0.Final and 17.0.0.Final) I cannot create application users with underscores in the user name:
> {noformat}
> C:\Users\thorsten\bin\wildfly-11.0.0.Final\bin>add-user
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by __redirected.__SAXParserFactory (file:/C:/Users/thorsten/bin/wildfly-11.0.0.Final/jboss-modules.jar) to c
> onstructor com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl()
> WARNING: Please consider reporting this to the maintainers of __redirected.__SAXParserFactory
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> What type of user do you wish to add?
> a) Management User (mgmt-users.properties)
> b) Application User (application-users.properties)
> (a): b
> Enter the details of the new user to add.
> Using realm 'ApplicationRealm' as discovered from the existing property files.
> Username : user_name
> * Error *
> WFLYDM0028: Username must be alphanumeric with the exception of the following accepted symbols (",", "-", ".", "/", "=", "@", "\")
> Username (user_name) :
> {noformat}
> We use basic authentification to restrict access to our applications, and expect usernames in the format {{<prefix>\_<suffix>}} with {{<prefix>}} being a sequence of plain letters (a-z), followed by an underscore ("\_") and a number as {{<suffix>}}.
> This is possible with WebSphere and even Tomcat, but actually not in Wildfly.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4374) Compilation error for "from accumulate" init() with executable-model or not
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-4374?page=com.atlassian.jira.plugi... ]
Mario Fusco reassigned DROOLS-4374:
-----------------------------------
Assignee: Luca Molteni (was: Mario Fusco)
> Compilation error for "from accumulate" init() with executable-model or not
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4374
> URL: https://issues.jboss.org/browse/DROOLS-4374
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Minor
> Labels: support
>
> If we miss a semicolon in init() of "from accumulate",
> for example)
> {noformat}
> import org.drools.modelcompiler.domain.Person;
> rule R when
> $sum : Integer() from accumulate (
> Person( age > 18, $age : age ),
> init( int sum = 0 ),
> action( sum += $age; ),
> reverse( sum -= $age; ),
> result( sum )
> )
> then
> insert($sum);
> end
> {noformat}
> - Not executable-model -> The DRL is compiled and executed successfully
> - Executable-model -> Throws ParseProblemException
> {noformat}
> com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
> Problem stacktrace :
> com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
> com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
> com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
> com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
> com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
> com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
> com.github.javaparser.JavaParser.parse(JavaParser.java:115)
> com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
> com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
> org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
> ...
> {noformat}
> I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
> Poosible choices are:
> - Fail even in case of Not executable-model
> - Success in case of Executable-model
> Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
> {noformat}
> [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
> text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
> Syntax error, insert ";" to complete Statement]]
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (WFCORE-4582) Cannot create user with underscores in the name
by Thorsten Heit (Jira)
[ https://issues.jboss.org/browse/WFCORE-4582?page=com.atlassian.jira.plugi... ]
Thorsten Heit commented on WFCORE-4582:
---------------------------------------
What puzzles me:
Yesterday I've added an entry in {{<wildfly_home>/standalone/configuration/application-users.properties}} by manually creating the password hash according to the description in this file:
{code:bash}
%> echo "user_name=`echo -n 'user_name:ApplicationRealm:password' | md5sum | sed -e 's: \*-::g'`" >> standalone/configuration/application-users.properties
{code}
I then was able to access my application via basic authentication by using the above user_name:password entry...
It seems to me that only the add-user script / tool isn't currently able to create such users.
> Cannot create user with underscores in the name
> -----------------------------------------------
>
> Key: WFCORE-4582
> URL: https://issues.jboss.org/browse/WFCORE-4582
> Project: WildFly Core
> Issue Type: Enhancement
> Affects Versions: 10.0.0.Beta2
> Reporter: Thorsten Heit
> Assignee: Jeff Mesnil
> Priority: Minor
>
> On a fresh a Wildfly install (tested on 11.0.0.Final and 17.0.0.Final) I cannot create application users with underscores in the user name:
> {noformat}
> C:\Users\thorsten\bin\wildfly-11.0.0.Final\bin>add-user
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by __redirected.__SAXParserFactory (file:/C:/Users/thorsten/bin/wildfly-11.0.0.Final/jboss-modules.jar) to c
> onstructor com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl()
> WARNING: Please consider reporting this to the maintainers of __redirected.__SAXParserFactory
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> What type of user do you wish to add?
> a) Management User (mgmt-users.properties)
> b) Application User (application-users.properties)
> (a): b
> Enter the details of the new user to add.
> Using realm 'ApplicationRealm' as discovered from the existing property files.
> Username : user_name
> * Error *
> WFLYDM0028: Username must be alphanumeric with the exception of the following accepted symbols (",", "-", ".", "/", "=", "@", "\")
> Username (user_name) :
> {noformat}
> We use basic authentification to restrict access to our applications, and expect usernames in the format {{<prefix>\_<suffix>}} with {{<prefix>}} being a sequence of plain letters (a-z), followed by an underscore ("\_") and a number as {{<suffix>}}.
> This is possible with WebSphere and even Tomcat, but actually not in Wildfly.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4375) BigDecimal in from accumulate with MVEL with executable-model
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-4375?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi updated DROOLS-4375:
--------------------------------------
Git Pull Request: https://github.com/kiegroup/drools/pull/2477
> BigDecimal in from accumulate with MVEL with executable-model
> -------------------------------------------------------------
>
> Key: DROOLS-4375
> URL: https://issues.jboss.org/browse/DROOLS-4375
> Project: Drools
> Issue Type: Bug
> Components: executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Luca Molteni
> Priority: Major
> Labels: support
>
> When "from accumulate" uses BigDecimal with Mvel syntax,
> for example)
> {noformat}
> import org.drools.modelcompiler.domain.Person;
> import java.math.BigDecimal;
> global java.util.List list;
> dialect "mvel"
> rule R when
> $b : BigDecimal() from accumulate (
> Person( $money : money ),
> init( BigDecimal sum = 0; ),
> action( sum += $money; ),
> reverse( sum -= $money; ),
> result( sum )
> )
> then
> list.add($b);
> end
> {noformat}
> It works with non executable-model but fails with executable-model.
> {noformat}
> [ERROR] Failures:
> [ERROR] AccumulateTest.testFromAccumulateBigDecimalMvel:1273->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=28, column=20
> text=incompatible types: int cannot be converted to java.math.BigDecimal], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=32, column=18
> text=bad operand types for binary operator '+'
> first type: java.math.BigDecimal
> second type: java.math.BigDecimal], Message [id=3, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=36, column=18
> text=bad operand types for binary operator '-'
> first type: java.math.BigDecimal
> second type: java.math.BigDecimal], Message [id=4, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=0, column=0
> text=Java source of src/main/java/defaultpkg/RAccumulate6.java in error:
> package defaultpkg
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4375) BigDecimal in from accumulate with MVEL with executable-model
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-4375:
-----------------------------------------
Summary: BigDecimal in from accumulate with MVEL with executable-model
Key: DROOLS-4375
URL: https://issues.jboss.org/browse/DROOLS-4375
Project: Drools
Issue Type: Bug
Components: executable model
Affects Versions: 7.24.0.Final
Reporter: Toshiya Kobayashi
Assignee: Luca Molteni
When "from accumulate" uses BigDecimal with Mvel syntax,
for example)
{noformat}
import org.drools.modelcompiler.domain.Person;
import java.math.BigDecimal;
global java.util.List list;
dialect "mvel"
rule R when
$b : BigDecimal() from accumulate (
Person( $money : money ),
init( BigDecimal sum = 0; ),
action( sum += $money; ),
reverse( sum -= $money; ),
result( sum )
)
then
list.add($b);
end
{noformat}
It works with non executable-model but fails with executable-model.
{noformat}
[ERROR] Failures:
[ERROR] AccumulateTest.testFromAccumulateBigDecimalMvel:1273->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=28, column=20
text=incompatible types: int cannot be converted to java.math.BigDecimal], Message [id=2, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=32, column=18
text=bad operand types for binary operator '+'
first type: java.math.BigDecimal
second type: java.math.BigDecimal], Message [id=3, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=36, column=18
text=bad operand types for binary operator '-'
first type: java.math.BigDecimal
second type: java.math.BigDecimal], Message [id=4, level=ERROR, path=src/main/java/defaultpkg/RAccumulate6.java, line=0, column=0
text=Java source of src/main/java/defaultpkg/RAccumulate6.java in error:
package defaultpkg
{noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4374) Compilation error for "from accumulate" init() with executable-model or not
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-4374?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi commented on DROOLS-4374:
-------------------------------------------
I haven't sent a PR because I'm not sure where a unit test should belong to. If it should be in drools-model-compiler AccumulateTest.java, let me know. I'll send a unit test PR.
> Compilation error for "from accumulate" init() with executable-model or not
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4374
> URL: https://issues.jboss.org/browse/DROOLS-4374
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Mario Fusco
> Priority: Minor
> Labels: support
>
> If we miss a semicolon in init() of "from accumulate",
> for example)
> {noformat}
> import org.drools.modelcompiler.domain.Person;
> rule R when
> $sum : Integer() from accumulate (
> Person( age > 18, $age : age ),
> init( int sum = 0 ),
> action( sum += $age; ),
> reverse( sum -= $age; ),
> result( sum )
> )
> then
> insert($sum);
> end
> {noformat}
> - Not executable-model -> The DRL is compiled and executed successfully
> - Executable-model -> Throws ParseProblemException
> {noformat}
> com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
> Problem stacktrace :
> com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
> com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
> com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
> com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
> com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
> com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
> com.github.javaparser.JavaParser.parse(JavaParser.java:115)
> com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
> com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
> org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
> ...
> {noformat}
> I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
> Poosible choices are:
> - Fail even in case of Not executable-model
> - Success in case of Executable-model
> Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
> {noformat}
> [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
> text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
> Syntax error, insert ";" to complete Statement]]
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4374) Compilation error for "from accumulate" init() with executable-model or not
by Toshiya Kobayashi (Jira)
[ https://issues.jboss.org/browse/DROOLS-4374?page=com.atlassian.jira.plugi... ]
Toshiya Kobayashi updated DROOLS-4374:
--------------------------------------
Description:
If we miss a semicolon in init() of "from accumulate",
for example)
{noformat}
import org.drools.modelcompiler.domain.Person;
rule R when
$sum : Integer() from accumulate (
Person( age > 18, $age : age ),
init( int sum = 0 ),
action( sum += $age; ),
reverse( sum -= $age; ),
result( sum )
)
then
insert($sum);
end
{noformat}
- Not executable-model -> The DRL is compiled and executed successfully
- Executable-model -> Throws ParseProblemException
{noformat}
com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
com.github.javaparser.JavaParser.parse(JavaParser.java:115)
com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
...
{noformat}
I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
Poosible choices are:
- Fail even in case of Not executable-model
- Success in case of Executable-model
Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
{noformat}
[Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
Syntax error, insert ";" to complete Statement]]
{noformat}
was:
If we miss a semicolon in init() of "from accumulate",
for example)
{noformat}
import org.drools.modelcompiler.domain.Person;
rule R when
$sum : Integer() from accumulate (
Person( age > 18, $age : age ),
init( int sum = 0 ),
action( sum += $age; ),
reverse( sum -= $age; ),
result( sum )
)
then
insert($sum);
end
{noformat}
- Not executable-model
- The DRL is compiled and executed successfully
- Executable-model
- Throws ParseProblemException
{noformat}
com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
com.github.javaparser.JavaParser.parse(JavaParser.java:115)
com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
...
{noformat}
I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
Poosible choices are:
- Fail even in case of Not executable-model
- Success in case of Executable-model
Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
{noformat}
[Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
Syntax error, insert ";" to complete Statement]]
{noformat}
> Compilation error for "from accumulate" init() with executable-model or not
> ---------------------------------------------------------------------------
>
> Key: DROOLS-4374
> URL: https://issues.jboss.org/browse/DROOLS-4374
> Project: Drools
> Issue Type: Bug
> Components: core engine, executable model
> Affects Versions: 7.24.0.Final
> Reporter: Toshiya Kobayashi
> Assignee: Mario Fusco
> Priority: Minor
> Labels: support
>
> If we miss a semicolon in init() of "from accumulate",
> for example)
> {noformat}
> import org.drools.modelcompiler.domain.Person;
> rule R when
> $sum : Integer() from accumulate (
> Person( age > 18, $age : age ),
> init( int sum = 0 ),
> action( sum += $age; ),
> reverse( sum -= $age; ),
> result( sum )
> )
> then
> insert($sum);
> end
> {noformat}
> - Not executable-model -> The DRL is compiled and executed successfully
> - Executable-model -> Throws ParseProblemException
> {noformat}
> com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
> Problem stacktrace :
> com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
> com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
> com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
> com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
> com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
> com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
> com.github.javaparser.JavaParser.parse(JavaParser.java:115)
> com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
> com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
> org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
> ...
> {noformat}
> I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
> Poosible choices are:
> - Fail even in case of Not executable-model
> - Success in case of Executable-model
> Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
> {noformat}
> [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
> text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
> Syntax error, insert ";" to complete Statement]]
> {noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (DROOLS-4374) Compilation error for "from accumulate" init() with executable-model or not
by Toshiya Kobayashi (Jira)
Toshiya Kobayashi created DROOLS-4374:
-----------------------------------------
Summary: Compilation error for "from accumulate" init() with executable-model or not
Key: DROOLS-4374
URL: https://issues.jboss.org/browse/DROOLS-4374
Project: Drools
Issue Type: Bug
Components: core engine, executable model
Affects Versions: 7.24.0.Final
Reporter: Toshiya Kobayashi
Assignee: Mario Fusco
If we miss a semicolon in init() of "from accumulate",
for example)
{noformat}
import org.drools.modelcompiler.domain.Person;
rule R when
$sum : Integer() from accumulate (
Person( age > 18, $age : age ),
init( int sum = 0 ),
action( sum += $age; ),
reverse( sum -= $age; ),
result( sum )
)
then
insert($sum);
end
{noformat}
- Not executable-model
- The DRL is compiled and executed successfully
- Executable-model
- Throws ParseProblemException
{noformat}
com.github.javaparser.ParseProblemException: (line 1,col 12) Parse error. Found "}", expected one of "!=" "%" "%=" "&" "&&" "&=" "*" "*=" "+" "+=" "," "-" "-=" "->" "/" "/=" "::" ";" "<" "<<=" "<=" "=" "==" ">" ">=" ">>=" ">>>=" "?" "^" "^=" "instanceof" "|" "|=" "||"
Problem stacktrace :
com.github.javaparser.GeneratedJavaParser.generateParseException(GeneratedJavaParser.java:10567)
com.github.javaparser.GeneratedJavaParser.jj_consume_token(GeneratedJavaParser.java:10426)
com.github.javaparser.GeneratedJavaParser.BlockStatement(GeneratedJavaParser.java:3847)
com.github.javaparser.GeneratedJavaParser.Statements(GeneratedJavaParser.java:1644)
com.github.javaparser.GeneratedJavaParser.Block(GeneratedJavaParser.java:3822)
com.github.javaparser.GeneratedJavaParser.BlockParseStart(GeneratedJavaParser.java:5687)
com.github.javaparser.JavaParser.parse(JavaParser.java:115)
com.github.javaparser.JavaParser.parseBlock(JavaParser.java:309)
com.github.javaparser.StaticJavaParser.parseBlock(StaticJavaParser.java:240)
org.drools.modelcompiler.builder.generator.visitor.accumulate.AccumulateVisitor.visitAccInlineCustomCode(AccumulateVisitor.java:434)
...
{noformat}
I'm not very sure how it should be fixed. I filed this because of discrepancy between Executable-model and Not executable-model
Poosible choices are:
- Fail even in case of Not executable-model
- Success in case of Executable-model
Additonal Note: If we miss a semicolon in action(), a more understandable error message is thrown.
{noformat}
[Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
text=Rule Compilation error Syntax error, insert ":: IdentifierOrNew" to complete Expression
Syntax error, insert ";" to complete Statement]]
{noformat}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (WFLY-12334) Using hotrod session manager with near cache throws IllegalAccessError
by Paul Ferraro (Jira)
Paul Ferraro created WFLY-12334:
-----------------------------------
Summary: Using hotrod session manager with near cache throws IllegalAccessError
Key: WFLY-12334
URL: https://issues.jboss.org/browse/WFLY-12334
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 17.0.1.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
Until an Infinispan release containing ISPN-10248 is incorporated, the org.wildfly.clustering.infinispan.spi module needs to extend package protected classes from the org.infinispan.client.hotrod module. However, this throws a IllegalAccessError since the package protected class to which we are attempting to extend resides in a different module.
Until Infinispan 9.4.16.Final is released, we need to absorb the org.infinispan.client.hotrod module into the org.wildfly.clustering.infinispan.spi module.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months
[JBoss JIRA] (WFLY-12329) ManagedScheduledExecutorService should be only available after server is ready
by nimo stephan (Jira)
[ https://issues.jboss.org/browse/WFLY-12329?page=com.atlassian.jira.plugin... ]
nimo stephan commented on WFLY-12329:
-------------------------------------
> can you please clarify what behaviour you expected?
"ManagedScheduledExecutorService" should only activated *after server is fully initiated and NOT in suspend mode*.
_I does not make sense to start the ManagedScheduledExecutorService before. For example, the ejb timer service will only fire if server is ready (fully initiated and not in suspend mode). The same should go for "ManagedScheduledExecutorService"._
> creating, starting, stopping or destroying executors (you are actually forbidden to use API lifecycle related methods)
Thanks for the hint.
*One question:*
So why can I access something like
{code:java}
executor.shutdown();
{code}
or
{code:java}
executor.shutdownNow();
{code}
from the
{code:java}
ManagedScheduledExecutorService
{code}
when all these methods are prohibited in JEE and therefore also throw exceptions?
> ManagedScheduledExecutorService should be only available after server is ready
> ------------------------------------------------------------------------------
>
> Key: WFLY-12329
> URL: https://issues.jboss.org/browse/WFLY-12329
> Project: WildFly
> Issue Type: Bug
> Components: Concurrency Utilities
> Affects Versions: 17.0.1.Final
> Reporter: nimo stephan
> Assignee: Eduardo Martins
> Priority: Major
>
> I use a *ManagedScheduledExecutorService* to execute tasks periodically:
> {code:java}
> @Startup
> @Singleton
> public class TaskScheduler {
> @Resource
> ManagedScheduledExecutorService executorService;
> @PostConstruct
> public void init() {
> executorService.scheduleAtFixedRate(this::task, 0, 5, TimeUnit.SECONDS);
> }
> public void task() {
> System.out.println("long running task:" + LocalTime.now());
> }
> }
> {code}
> Wildfly throws a few exceptions as long as server is not fully initiated and in "suspend"-mode:
> {code:java}
> 12:44:12,715 ERROR [org.jboss.as.ee] (EE-ManagedScheduledExecutorService-default-Thread-3) WFLYEE0110: Failed to run scheduled task: java.lang.IllegalStateException: WFLYEE0111: Cannot run scheduled task my.Task$$Lambda$1041/0x000000080240a040@5ee966ec as container is suspended
> at org.jboss.as.ee@17.0.1.Final//org.jboss.as.ee.concurrent.ControlPointUtils$ControlledScheduledRunnable.run(ControlPointUtils.java:164)
> at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
> at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
> at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.access$201(ManagedScheduledThreadPoolExecutor.java:383)
> at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.run(ManagedScheduledThreadPoolExecutor.java:534)
> at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:835)
> at org.glassfish.javax.enterprise.concurrent//org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:250)
> {code}
> I use _ManagedScheduledExecutorService_ instead of _ScheduledExecutorService_ in JEE because, *ManagedScheduledExecutorService* should be managed by JEE. Hence, the server should also manage and guarantee not to fire the executorService until the server is ready (and EJBs are available).
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 10 months