[JBoss JIRA] (JBRULES-3622) ClassCastException When Using Temporal Operator overlappedby
by Julian Klein (JIRA)
Julian Klein created JBRULES-3622:
-------------------------------------
Summary: ClassCastException When Using Temporal Operator overlappedby
Key: JBRULES-3622
URL: https://issues.jboss.org/browse/JBRULES-3622
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.4.0.Final
Environment: Mac OSX 10.6.8, Java 6
Reporter: Julian Klein
Assignee: Mark Proctor
When trying to determine if two dates overlap using the overlappedby keyword with parameters in a rule, Drools throws a ClassCastException. If I use another temporal keyword such as "overlaps" with parameters, the rule works as expected. I am using a StatefulKnowledgeSession and this occurs after I insert facts into the session. The facts I insert are of a different type than TimeBoxedFact. The LHS is as follows:
{code}
$encD : TimeBoxedFact(yearRecorded == durationCycleYear )
$encN : TimeBoxedFact( ID != $encD.ID, datetimeRecorded coincides[1ms,90d] $encD.datetimeRecorded )
{code}
durationCycleYear is a global Integer equal to the four digit year (e.g. 2012 or 1998; declared as follows "global Integer durationCycleYear;")
Here is what the TimeBoxedFact object looks like:
{code}
package com.company;
import java.io.Serializable;
import java.sql.Timestamp;
public class TimeBoxedFact implements Serializable{
protected Timestamp datetime = null;
protected int ID;
private static final long serialVersionUID = -7640003804511140444L;
public int getID() {
return this.ID;
}
public void setID(int id) {
this.ID = id;
}
public Timestamp getDatetimeRecorded() {
return this.datetime;
}
public java.util.Date getDateRecorded(){
return new java.util.Date(this.datetime.getTime());
}
public int getYearRecorded(){
return calendarDateRecorded.get(Calendar.YEAR);
}
public void setDatetimeRecorded(Timestamp dt) {
this.datetime = dt;
//create the calendar object
calendarDateRecorded = Calendar.getInstance();
calendarDateRecorded.setTimeInMillis(datetime.getTime());
}
}
{code}
The stack trace is as follows:
{code}
java.lang.ClassCastException: org.drools.common.DefaultFactHandle cannot be cast to com.company.TimeBoxedFact
at org.drools.base.com.company.TimeBoxedFact1639733674$getDatetimeRecorded.getValue(Unknown Source)
at org.drools.base.extractors.BaseObjectClassFieldReader.isNullValue(BaseObjectClassFieldReader.java:179)
at org.drools.base.ClassFieldReader.isNullValue(ClassFieldReader.java:179)
at org.drools.rule.VariableRestriction$ObjectVariableContextEntry.updateFromTuple(VariableRestriction.java:327)
at org.drools.common.DoubleBetaConstraints.updateFromTuple(DoubleBetaConstraints.java:137)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:84)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:71)
at org.drools.reteoo.JoinNode.assertLeftTuple(JoinNode.java:98)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:145)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:364)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:337)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:298)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:888)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847)
at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269)
at com.company.RulesRunner.persistAndInsertBRE(RulesRunner.java:267)
at com.company.RulesRunner.runRules(RulesRunner.java:249)
at com.company.testProtocol_0_In90Days(Test025.java:205)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:76)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] (AS7-5525) Make filters string based
by Tomaz Cerar (JIRA)
Tomaz Cerar created AS7-5525:
--------------------------------
Summary: Make filters string based
Key: AS7-5525
URL: https://issues.jboss.org/browse/AS7-5525
Project: Application Server 7
Issue Type: Enhancement
Components: Logging
Affects Versions: 7.2.0.Alpha1
Reporter: Tomaz Cerar
Assignee: James Perkins
Fix For: 7.2.0.CR1
filters are now complex object graph, but it would make more sense that they are converted to simple string that operations can parse and use internally.
backward compatibility should be provided via transformers.
this issue is continuation of work started in AS7-4788
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] (AS7-5524) Lifecycle and injections ignored in @ManagedBean dynamic Servlet
by Cheng Fang (JIRA)
Cheng Fang created AS7-5524:
-------------------------------
Summary: Lifecycle and injections ignored in @ManagedBean dynamic Servlet
Key: AS7-5524
URL: https://issues.jboss.org/browse/AS7-5524
Project: Application Server 7
Issue Type: Bug
Components: Web
Affects Versions: 7.2.0.Alpha1
Reporter: Cheng Fang
Assignee: Remy Maucherat
These classes are annotated with javax.annotation.ManagedBean, and added as dynamic servlet. The regular request processing works, but all lifecycle callback methods and resource injectsions in this dynamic servlet class are ignored.
Since this class is a managed bean, these annotations need to be honored, though dynamic servelt itself does not require so.
{quote}
4.4.3.5 Annotation processing requirements for programmatically added Servlets, Filters and Listeners
Resource injection on all components (Servlets, Filters and Listeners) added programmatically or created programmatically, other than the ones added via the methods that takes an instance, will only be supported when the component is a Managed Bean.
{quote}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] (AS7-5369) Allow direct text value in parameter element.
by Tomaz Cerar (JIRA)
Tomaz Cerar created AS7-5369:
--------------------------------
Summary: Allow direct text value in parameter element.
Key: AS7-5369
URL: https://issues.jboss.org/browse/AS7-5369
Project: Application Server 7
Issue Type: Bug
Components: POJO
Affects Versions: 7.1.1.Final
Reporter: Tomaz Cerar
Assignee: Ales Justin
Fix For: 7.1.3.Final (EAP), 7.1.2.Final (EAP)
pojo subsystem should allow both formats for defining paramters
currently only second format is accepted
{noformat}
<bean name="ParamTextValue" class="org.jboss.as.test.integration.pojo.support.TInjectee">
<constructor>
<parameter>Wazup, </parameter>
</constructor>
<install method="sayHello">
<parameter><value>POJO subsystem!</value></parameter>
</install>
</bean>
{nofomrat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months
[JBoss JIRA] (AS7-5521) CLONE - Warn "IllegalStateException: channel is not connected" on clean shutdown
by Radoslav Husar (JIRA)
Radoslav Husar created AS7-5521:
-----------------------------------
Summary: CLONE - Warn "IllegalStateException: channel is not connected" on clean shutdown
Key: AS7-5521
URL: https://issues.jboss.org/browse/AS7-5521
Project: Application Server 7
Issue Type: Bug
Components: Clustering
Reporter: Radoslav Husar
Assignee: Paul Ferraro
Fix For: 7.1.3.Final (EAP)
The current fix in for AS7-5442 doesn't result in a timeout exception, Infinispan now checks whether channel is open however results in a WARN message.
Looks like AS is closing the channel before the cache is stopped.
{noformat}
[JBossINF] 06:25:23,758 INFO [org.jboss.as.clustering.infinispan] JBAS010282: Stopped default-host/clusterbench cache from web container
[JBossINF] 06:25:23,767 INFO [org.jboss.as.server.deployment] JBAS015877: Stopped deployment clusterbench-ee6-ejb.jar in 1061ms
[JBossINF] 06:25:23,765 WARN [org.infinispan.cacheviews.CacheViewsManagerImpl] ISPN000169: Error committing cache view 5 for cache default-host/clusterbench: org.infinispan.CacheException: java.lang.IllegalStateException: channel is not connected
[JBossINF] at org.infinispan.util.Util.rewrapAsCacheException(Util.java:526) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:139) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.remoting.transport.jgroups.JGroupsTransport.invokeRemotely(JGroupsTransport.java:492) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterCommitView(CacheViewsManagerImpl.java:378) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.cacheviews.CacheViewsManagerImpl.clusterInstallView(CacheViewsManagerImpl.java:272) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.cacheviews.CacheViewsManagerImpl$ViewInstallationTask.call(CacheViewsManagerImpl.java:894) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_30]
[JBossINF] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_30]
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30]
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30]
[JBossINF] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]
[JBossINF] Caused by: java.lang.IllegalStateException: channel is not connected
[JBossINF] at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.down(MessageDispatcher.java:619) [jgroups-3.0.14.Final.jar:3.0.14.Final]
[JBossINF] at org.jgroups.blocks.RequestCorrelator.sendUnicastRequest(RequestCorrelator.java:193) [jgroups-3.0.14.Final.jar:3.0.14.Final]
[JBossINF] at org.jgroups.blocks.UnicastRequest.sendRequest(UnicastRequest.java:44) [jgroups-3.0.14.Final.jar:3.0.14.Final]
[JBossINF] at org.jgroups.blocks.Request.execute(Request.java:83) [jgroups-3.0.14.Final.jar:3.0.14.Final]
[JBossINF] at org.jgroups.blocks.MessageDispatcher.sendMessageWithFuture(MessageDispatcher.java:419) [jgroups-3.0.14.Final.jar:3.0.14.Final]
[JBossINF] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.processCalls(CommandAwareRpcDispatcher.java:329) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.invokeRemoteCommands(CommandAwareRpcDispatcher.java:132) [infinispan-core-5.1.7-SNAPSHOT.jar:5.1.7-SNAPSHOT]
[JBossINF] ... 9 more
[JBossINF]
[JBossINF] 06:25:23,768 INFO [org.jboss.as.server.deployment] JBAS015877: Stopped deployment clusterbench-ee6-web-granular.war in 1062ms
[JBossINF] 06:25:23,769 INFO [org.jboss.as.server.deployment] JBAS015877: Stopped deployment clusterbench-ee6-web.war in 1063ms
[JBossINF] 06:25:23,770 INFO [org.jboss.as.server.deployment] JBAS015877: Stopped deployment clusterbench-ee6.ear in 1076ms
[JBossINF] 06:25:24,128 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] ISPN000082: Stopping the RpcDispatcher
[JBossINF] 06:25:24,132 INFO [org.jboss.as] JBAS015950: JBoss AS 7.1.3.Final-SNAPSHOT "Arges" stopped in 1337ms
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 9 months