ConcurrentModificationException in Esper 3.2.0

View: New views
10 Messages — Rating Filter:   Alert me  

ConcurrentModificationException in Esper 3.2.0

by Gerco Dries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by  
the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a  
unique
id for the call. I'm trying to count the number of waiting calls with  
the
following EPL query:

        insert into NumberOfWaitingCalls(calls)
        select count(*)
        from pattern[every call=CallWaiting ->
                (not CallFinished(id=call.id) and
                 not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
        at
com
.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
        at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:
380
)
        at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
        at
nl
.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
        at
org
.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
        ... 10 more
Caused by: java.util.ConcurrentModificationException
        at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
        at java.util.LinkedList$ListItr.next(LinkedList.java:696)
        at
com
.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
        at
com
.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
        at
com
.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
        at
com
.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
        at
com
.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
        at
com
.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
        at
com
.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
        at
com
.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
        ... 19 more

I think it must be something in the expression, because when I remove  
this
statement from Esper, everything works fine (I have a few other  
statements
as well). When I remove all statements except for the one mentioned  
above,
the exception still happens. I'm using JMS to put the messages into  
Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: ConcurrentModificationException in Esper 3.2.0

by Alexandre Vasseur :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email




Re: ConcurrentModificationException in Esper 3.2.0

by Thomas Bernhardt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I have been able to reproduce this and created a JIRA to track http://jira.codehaus.org/browse/ESPER-402

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc examples and timer:interval, please revise statement.

Best regards,
Tom

From: Alexandre Vasseur <avasseur@...>
To: user@...
Sent: Monday, September 28, 2009 5:17:35 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





Re: ConcurrentModificationException in Esper 3.2.0

by Gerco Dries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a JUnit 4 testcase that fails with ConcurrentModificationException on Esper 3.2.0.

Gerco.




On 28 sep 2009, at 23:17, Alexandre Vasseur wrote:

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email





TestCoModificationException.java (1K) Download Attachment

Re: ConcurrentModificationException in Esper 3.2.0

by Gerco Dries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What I want to do is check if the call has either been picked up by an operator (CallPickedUp) or finished (CallFinished). All calls are guaranteed to have one or both of these events so I figured the time interval to be irrelevant. I could put a 8 hour interval on the statement of course but that wouldn't really make sense functionally.

Or am I misunderstanding something?

Gerco.

On 28 sep 2009, at 23:44, Thomas Bernhardt wrote:

I have been able to reproduce this and created a JIRA to track http://jira.codehaus.org/browse/ESPER-402

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc examples and timer:interval, please revise statement.

Best regards,
Tom

From: Alexandre Vasseur <avasseur@...>
To: user@...
Sent: Monday, September 28, 2009 5:17:35 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email







Re: ConcurrentModificationException in Esper 3.2.0

by Thomas Bernhardt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
The pattern only fires when the absence has been detected, i.e.
every A -> (timer:interval(10) and not B)
... fires 10 seconds after arrival of A.
Just using "not A and not B" is true right from the start, see docs.
-Tom

From: Gerco Dries <gdr@...>
To: user@...
Sent: Monday, September 28, 2009 5:48:39 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

What I want to do is check if the call has either been picked up by an operator (CallPickedUp) or finished (CallFinished). All calls are guaranteed to have one or both of these events so I figured the time interval to be irrelevant. I could put a 8 hour interval on the statement of course but that wouldn't really make sense functionally.

Or am I misunderstanding something?

Gerco.

On 28 sep 2009, at 23:44, Thomas Bernhardt wrote:

I have been able to reproduce this and created a JIRA to track http://jira.codehaus.org/browse/ESPER-402

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc examples and timer:interval, please revise statement.

Best regards,
Tom

From: Alexandre Vasseur <avasseur@...>
To: user@...
Sent: Monday, September 28, 2009 5:17:35 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email








Re: ConcurrentModificationException in Esper 3.2.0

by Gerco Dries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, it's supposed to be true from the start until a CallPickedUp or CallFinished event is sent. Anyway, I've used a different solution now using a named window and it seems to work alright. These are the statements I'm using at the moment:

create window WaitingCalls.win:keepall() (id String)

insert into WaitingCalls(id) select id from CallWaiting

on CallPickedUp as call delete from WaitingCalls waiting where waiting.id=call.id

on CallFinished as call delete from WaitingCalls waiting where waiting.id=call.id

insert into NumberOfWaitingCalls(numberOfCalls)
  select count(*) from WaitingCalls

I still need to limit the number of NumberOfWaitingCalls events, because now the event is fired whenever the count(*) changes. Once every few seconds would be more than enough. I'll go hit the docs for that.

Gerco.

On 29 sep 2009, at 00:02, Thomas Bernhardt wrote:

The pattern only fires when the absence has been detected, i.e.
every A -> (timer:interval(10) and not B)
... fires 10 seconds after arrival of A.
Just using "not A and not B" is true right from the start, see docs.
-Tom

From: Gerco Dries <gdr@...>
To: user@...
Sent: Monday, September 28, 2009 5:48:39 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

What I want to do is check if the call has either been picked up by an operator (CallPickedUp) or finished (CallFinished). All calls are guaranteed to have one or both of these events so I figured the time interval to be irrelevant. I could put a 8 hour interval on the statement of course but that wouldn't really make sense functionally.

Or am I misunderstanding something?

Gerco.

On 28 sep 2009, at 23:44, Thomas Bernhardt wrote:

I have been able to reproduce this and created a JIRA to track http://jira.codehaus.org/browse/ESPER-402

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc examples and timer:interval, please revise statement.

Best regards,
Tom

From: Alexandre Vasseur <avasseur@...>
To: user@...
Sent: Monday, September 28, 2009 5:17:35 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:
Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email










Re: ConcurrentModificationException in Esper 3.2.0

by luri ron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i received the ConcurrentMoficationException using esper 3.1.0 for the following simple pattern.  will there a quick patch for this exception?  what is the alternative to achieve the same output from the following pattern?  thanks!

pattern:
every a=A -> (not b=B(a.stringAttr=b.stringAttr) and not c=C(a.stringAttr=c.stringAttr)) and timer:interval(10)

events:
event[A0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[B0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[A1]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[C0]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[A2]: longAttr(0),doubleAttr(0), stringAttr(111), timeAttrInMilli(0)

Re: ConcurrentModificationException in Esper 3.2.0

by Thomas Bernhardt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
We are tracking through http://jira.codehaus.org/browse/ESPER-402
Patches are always issued for the current release unless under commercial support.

Best regards,
Tom

From: luri ron <lrmillennium@...>
To: user@...
Sent: Tuesday, September 29, 2009 10:32:04 AM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0


i received the ConcurrentMoficationException using esper 3.1.0 for the
following simple pattern.  will there a quick patch for this exception?
what is the alternative to achieve the same output from the following
pattern?  thanks!

pattern:
every a=A -> (not b=B(a.stringAttr=b.stringAttr) and not
c=C(a.stringAttr=c.stringAttr)) and timer:interval(10)

events:
event[A0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[B0]: longAttr(0),doubleAttr(0), stringAttr(1), timeAttrInMilli(0)
event[A1]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[C0]: longAttr(0),doubleAttr(0), stringAttr(11), timeAttrInMilli(0)
event[A2]: longAttr(0),doubleAttr(0), stringAttr(111), timeAttrInMilli(0)

--
View this message in context: http://www.nabble.com/ConcurrentModificationException-in-Esper-3.2.0-tp25651632p25664070.html
Sent from the Esper User list mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




RE: ConcurrentModificationException in Esper 3.2.0

by Gerco Dries-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

I have another similar query that works fine:

 

      insert into CallerGaveUp(id)

      select call.id

      from pattern[every call=CallWaiting ->

            (CallFinished(id=call.id) and not CallPickedUp(id=call.id))]

 

How would you suggest that a timer makes this query more meaningful? I can’t figure out where to insert a timer that would make this query make more sense. The idea is that the caller gave up whenever a CallFinished event for that call occurs before a CallPickedUp event for that call. Should I modify it to consider only calls from a certain time window?

 

Gerco.

 

Van: Thomas Bernhardt [mailto:bernhardttom@...]
Verzonden: maandag 28 september 2009 23:44
Aan: user@...
Onderwerp: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

 

I have been able to reproduce this and created a JIRA to track http://jira.codehaus.org/browse/ESPER-402

Note that a NOT-operator does not likely have meaningful behavior unless combined with a timer, since looking for the absence of an event makes sense only when given a time period how long to look for, see doc examples and timer:interval, please revise statement.

Best regards,
Tom


From: Alexandre Vasseur <avasseur@...>
To: user@...
Sent: Monday, September 28, 2009 5:17:35 PM
Subject: Re: [esper-user] ConcurrentModificationException in Esper 3.2.0

Hi
Can you provide a test case if the problem arise in a that simple scenario?
thanks
Alex

On Mon, Sep 28, 2009 at 9:43 PM, Gerco Dries <gdr@...> wrote:

Hi everyone,

I'm trying out Esper 3.2.0 because we may want to include it in an offer
we are making to one of our customers. I'm trying to simulate a
CallCentre, receiving calls, waiting calls and calls being hung up by the
caller.

The events I'm sending are very simple, CallWaiting, CallPickedUp and
CallFinished. All of them have a single property called "id" with a unique
id for the call. I'm trying to count the number of waiting calls with the
following EPL query:

       insert into NumberOfWaitingCalls(calls)
       select count(*)
       from pattern[every call=CallWaiting ->
               (not CallFinished(id=call.id) and
                not CallPickedUp(id=call.id))]

This is supposed to publish an NumberOfWaitingCalls event whenever the
number of waiting calls changes. I want it to publish an event every 5
seconds, but can't quite figure out the syntax for that.

My problem is that whenever I send an event into Esper with the previous
statement active, I get the following Exception:

com.espertech.esper.client.EPException:
java.util.ConcurrentModificationException
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:402)
       at
com.espertech.esper.core.EPRuntimeImpl.processEvent(EPRuntimeImpl.java:380
)
       at
com.espertech.esper.core.EPRuntimeImpl.sendEvent(EPRuntimeImpl.java:236)
       at
nl.progaiars.espertest.DocumentInputAdapter.handleDocument(DocumentInputAd
apter.java:16)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
pl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at
org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:276)
       at
org.springframework.jms.listener.adapter.MessageListenerAdapter.invokeList
enerMethod(MessageListenerAdapter.java:466)
       ... 10 more
Caused by: java.util.ConcurrentModificationException
       at
java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:761)
       at java.util.LinkedList$ListItr.next(LinkedList.java:696)
       at
com.espertech.esper.pattern.EvalAndStateNode.start(EvalAndStateNode.java:6
9)
       at
com.espertech.esper.pattern.EvalFollowedByStateNode.evaluateTrue(EvalFollo
wedByStateNode.java:111)
       at
com.espertech.esper.pattern.EvalEveryStateNode.evaluateTrue(EvalEveryState
Node.java:189)
       at
com.espertech.esper.pattern.EvalFilterStateNode.evaluateTrue(EvalFilterSta
teNode.java:90)
       at
com.espertech.esper.pattern.EvalFilterStateNode.matchFound(EvalFilterState
Node.java:148)
       at
com.espertech.esper.core.EPRuntimeImpl.processStatementFilterSingle(EPRunt
imeImpl.java:1031)
       at
com.espertech.esper.core.EPRuntimeImpl.processMatches(EPRuntimeImpl.java:8
24)
       at
com.espertech.esper.core.EPRuntimeImpl.processWrappedEvent(EPRuntimeImpl.j
ava:398)
       ... 19 more

I think it must be something in the expression, because when I remove this
statement from Esper, everything works fine (I have a few other statements
as well). When I remove all statements except for the one mentioned above,
the exception still happens. I'm using JMS to put the messages into Esper
and I'm using only a single thread for the entire application.

Can anyone help me figure out what's going on or what I'm doing wrong?

Best regards,
Gerco Dries.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email