[JBoss JIRA] Created: (JBRULES-3103) "A and not(B after A)" type rules don't fire when session clock has negative values (pre Unix epoch)
by Richard Calmbach (JIRA)
"A and not(B after A)" type rules don't fire when session clock has negative values (pre Unix epoch)
----------------------------------------------------------------------------------------------------
Key: JBRULES-3103
URL: https://issues.jboss.org/browse/JBRULES-3103
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core, drools-core (fusion)
Affects Versions: 5.2.0.Final
Reporter: Richard Calmbach
Assignee: Mark Proctor
See JBRULES-3100 for the gory details. The implementation described there causes two bugs, so THIS IS NOT A DUPLICATE of JBRULES-3100. Rather, the bugs are related, and because it is possible to fix one without the other, it makes sense to track both bugs explicitly, so that the developers can ensure that both bugs get fixed. The summary of this issue also conveys to users that this particular bug has already been reported.
So, *this* bug prevents rules of the form
$a: A()
not(B(this after $a))
or "A and not(B after A)" in pseudocode, from firing when they should if the session clock has a negative value, say during a simulation or if the system clock is turned back pre Unix epoch. This is confirmed for the pseudo clock, and I believe the real-time clock is equally affected. The root of the problem is that "A and not(B after A)" type rules get a duration of Long.MAX_VALUE assigned. When that gets added to a non-positive current time, it results in a very large positive number for the trigger time, which will never be reached by the session clock, preventing the rule from ever firing.
The fix is probably to add the activation for such a rule to the agenda immediately, rather than schedule it for adding. This would yield the same behavior as when you compare the timestamps explicitly. For now, comparing timestamps explicitly instead of using "after" is a workaround for this bug.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] Created: (JBAS-8845) JEE 6 application give errors when deploying
by Viggo Navarsete (JIRA)
JEE 6 application give errors when deploying
--------------------------------------------
Key: JBAS-8845
URL: https://issues.jboss.org/browse/JBAS-8845
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: JBoss 6.0.0.Final
Reporter: Viggo Navarsete
I've bundled an EAR with maven-ear-plugin (version 2.5-SNAPSHOT, with Java EE 6 features), where I've set the applicationName to tell how the JNDI tree should give names to my application.
Stacktrace:
21:14:29,954 WARN [org.jboss.profileservice.deployment.hotdeploy.HDScanner] Scan failed: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "jboss-switchboard:appName=mds,module=mds-console-web-1.1.9-SNAPSHOT" is missing the following dependencies:
Dependency "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataBean,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,module=mds-biz-ejb-1.1.9-SNAPSHOT,component=MDDValidatorBean,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **")
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,module=mds-biz-ejb-1.1.9-SNAPSHOT,component=MasterDataBean,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **")
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,module=mds-biz-ejb-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **")
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,module=mds-biz-ejb-1.1.9-SNAPSHOT,component=RbacBean,service=EjbEncFactory" is missing the following dependencies:
Dependency "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MDDValidatorBean,service=EJB3" is missing the following dependencies:
Dependency "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Dependency "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MDDValidatorBean" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MDDValidatorBean' **")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MDDValidatorBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MDDValidatorBean,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataBean,service=EJB3" is missing the following dependencies:
Dependency "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataBean" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataBean' **")
Dependency "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataBean,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataXMLValidatorBean,service=EJB3" is missing the following dependencies:
Dependency "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Dependency "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataXMLValidatorBean" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataXMLValidatorBean' **")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataXMLValidatorBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=MasterDataXMLValidatorBean,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=RbacBean,service=EJB3" is missing the following dependencies:
Dependency "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/RbacBean" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/RbacBean' **")
Dependency "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
Deployment "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=RbacBean,service=EJB3_endpoint" is missing the following dependencies:
Dependency "jboss.j2ee:ear=mds-ear-1.1.9-SNAPSHOT.ear,jar=mds-biz-ejb-1.1.9-SNAPSHOT.jar,name=RbacBean,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
Deployment "jboss.web.deployment:war=/mds-console-web" is missing the following dependencies:
Dependency "jboss-switchboard:appName=mds,module=mds-console-web-1.1.9-SNAPSHOT" (should be in state "Installed", but is actually in state "Deploy")
DEPLOYMENTS IN ERROR:
Deployment "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/RbacBean" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/RbacBean' **
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataXMLValidatorBean" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataXMLValidatorBean' **
Deployment "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MDDValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **
Deployment "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **
Deployment "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataBean" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MasterDataBean' **
Deployment "org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MDDValidatorBean" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb.bean.instantiator/mds-ear-1.1.9-SNAPSHOT/mds-biz-ejb-1.1.9-SNAPSHOT/MDDValidatorBean' **
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataXMLValidatorBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "jboss.ejb3:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT,service=EjbEncFactory" is in error due to the following reason(s): Described
Deployment "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=RbacBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **
Deployment "jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=mds-ear-1.1.9-SNAPSHOT,component=MasterDataBean,module=mds-biz-ejb-1.1.9-SNAPSHOT' **
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370) [:2.2.0.GA]
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82) [:6.0.0.Final]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.deploy(HDScanner.java:246) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner$HDScanAction.complete(HDScanner.java:192) [:0.2.2]
at org.jboss.profileservice.management.TwoPCActionWrapper.doComplete(TwoPCActionWrapper.java:57) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.complete(AbstractTwoPhaseModificationAction.java:74) [:0.2.2]
at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:95) [:0.2.2]
at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150) [:0.2.2]
at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:135) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.scan(HDScanner.java:146) [:0.2.2]
at org.jboss.profileservice.deployment.hotdeploy.HDScanner.run(HDScanner.java:90) [:0.2.2]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_22]
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [:1.6.0_22]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [:1.6.0_22]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [:1.6.0_22]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [:1.6.0_22]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
When I remove the applicationName it deploys correctly.
The maven-ear-plugin setup is like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<generateApplicationXml>true</generateApplicationXml>
<version>6</version> <!-- Only applicable when generateApplicationXml is true! (JEE version?!)-->
<applicationName>mds</applicationName>
<jboss>
<version>5</version> <!-- JBoss AS version -->
<library-directory>/lib</library-directory>
<loader-repository>com.tracetracker:loader=${project.build.finalName}.ear</loader-repository>
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</jboss>
</configuration>
</plugin>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] Created: (JBRULES-3161) CEP - event both in and out of time window at the same time
by Radai Rosenblatt (JIRA)
CEP - event both in and out of time window at the same time
-----------------------------------------------------------
Key: JBRULES-3161
URL: https://issues.jboss.org/browse/JBRULES-3161
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.2.0.Final
Environment: jre 6u24, windows 7 x64
Reporter: Radai Rosenblatt
Assignee: Mark Proctor
Priority: Critical
given this object:
public class Event {
private Date started;
private Date finished;
private long duration;
//getters and setters
}
the following drools code:
declare Event
@role( event )
@duration ( duration )
@timestamp( started )
end
rule "Event Exists In Window"
when
$eventOne : Event() over window:time( 1h ) from entry-point "Event Stream"
then
//nothing
end
rule "No Event Exists In Window"
when
not ( Event() over window:time( 1h ) from entry-point "Event Stream" )
then
//nothing
end
and the following scenario:
now-1.5h the event now+1h
|---------------------------------------|
the window
|------------------|
---------------------------------|-------------> T
now
(an event at time T that start at T-1.5h and ends at T+1h)
both of the above rules fire. im not sure which of them _should_ fire for this scenario, but im pretty sure its either one or the other (to my understanding the conditions are logically exclusive - there either exists an event in the window or there doesnt)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] Created: (JBRULES-3130) Regression. Rule misfires due to constraint list[0].field1/2 in two rules
by Wolfgang Laun (JIRA)
Regression. Rule misfires due to constraint list[0].field1/2 in two rules
-------------------------------------------------------------------------
Key: JBRULES-3130
URL: https://issues.jboss.org/browse/JBRULES-3130
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.2.0.Final
Reporter: Wolfgang Laun
Assignee: Mark Proctor
Priority: Critical
Fix For: 5.2.1.Final
A pair of constraints suich as list[0].a == null and list[0].b == null in two different rules causes one of the rules not to fire and the other one to fire erroneously (see results at the end).
Java:
================================================================
public class Three {
private String a;
private String b;
private String c;
public Three( String a, String b, String c ){
this.a = a;
this.b = b;
this.c = c;
}
public String getA(){ return a; }
public String getB(){ return b; }
public String getC(){ return c; }
}
================================================================
import java.util.*;
public class ListOfThree {
private List<Three> list;
private Class<?> clazz;
public ListOfThree( Three three, Class<?> clazz ){
list = new ArrayList<Three>();
list.add( three );
this.clazz = clazz;
}
public List<Three> getList(){ return list; }
public Class<?> getClazz(){ return clazz; }
}
================================================================
// Insertion of facts
Three three = new Three( "a", "b", "c" );
ListOfThree listof3 = new ListOfThree( three, java.lang.Object.class );
kSession.insert( listof3 );
three = new Three( "x", null, "z" );
listof3 = new ListOfThree( three, java.lang.String.class );
kSession.insert( listof3 );
three = new Three( null, "q", "r" );
listof3 = new ListOfThree( three, java.lang.Integer.class );
kSession.insert( listof3 );
===================================================================
rule 'rule1'
############################ dialect "mvel" ## does not matter
when
ListOfThree( list[0].a == null, $c: clazz );
then
System.out.println( "rule1 " + $c.getSimpleName() );
end
rule 'rule2'
############################ dialect "mvel" ## does not matter
when
ListOfThree( list[0].b == null, $c: clazz );
then
System.out.println( "rule2 " + $c.getSimpleName() );
end
=================================================================
Results:
rule2 Integer
rule1 Integer
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[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
13 years
[JBoss JIRA] Created: (JBREM-1297) Deadlock between MicroRemoteClientInvoker.establishLease and Client.notifyListeners
by Artur Karpinski (JIRA)
Deadlock between MicroRemoteClientInvoker.establishLease and Client.notifyListeners
-----------------------------------------------------------------------------------
Key: JBREM-1297
URL: https://issues.jboss.org/browse/JBREM-1297
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.5.4.SP2
Reporter: Artur Karpinski
Priority: Critical
Deadlock is probably caused by changes introduced in this fix: JBREM-1242.
Thread A:
1. MicroRemoteClientInvoker.terminateLease, locks clientLeaseLock
2. Client.notifyListeners, locks connectionValidatorLock
Thread B:
1. Client.setupClientLease, locks connectionValidatorLock
2. MicroRemoteClientInvoker.establishLease, locks connectionValidatorLock
Please check stacktraces when this deadlock occurred:
{code}
"Timer-16" - Thread t@486453
java.lang.Thread.State: BLOCKED
at org.jboss.remoting.Client.notifyListeners(Client.java:1873)
- waiting to lock <747c39d3> (a java.lang.Object) owned by "WorkManager(2)-241" t@6121
at org.jboss.remoting.LeasePinger.stopPing(LeasePinger.java:134)
at org.jboss.remoting.MicroRemoteClientInvoker.terminateLease(MicroRemoteClientInvoker.java:434)
- locked <751714e> (a java.lang.Object)
at org.jboss.remoting.ConnectionValidator$WaitOnConnectionCheckTimerTask.run(ConnectionValidator.java:1081)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
{code}
and
{code}
"WorkManager(2)-241" - Thread t@6121
java.lang.Thread.State: BLOCKED
at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:507)
- waiting to lock <751714e> (a java.lang.Object) owned by "Timer-16" t@486453
at org.jboss.remoting.Client.setupClientLease(Client.java:2056)
- locked <747c39d3> (a java.lang.Object)
at org.jboss.remoting.Client.connect(Client.java:1918)
at org.jboss.remoting.Client.connect(Client.java:737)
{code}
One way to fix this would be to add lock on connectionValidatorLock in MicroRemoteClientInvoker.terminateLease. I'm trying to analyse code to check if this fix will not introduce another deadlock problem.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] Created: (AS7-1230) Exception during message inflow is not properly logged
by Carlo de Wolf (JIRA)
Exception during message inflow is not properly logged
------------------------------------------------------
Key: AS7-1230
URL: https://issues.jboss.org/browse/AS7-1230
Project: Application Server 7
Issue Type: Bug
Reporter: Carlo de Wolf
Fix For: 7.1.0.CR1
{noformat}
11:56:03,323 ERROR [stderr] (jca-short-running-threads-threads - 2) java.lang.IllegalStateException: No component instance associated
11:56:03,323 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.ee.component.ViewDescription$ComponentDispatcherInterceptor.processInvocation(ViewDescription.java:196)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:146)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:287)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:76)
11:56:03,324 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.demos.ejb3.rar.PostmanPat$$$view17.deliver(Unknown Source)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at java.lang.reflect.Method.invoke(Method.java:597)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:140)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)
11:56:03,325 ERROR [stderr] (jca-short-running-threads-threads - 2) at $Proxy19.deliver(Unknown Source)
11:56:03,326 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.demos.ejb3.rar.SimpleQueueResourceAdapter.process(SimpleQueueResourceAdapter.java:112)
11:56:03,326 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.demos.ejb3.rar.SimpleQueueResourceAdapter.access$000(SimpleQueueResourceAdapter.java:51)
11:56:03,326 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.as.demos.ejb3.rar.SimpleQueueResourceAdapter$1.run(SimpleQueueResourceAdapter.java:79)
11:56:03,326 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.jca.core.workmanager.WorkWrapper.run(WorkWrapper.java:211)
11:56:03,326 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
11:56:03,327 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:801)
11:56:03,327 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
11:56:03,327 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:821)
11:56:03,327 ERROR [stderr] (jca-short-running-threads-threads - 2) at java.lang.Thread.run(Thread.java:662)
11:56:03,327 ERROR [stderr] (jca-short-running-threads-threads - 2) at org.jboss.threads.JBossThread.run(JBossThread.java:122)
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years