[JBoss JIRA] (DROOLS-5650) UnsupportedOperationException when using enum in Java 11, works fine in Java 8
by Abhi Vuyyuru (Jira)
[ https://issues.redhat.com/browse/DROOLS-5650?page=com.atlassian.jira.plug... ]
Abhi Vuyyuru commented on DROOLS-5650:
--------------------------------------
Did you run it in Weblogic container? I did not try outside Weblogic, but it is consistent for me.
> UnsupportedOperationException when using enum in Java 11, works fine in Java 8
> ------------------------------------------------------------------------------
>
> Key: DROOLS-5650
> URL: https://issues.redhat.com/browse/DROOLS-5650
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.43.1.Final
> Reporter: Abhi Vuyyuru
> Assignee: Mario Fusco
> Priority: Major
> Attachments: AuditVO.java, Driver.java, ExamplePolicyPricing.xls, Policy.java
>
>
> I am porting an existing application Java 7 to Java 11 (Drools 7.42.0). The application works as expected if I compile as Java 1.8 and deploy on Java 11 container (Weblogic 14). But if I compile the same code in Java 11, I get the following error. The only change between 1.8 and 11 is the java compiler level in Maven pom. I have ASM7 as a dependency in Maven.
> {{}}
>
> {{{{Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
> at org.mvel2.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
> at org.mvel2.asm.ClassReader.accept(ClassReader.java:651)
> at org.mvel2.asm.ClassReader.accept(ClassReader.java:391)
> at org.drools.core.util.asm.ClassFieldInspector.processClassWithByteCode(ClassFieldInspector.java:107)
> at org.drools.core.util.asm.ClassFieldInspector.processClassWithByteCode(ClassFieldInspector.java:114)
> at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:86)
> at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:74)
> at org.drools.core.base.ClassFieldAccessorFactory.getClassFieldInspector(ClassFieldAccessorFactory.java:157)
> at org.drools.core.base.ClassFieldAccessorFactory.getFieldType(ClassFieldAccessorFactory.java:141)
> at org.drools.core.base.ClassFieldAccessorStore.getFieldType(ClassFieldAccessorStore.java:295)
> at org.drools.compiler.rule.builder.PatternBuilder.getValueType(PatternBuilder.java:1079)
> at org.drools.compiler.rule.builder.PatternBuilder.normalizeExpression(PatternBuilder.java:1047)
> at org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:965)
> at org.drools.compiler.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:942)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:767)
> at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:620)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:187)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:154)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:136)
> at org.drools.compiler.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:66)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:107)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1183)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1178)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.lambda$null$3(KnowledgeBuilderImpl.java:1134)
> at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
> at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
> at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
> at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
> at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
> at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)}}}}
>
> I noticed while debugging that this was caused by an "enum" in our code. Drools works fine if we remove the enum and use constants. The error seems to suggest that this could happen to any nested classes. Is there a better way to handle this other than changing our code to remove nested classes and enums?
> I see that in the class {{org.drools.core.util.asm.ClassFieldInspector}}, the API is set to ASM5, but MVEL is expecting ASM7. But not sure why it would work in Java 8 and not in Java 11. Any suggestions?
>
> {{ClassFieldVisitor(final Class< ? > cls,
> final boolean includeFinalMethods,
> final ClassFieldInspector inspector) \{
> super(Opcodes.ASM5);
> this.clazz = cls;
> this.includeFinalMethods = includeFinalMethods;
> this.inspector = inspector;
> }}}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (WFCORE-1153) Can't configure empty base-dn for ldap realm
by Sonia Zaldana (Jira)
[ https://issues.redhat.com/browse/WFCORE-1153?page=com.atlassian.jira.plug... ]
Sonia Zaldana reassigned WFCORE-1153:
-------------------------------------
Assignee: (was: Sonia Zaldana)
> Can't configure empty base-dn for ldap realm
> --------------------------------------------
>
> Key: WFCORE-1153
> URL: https://issues.redhat.com/browse/WFCORE-1153
> Project: WildFly Core
> Issue Type: Bug
> Components: Management, Security
> Affects Versions: 2.0.2.Final
> Reporter: Alberto Persello
> Priority: Major
> Labels: authentication, authorization, group, ldap, realm
>
> It is not possible to set the empty value for base-dn attribute in authentication-->ldap element and in authorization-->ldap-->group-search-->group-to-principal element.
> The empty value is the only valid option for java ldap searches to scan the entire ldap (the equivalent of RootDSE).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (WFCORE-1153) Can't configure empty base-dn for ldap realm
by Sonia Zaldana (Jira)
[ https://issues.redhat.com/browse/WFCORE-1153?page=com.atlassian.jira.plug... ]
Sonia Zaldana commented on WFCORE-1153:
---------------------------------------
This issue refers to legacy security. With Elytron, both FILTER_BASE_DN and SEARCH_BASE_DN should be non-empty if specified, as they are optional.
> Can't configure empty base-dn for ldap realm
> --------------------------------------------
>
> Key: WFCORE-1153
> URL: https://issues.redhat.com/browse/WFCORE-1153
> Project: WildFly Core
> Issue Type: Bug
> Components: Management, Security
> Affects Versions: 2.0.2.Final
> Reporter: Alberto Persello
> Assignee: Sonia Zaldana
> Priority: Major
> Labels: authentication, authorization, group, ldap, realm
>
> It is not possible to set the empty value for base-dn attribute in authentication-->ldap element and in authorization-->ldap-->group-search-->group-to-principal element.
> The empty value is the only valid option for java ldap searches to scan the entire ldap (the equivalent of RootDSE).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5650) UnsupportedOperationException when using enum in Java 11, works fine in Java 8
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5650?page=com.atlassian.jira.plug... ]
Mario Fusco commented on DROOLS-5650:
-------------------------------------
I still cannot reproduce the problem. I put all the pojos you provided in the test class that I'm copying below, created a drl that should mimic exactly the first row of your dtable and still it works for me with both java 8 and 11.
Please validate what I've done and if possible try to modify my test case so that it fails on java 11. Thanks.
{code:java}
import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.kie.internal.utils.KieHelper;
import static org.junit.Assert.assertEquals;
public class MyTest {
public static class AuditVO {
private AuditVO.PolicyType type = AuditVO.PolicyType.COMPREHENSIVE;
private AuditVO.Test test1;
public enum PolicyType {
COMPREHENSIVE
};
public AuditVO.PolicyType getType() {
return type;
}
public void setType( AuditVO.PolicyType type) {
this.type = type;
}
private enum VOStatus {
NEW, UPDATE, DELETE
};
private AuditVO.VOStatus status;
public void setNew() {
this.status = AuditVO.VOStatus.NEW;
}
public void setUpdate() {
this.status = AuditVO.VOStatus.UPDATE;
}
public void setDelete() {
this.status = AuditVO.VOStatus.DELETE;
}
public boolean isNew() {
return this.status == AuditVO.VOStatus.NEW;
}
public boolean isUpdate() {
return this.status == AuditVO.VOStatus.UPDATE;
}
public boolean isDelete() {
return this.status == AuditVO.VOStatus.DELETE;
}
static class Test {
private int test;
public int getTest() {
return test;
}
public void setTest(int test) {
this.test = test;
}
}
public AuditVO.Test getTest1() {
return test1;
}
public void setTest1( AuditVO.Test test1) {
this.test1 = test1;
}
public AuditVO.VOStatus getStatus() {
return status;
}
public void setStatus( AuditVO.VOStatus status) {
this.status = status;
}
}
public static class Policy extends AuditVO {
private boolean approved = false;
private int discountPercent = 0;
private int basePrice;
public boolean isApproved() {
return approved;
}
public void setApproved(boolean approved) {
this.approved = approved;
}
public int getDiscountPercent() {
return discountPercent;
}
public void setDiscountPercent(int discountPercent) {
this.discountPercent = discountPercent;
}
public void applyDiscount(int discount) {
discountPercent += discount;
}
public int getBasePrice() {
return basePrice;
}
public void setBasePrice(int basePrice) {
this.basePrice = basePrice;
}
}
public static class Driver extends AuditVO {
private String name = "Mr Joe Blogs";
private Integer age = new Integer(30);
private Integer priorClaims = new Integer(1);
private String locationRiskProfile = "LOW";
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getLocationRiskProfile() {
return locationRiskProfile;
}
public void setLocationRiskProfile(String locationRiskProfile) {
this.locationRiskProfile = locationRiskProfile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getPriorClaims() {
return priorClaims;
}
public void setPriorClaims(Integer priorClaims) {
this.priorClaims = priorClaims;
}
}
@Test
public void test() {
// DROOLS-5650
String str =
"import " + Driver.class.getCanonicalName() + ";\n" +
"import " + Policy.class.getCanonicalName() + ";\n" +
"import " + Policy.PolicyType.class.getCanonicalName() + ";\n" +
"rule R1 when\n" +
" $d: Driver( age >= 18, age <= 24, locationRiskProfile == \"LOW\", priorClaims == 1)\n" +
" $p: Policy( type == PolicyType.COMPREHENSIVE )\n" +
"then\n" +
" $p.setBasePrice(450);" +
"end\n";
KieSession ksession = new KieHelper().addContent( str, "test.drl" ).build().newKieSession();
assertEquals(0, ksession.fireAllRules());
}
}
{code}
> UnsupportedOperationException when using enum in Java 11, works fine in Java 8
> ------------------------------------------------------------------------------
>
> Key: DROOLS-5650
> URL: https://issues.redhat.com/browse/DROOLS-5650
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.43.1.Final
> Reporter: Abhi Vuyyuru
> Assignee: Mario Fusco
> Priority: Major
> Attachments: AuditVO.java, Driver.java, ExamplePolicyPricing.xls, Policy.java
>
>
> I am porting an existing application Java 7 to Java 11 (Drools 7.42.0). The application works as expected if I compile as Java 1.8 and deploy on Java 11 container (Weblogic 14). But if I compile the same code in Java 11, I get the following error. The only change between 1.8 and 11 is the java compiler level in Maven pom. I have ASM7 as a dependency in Maven.
> {{}}
>
> {{{{Caused by: java.lang.UnsupportedOperationException: This feature requires ASM7
> at org.mvel2.asm.ClassVisitor.visitNestMember(ClassVisitor.java:236)
> at org.mvel2.asm.ClassReader.accept(ClassReader.java:651)
> at org.mvel2.asm.ClassReader.accept(ClassReader.java:391)
> at org.drools.core.util.asm.ClassFieldInspector.processClassWithByteCode(ClassFieldInspector.java:107)
> at org.drools.core.util.asm.ClassFieldInspector.processClassWithByteCode(ClassFieldInspector.java:114)
> at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:86)
> at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:74)
> at org.drools.core.base.ClassFieldAccessorFactory.getClassFieldInspector(ClassFieldAccessorFactory.java:157)
> at org.drools.core.base.ClassFieldAccessorFactory.getFieldType(ClassFieldAccessorFactory.java:141)
> at org.drools.core.base.ClassFieldAccessorStore.getFieldType(ClassFieldAccessorStore.java:295)
> at org.drools.compiler.rule.builder.PatternBuilder.getValueType(PatternBuilder.java:1079)
> at org.drools.compiler.rule.builder.PatternBuilder.normalizeExpression(PatternBuilder.java:1047)
> at org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:965)
> at org.drools.compiler.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:942)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:767)
> at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:620)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:187)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:154)
> at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:136)
> at org.drools.compiler.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:66)
> at org.drools.compiler.rule.builder.RuleBuilder.build(RuleBuilder.java:107)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.internalAddRule(KnowledgeBuilderImpl.java:1183)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addRule(KnowledgeBuilderImpl.java:1178)
> at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.lambda$null$3(KnowledgeBuilderImpl.java:1134)
> at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
> at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
> at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
> at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
> at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
> at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)}}}}
>
> I noticed while debugging that this was caused by an "enum" in our code. Drools works fine if we remove the enum and use constants. The error seems to suggest that this could happen to any nested classes. Is there a better way to handle this other than changing our code to remove nested classes and enums?
> I see that in the class {{org.drools.core.util.asm.ClassFieldInspector}}, the API is set to ASM5, but MVEL is expecting ASM7. But not sure why it would work in Java 8 and not in Java 11. Any suggestions?
>
> {{ClassFieldVisitor(final Class< ? > cls,
> final boolean includeFinalMethods,
> final ClassFieldInspector inspector) \{
> super(Opcodes.ASM5);
> this.clazz = cls;
> this.includeFinalMethods = includeFinalMethods;
> this.inspector = inspector;
> }}}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5106) Local/Internal Maven Repos can not be accessed
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5106?page=com.atlassian.jira.plug... ]
Steve Davidson closed DROOLS-5106.
----------------------------------
Confirmed fixed for version 7.43.1
> Local/Internal Maven Repos can not be accessed
> ----------------------------------------------
>
> Key: DROOLS-5106
> URL: https://issues.redhat.com/browse/DROOLS-5106
> Project: Drools
> Issue Type: Bug
> Components: Artifact Repository
> Affects Versions: 7.33.0.Final
> Reporter: Steve Davidson
> Assignee: Luca Molteni
> Priority: Major
> Labels: Drools, drools-compiler, maven
> Fix For: 7.3.1.Final
>
> Attachments: settings.xml
>
>
> Attempting to use an internal Nexus Repository, unable to load Drools KIE Modules using Maven. This works with 7.29.Final. Changing to 7.33.Final fails with the following stack trace;
> {code:java}
> WARNING: Environment variable M2_HOME is not set
> Feb 24, 2020 5:12:30 PM org.kie.server.services.impl.KieServerImpl createContainer
> SEVERE: Error creating container 'JUnit Test: kie-server' for module 'com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT'
> java.lang.RuntimeException: Cannot find KieModule: com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
> at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:281)
> at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:157)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:500)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5106) Local/Internal Maven Repos can not be accessed
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5106?page=com.atlassian.jira.plug... ]
Steve Davidson resolved DROOLS-5106.
------------------------------------
Fix Version/s: 7.3.1.Final
Resolution: Done
Confirmed fixed in version 7.43.1
> Local/Internal Maven Repos can not be accessed
> ----------------------------------------------
>
> Key: DROOLS-5106
> URL: https://issues.redhat.com/browse/DROOLS-5106
> Project: Drools
> Issue Type: Bug
> Components: Artifact Repository
> Affects Versions: 7.33.0.Final
> Reporter: Steve Davidson
> Assignee: Luca Molteni
> Priority: Major
> Labels: Drools, drools-compiler, maven
> Fix For: 7.3.1.Final
>
> Attachments: settings.xml
>
>
> Attempting to use an internal Nexus Repository, unable to load Drools KIE Modules using Maven. This works with 7.29.Final. Changing to 7.33.Final fails with the following stack trace;
> {code:java}
> WARNING: Environment variable M2_HOME is not set
> Feb 24, 2020 5:12:30 PM org.kie.server.services.impl.KieServerImpl createContainer
> SEVERE: Error creating container 'JUnit Test: kie-server' for module 'com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT'
> java.lang.RuntimeException: Cannot find KieModule: com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
> at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:281)
> at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:157)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:500)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5106) Local/Internal Maven Repos can not be accessed
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5106?page=com.atlassian.jira.plug... ]
Steve Davidson commented on DROOLS-5106:
----------------------------------------
Confirmed fixed for version 7.43.1.
> Local/Internal Maven Repos can not be accessed
> ----------------------------------------------
>
> Key: DROOLS-5106
> URL: https://issues.redhat.com/browse/DROOLS-5106
> Project: Drools
> Issue Type: Bug
> Components: Artifact Repository
> Affects Versions: 7.33.0.Final
> Reporter: Steve Davidson
> Assignee: Luca Molteni
> Priority: Major
> Labels: Drools, drools-compiler, maven
> Attachments: settings.xml
>
>
> Attempting to use an internal Nexus Repository, unable to load Drools KIE Modules using Maven. This works with 7.29.Final. Changing to 7.33.Final fails with the following stack trace;
> {code:java}
> WARNING: Environment variable M2_HOME is not set
> Feb 24, 2020 5:12:30 PM org.kie.server.services.impl.KieServerImpl createContainer
> SEVERE: Error creating container 'JUnit Test: kie-server' for module 'com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT'
> java.lang.RuntimeException: Cannot find KieModule: com.j2eeguys.demo:KieIssueDemo:0.1.0-SNAPSHOT
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:186)
> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:176)
> at org.kie.server.services.impl.KieServerImpl.createContainer(KieServerImpl.java:281)
> at org.kie.server.remote.rest.common.resource.KieServerRestImpl.createContainer(KieServerRestImpl.java:157)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:500)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5655) ObjectDataCompiler converter does not compile all template rules
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5655?page=com.atlassian.jira.plug... ]
Mario Fusco resolved DROOLS-5655.
---------------------------------
Resolution: Explained
The ObjectDataCompiler is actually unaware of drl syntax. It doesn't know what a constraint is and remove it from the generated text in case of a null value. What it does instead when a line is bound to one or more nulls is omitting the entire line from the drl. In your case you could workaround the problem and obtain the result you want (if I have understood correctly) by simply putting a constraint per line and paying attention when the comma separating the 2 constraints should or shouldn't be added. Something like that should work for you
{code:java}
$p : Person(
age >= @{minage}
@if{minage != null && maxage != null},@end{}
age < @{maxage}
) {code}
> ObjectDataCompiler converter does not compile all template rules
> ----------------------------------------------------------------
>
> Key: DROOLS-5655
> URL: https://issues.redhat.com/browse/DROOLS-5655
> Project: Drools
> Issue Type: Bug
> Reporter: Oualid AMCHAYD
> Assignee: Mario Fusco
> Priority: Major
> Attachments: image-2020-09-18-11-31-28-879.png
>
>
> When trying to compile a rule template with a datasource, the compilers does not compiles the rows with empty fields.
> Here is the code I am using:
> {code:java}
> ObjectDataCompiler converter = new ObjectDataCompiler();
>
> Collection<MyRule> rulesRep = rulerepo.findAll();
> InputStream personInputStream = null;
> try {
> personInputStream = ResourceFactory.newClassPathResource("rules.drt").getInputStream(); // convert sample.drt in resource to input stream
> } catch (IOException e) {
> e.printStackTrace();
> }
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
>
> String personDrl = converter.compile(rulesRep, personInputStream);
> kieFileSystem.write("src/main/resources/person_rule.drl", kieServices.getResources().newReaderResource(new StringReader(personDrl)));
>
> {code}
> This is my datasource, which have two empty fields in two rows.
> !image-2020-09-18-11-31-28-879.png!
> And this is the result i got for the two rows with an empty fields :
> {code:java}
> rule "ageRule_1"
> when
> then
> $person.setStatus("Infant");
> end
> rule "ageRule_8"
> when
> then
> $person.setStatus("Old Aged");
> end
> {code}
> As you see the LHS are is generated in two rules.
> Am i missing something or this is a normal behaviour when having empty fields.
> Thanks in advance.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months
[JBoss JIRA] (DROOLS-5655) ObjectDataCompiler converter does not compile all template rules
by Mario Fusco (Jira)
[ https://issues.redhat.com/browse/DROOLS-5655?page=com.atlassian.jira.plug... ]
Mario Fusco updated DROOLS-5655:
--------------------------------
Sprint: 2020 Week 37-39 (from Sep 7)
> ObjectDataCompiler converter does not compile all template rules
> ----------------------------------------------------------------
>
> Key: DROOLS-5655
> URL: https://issues.redhat.com/browse/DROOLS-5655
> Project: Drools
> Issue Type: Bug
> Reporter: Oualid AMCHAYD
> Assignee: Mario Fusco
> Priority: Major
> Attachments: image-2020-09-18-11-31-28-879.png
>
>
> When trying to compile a rule template with a datasource, the compilers does not compiles the rows with empty fields.
> Here is the code I am using:
> {code:java}
> ObjectDataCompiler converter = new ObjectDataCompiler();
>
> Collection<MyRule> rulesRep = rulerepo.findAll();
> InputStream personInputStream = null;
> try {
> personInputStream = ResourceFactory.newClassPathResource("rules.drt").getInputStream(); // convert sample.drt in resource to input stream
> } catch (IOException e) {
> e.printStackTrace();
> }
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
>
> String personDrl = converter.compile(rulesRep, personInputStream);
> kieFileSystem.write("src/main/resources/person_rule.drl", kieServices.getResources().newReaderResource(new StringReader(personDrl)));
>
> {code}
> This is my datasource, which have two empty fields in two rows.
> !image-2020-09-18-11-31-28-879.png!
> And this is the result i got for the two rows with an empty fields :
> {code:java}
> rule "ageRule_1"
> when
> then
> $person.setStatus("Infant");
> end
> rule "ageRule_8"
> when
> then
> $person.setStatus("Old Aged");
> end
> {code}
> As you see the LHS are is generated in two rules.
> Am i missing something or this is a normal behaviour when having empty fields.
> Thanks in advance.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
5 years, 10 months