[JBoss JIRA] Created: (JBRULES-2975) Cannot use constant from Enum declared in class any more
by Wolfgang Laun (JIRA)
Cannot use constant from Enum declared in class any more
---------------------------------------------------------
Key: JBRULES-2975
URL: https://issues.jboss.org/browse/JBRULES-2975
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.M2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Priority: Critical
Note that this was running with a build made around 2011-02-10!
Given the class
public class Triangle {
public enum Type {
INCOMPLETE, UNCLASSIFIED,
EQUILATERAL, ISOSCELES, RECTANGLED, ISOSCELES_RECTANGLED, ACUTE, OBTUSE;
}
private int alpha;
private int beta;
private int gamma;
private Type type;
public Triangle( int alpha, int beta ) {
this.alpha = alpha;
this.beta = beta;
this.type = Type.UNCLASSIFIED;
}
// getters, setter,...
}
and the rule
rule equilateral
when
$t: Triangle( type == Triangle.Type.UNCLASSIFIED,
alpha == beta && == gamma )
then
modify( $t ){ setType( Triangle.Type.EQUILATERAL ) }
end
this fails with
Exception in thread "main" org.drools.RuntimeDroolsException: [Error: object is not an instance of declaring class]
[Near : {... Triangle.Type.UNCLASSIFIED ....}]
^
[Line: 1, Column: 1]
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:258)
at org.drools.rule.VariableConstraint.isAllowed(VariableConstraint.java:103)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:134)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:450)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:378)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:185)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:143)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:332)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:293)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:905)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:864)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:251)
at rss.drools.setup.Application.insert(Application.java:141)
at ex4.Main.makeFacts(Main.java:35)
at rss.drools.setup.Application.execute(Application.java:83)
at ex4.Main.main(Main.java:40)
Caused by: [Error: object is not an instance of declaring class]
[Near : {... Triangle.Type.UNCLASSIFIED ....}]
^
[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:158)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:115)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:87)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:125)
at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:118)
at org.mvel2.MVEL.executeExpression(MVEL.java:954)
at org.drools.base.mvel.MVELReturnValueExpression.evaluate(MVELReturnValueExpression.java:88)
at org.drools.rule.ReturnValueRestriction.isAllowed(ReturnValueRestriction.java:247)
... 15 more
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:514)
at org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:335)
... 24 more
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] Created: (JBAS-9243) Management Port sharing port 8080
by Jim Tyrrell (JIRA)
Management Port sharing port 8080
---------------------------------
Key: JBAS-9243
URL: https://issues.jboss.org/browse/JBAS-9243
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 7.0.0.Beta2
Reporter: Jim Tyrrell
While it is great and there are many good reason to have a management console on a different port then the standard 8080 web ports, it should be possible to use port 8080 or equivalent for a management console and another port needing to be open should not be required, but can be a selectable feature.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[JBoss JIRA] Created: (JGRP-1002) Merge: make the coordinator remain the same if possible after a merge
by Bela Ban (JIRA)
Merge: make the coordinator remain the same if possible after a merge
---------------------------------------------------------------------
Key: JGRP-1002
URL: https://jira.jboss.org/jira/browse/JGRP-1002
Project: JGroups
Issue Type: Feature Request
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.0
When we have {C, A, B} and split into {C,A} and {B}, then a merge will produce {A,B,C}. Therefore the coord is moved from C to A. For certain apps, e.g. JBoss singletons, this is not good, as we're moving the singleton services from a perfectly healthy node to a different node.
GOAL: come up with a deterministic policy of picking a coord such that we minimize coord switching if the existing coord is still member of the cluster.
This depends on or is related to the flexible coord pick policy JIRA issue
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months