[JBoss JIRA] (DROOLS-699) A not with no constraints is not linked when part of a subnetwork starting from a BetaNode
by Mario Fusco (JIRA)
Mario Fusco created DROOLS-699:
----------------------------------
Summary: A not with no constraints is not linked when part of a subnetwork starting from a BetaNode
Key: DROOLS-699
URL: https://issues.jboss.org/browse/DROOLS-699
Project: Drools
Issue Type: Bug
Reporter: Mario Fusco
Assignee: Mario Fusco
The following test fails:
{code}
@Test
public void testNotExists() {
String drl2 =
"import " + List.class.getCanonicalName() + ";\n"
+ "\n\n"
+ "rule \"NotExists\"\n"
+ "when\n"
+ "$l1: List() \n"
+ "$l2: List() \n"
+ "exists( String() from $l1 ) \n"
+ "not( exists( String() ) )\n"
+ "then end\n";
KieSession ksession = new KieHelper().addContent(drl2, ResourceType.DRL)
.build()
.newKieSession();
ksession.insert(asList("Mario", "Mark"));
ksession.insert(asList("Julie", "Leiti"));
assertEquals(4, ksession.fireAllRules());
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (DROOLS-185) ClassCastException at ConditionEvaluator
by Liu Yan (JIRA)
[ https://issues.jboss.org/browse/DROOLS-185?page=com.atlassian.jira.plugin... ]
Liu Yan commented on DROOLS-185:
--------------------------------
Thank you for your suggestion.
I bypassed this issue by replacing ClassB() with this
$B: BaseClass()
exists ClassB() from $B
We will upgrade when we have to :)
> ClassCastException at ConditionEvaluator
> ----------------------------------------
>
> Key: DROOLS-185
> URL: https://issues.jboss.org/browse/DROOLS-185
> Project: Drools
> Issue Type: Bug
> Affects Versions: 5.5.0.Final
> Reporter: Sergey Alaev
> Assignee: Mario Fusco
>
> Stacktrace:
> Caused by: java.lang.ClassCastException: ***** cannot be cast to ******
> at ConditionEvaluator443abf2927ca4f64a4ad86407ae34799.evaluate(Unknown Source)
> at org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:200)
> at org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:157)
> at org.drools.reteoo.FromNode.checkConstraintsAndPropagate(FromNode.java:318)
> at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:164)
> at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:232)
> at org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:116)
> at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
> at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
> Reason:
> ConditionEvaluator seems to be using lazy initializing and then caches generated class to evaluate this expression with another arguments.
> Given following:
> interface A {
> String getString();
> }
> interface B {
> String getString();
> }
> class X implements B, A {}
> class Y implements A{}
> rule "test rule"
> when:
> A(string != null)
> then:
> end
> When rule engine is called for the first time with instance of class X, ConditionEvaluator will bind itself to first found interface implementing method getString(), i.e. interface B.
> Thus second call with instance of class Y will cause ClassCastException of casting Y to B.
> Solution: force MVEL to bind bytecode generated methods to class/interface declared in the rule explicitly, in our case - to interface A.
> Quickfix: use following declaration of class X:
> class X implements A, B {}
> Because ConditionEvaluator binds to first available interface, it will bind now to correct interface - to interface A.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (JGRP-1909) Add an AZURE_PING protocol
by Tristan Tarrant (JIRA)
Tristan Tarrant created JGRP-1909:
-------------------------------------
Summary: Add an AZURE_PING protocol
Key: JGRP-1909
URL: https://issues.jboss.org/browse/JGRP-1909
Project: JGroups
Issue Type: Feature Request
Reporter: Tristan Tarrant
Assignee: Bela Ban
Similar to the existing S3_PING and GOOGLE_PING, add an AZURE_PING which suppors node discovery using Azure's blob storage.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (WFLY-3698) Could not inject persistence unit into CDI managed bean
by Stanley Hillner (JIRA)
[ https://issues.jboss.org/browse/WFLY-3698?page=com.atlassian.jira.plugin.... ]
Stanley Hillner commented on WFLY-3698:
---------------------------------------
I don't understand why this issue has been marked as resolved. Was there any solution other than deactivating CDI for the whole deployment? I'm struggling with the same issue and deactivating DI for the module in which my DAO reside is no (or better an unacceptable) option since it is then not possible to inject these DAO into another module without using EJBs and JNDI-lookups. And this is exactly what I try to eliminate in the project.
I will open a new issue for that problem since I think this is a bug in the implementation of Weld.
> Could not inject persistence unit into CDI managed bean
> -------------------------------------------------------
>
> Key: WFLY-3698
> URL: https://issues.jboss.org/browse/WFLY-3698
> Project: WildFly
> Issue Type: Feature Request
> Components: CDI / Weld, JPA / Hibernate
> Affects Versions: 8.1.0.Final
> Environment: Windows 8.1 64 bits, Notebook Lenovo Z570 Intel Core i7 (2nd Gen) 2670QM / 2.2 GHz , 8GB RAM, using Eclipse Luna to develop
> Reporter: Oscar Calderon
> Assignee: Stuart Douglas
> Original Estimate: 1 week
> Remaining Estimate: 1 week
>
> I have a project running Spring 4 & JSF 2.1 using Primefaces 5 and Hibernate JPA 2.0. I use Wildfly 8.1 and configured a datasource pointing to an Oracle 10 database. The Wildfly datasource works fine (i've tested using plain JDBC) but when i try to create a LocalContainerEntityManagerFactoryBean through Spring i set the property persistenceUnitName to specify the name of my PU and then injecting in my DAOs using @PersistenceContext(unitName="myPersUnit").
> Using JBoss AS 7.1.1 Final works fine and even i don't need to specify persistenceUnitName and it creates as "default" and injects it to my DAOs without specifying name, but with JBoss 8.1 Final it doesn't work. With the same configuration, it shows me the next error:
> Error injecting persistence unit into CDI managed bean. Can't find a persistence unit named persUnit in deployment
> But, when i remove the @PersistenceContext annotation from my property in my DAO, strangely it initializes the persistenceUnit as i can see in server log:
> 08:19:57,144 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-13) HHH000204: Processing PersistenceUnitInfo [
> name: persUnit
> ...]
> But when i try to inject it, it doesn't
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (DROOLS-698) GlobalDateExtractor should not use java.sql.Date
by Tibor Foris (JIRA)
Tibor Foris created DROOLS-698:
----------------------------------
Summary: GlobalDateExtractor should not use java.sql.Date
Key: DROOLS-698
URL: https://issues.jboss.org/browse/DROOLS-698
Project: Drools
Issue Type: Bug
Affects Versions: 6.1.0.Final
Reporter: Tibor Foris
Assignee: Mark Proctor
The GlobalDateExtractor class uses java.sql.Date instead of java.util.Date.
This leads to class cast exceptions (java.sql.Date against java.util.Date) when using globals of type date (java.util.Date).
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (WFLY-4226) Administration and runtime tabs do not open on HTTP administrative (Web Console) interface
by Chao Wang (JIRA)
[ https://issues.jboss.org/browse/WFLY-4226?page=com.atlassian.jira.plugin.... ]
Chao Wang commented on WFLY-4226:
---------------------------------
I can see similar issue while opening "Deployments" tab with current wildfly master, it displays:
{noformat}
The page at localhost:9990 says:
Lost connection to the server
{noformat}
After clicking for a few times, I can see the correct content under "Deployments". Also, when I switched to Firefox, I did not see this problem.
My chrome Version 39.0.2171.95 (64-bit)
> Administration and runtime tabs do not open on HTTP administrative (Web Console) interface
> ------------------------------------------------------------------------------------------
>
> Key: WFLY-4226
> URL: https://issues.jboss.org/browse/WFLY-4226
> Project: WildFly
> Issue Type: Bug
> Components: Web Console
> Affects Versions: 8.2.0.Final
> Environment: Linux, JRE 7
> Reporter: Renan Polo Montebelo
> Assignee: Heiko Braun
> Priority: Critical
>
> I get a "connection lost" error when trying to access Administration or Runtime tabs in the Web Console. Occurs after upgraded to 8.2.0 via patch both on Linux and Windows environments.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (DROOLS-687) Helpful error message for MvelConstraint
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-687?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-687.
--------------------------------
Fix Version/s: 6.2.0.Final
Resolution: Done
I fixed it in the new version of mvel 2.2.3.Final + this https://github.com/droolsjbpm/drools/commit/2d86a327fae6fd0496ad5241191e2...
> Helpful error message for MvelConstraint
> ----------------------------------------
>
> Key: DROOLS-687
> URL: https://issues.jboss.org/browse/DROOLS-687
> Project: Drools
> Issue Type: Enhancement
> Affects Versions: 6.2.0.CR4
> Reporter: Toshiya Kobayashi
> Assignee: Mario Fusco
> Priority: Critical
> Fix For: 6.2.0.Final
>
>
> When you hit NullPointerException with LHS constraint during runtime, the error message is not very helpful for users to detect the root cause.
> For example,
> {noformat}
> rule 'hello person'
> when
> Person( address.street == 'abbey' )
> then
> end
> {noformat}
> If Person.address is null, the error message is:
> {noformat}
> [Error: null pointer: address.street]
> [Near : {... address.street == "abbey" ....}]
> ^
> [Line: 1, Column: 1]
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:427)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140)
> at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
> at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:117)
> at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86)
> at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
> at org.mvel2.MVEL.executeExpression(MVEL.java:930)
> at org.drools.core.util.MVELSafeHelper$RawMVELEvaluator.executeExpression(MVELSafeHelper.java:481)
> at org.drools.core.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:77)
> at org.drools.core.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:62)
> at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:226)
> at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:183)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:138)
> at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:60)
> at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:290)
> at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:253)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:281)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:241)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1481)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1436)
> at org.drools.compiler.integrationtests.Misc2Test.testMvelConstraintErrorMessage(Misc2Test.java:7086)
> ...
> Caused by: java.lang.NullPointerException
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:393)
> ... 46 more
> {noformat}
> Users cannot identify which rule is associated with the constraint when they have many similar rules. Also users cannot identify which fact (Person) caused the issue when they insert many facts.
> I'm not sure if it's really possible to provide a better message in this case. But I filed this as an enhancement request.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months
[JBoss JIRA] (DROOLS-687) Helpful error message for MvelConstraint
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-687?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-687:
------------------------------------------------
Mario Fusco <mfusco(a)redhat.com> changed the Status of [bug 1182517|https://bugzilla.redhat.com/show_bug.cgi?id=1182517] from NEW to MODIFIED
> Helpful error message for MvelConstraint
> ----------------------------------------
>
> Key: DROOLS-687
> URL: https://issues.jboss.org/browse/DROOLS-687
> Project: Drools
> Issue Type: Enhancement
> Affects Versions: 6.2.0.CR4
> Reporter: Toshiya Kobayashi
> Assignee: Mario Fusco
> Priority: Critical
>
> When you hit NullPointerException with LHS constraint during runtime, the error message is not very helpful for users to detect the root cause.
> For example,
> {noformat}
> rule 'hello person'
> when
> Person( address.street == 'abbey' )
> then
> end
> {noformat}
> If Person.address is null, the error message is:
> {noformat}
> [Error: null pointer: address.street]
> [Near : {... address.street == "abbey" ....}]
> ^
> [Line: 1, Column: 1]
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:427)
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:140)
> at org.mvel2.ast.ASTNode.optimize(ASTNode.java:159)
> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
> at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:117)
> at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86)
> at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:113)
> at org.mvel2.MVEL.executeExpression(MVEL.java:930)
> at org.drools.core.util.MVELSafeHelper$RawMVELEvaluator.executeExpression(MVELSafeHelper.java:481)
> at org.drools.core.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:77)
> at org.drools.core.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:62)
> at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:226)
> at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:183)
> at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:138)
> at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:60)
> at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:290)
> at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:253)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:281)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:241)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1481)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1436)
> at org.drools.compiler.integrationtests.Misc2Test.testMvelConstraintErrorMessage(Misc2Test.java:7086)
> ...
> Caused by: java.lang.NullPointerException
> at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:393)
> ... 46 more
> {noformat}
> Users cannot identify which rule is associated with the constraint when they have many similar rules. Also users cannot identify which fact (Person) caused the issue when they insert many facts.
> I'm not sure if it's really possible to provide a better message in this case. But I filed this as an enhancement request.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
7 years, 3 months