felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Broekhuis <a.broekh...@gmail.com>
Subject Re: How to handle "java.lang.IllegalStateException: The EventAdmin is stopped" during shutdown
Date Wed, 05 Jan 2011 10:55:02 GMT
Hi,

I am using version 1.2.8.

Also, it seems that the InterruptedException only occurs when starting
with no cache.

Stacktraces:
WARNING: EventAdmin: Exception: java.lang.InterruptedException
(java.lang.InterruptedException)
java.lang.InterruptedException
	at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.offer(Unknown Source)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(Unknown Source)
	at org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool.executeTask(DefaultThreadPool.java:110)
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:223)
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:680)
Exception in thread "Abc Event Test Generator"
java.lang.IllegalStateException: The EventAdmin is stopped
	at org.apache.felix.eventadmin.impl.EventAdminImpl$1.createHandlerTasks(EventAdminImpl.java:133)
	at org.apache.felix.eventadmin.impl.EventAdminImpl.sendEvent(EventAdminImpl.java:106)
	at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:94)
	at example.mc.product.abc.middleware.testgenerator.AbcGenerator$1.run(AbcGenerator.java:60)
	at java.lang.Thread.run(Thread.java:680)


On 5 January 2011 11:49, Carsten Ziegeler <cziegeler@apache.org> wrote:
> Hi,
>
> which version of the event admin are you using? And can you post all
> exception stack traces you see?
>
>
> Thanks
> Carsten
>
> Alexander Broekhuis  wrote
>> Hello,
>>
>> I also see the following exception:
>>
>> WARNING: EventAdmin: Exception: java.lang.InterruptedException
>> (java.lang.InterruptedException)
>> java.lang.InterruptedException
>>       at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.offer(Unknown Source)
>>       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.execute(Unknown Source)
>>       at org.apache.felix.eventadmin.impl.dispatch.DefaultThreadPool.executeTask(DefaultThreadPool.java:110)
>>       at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:223)
>>       at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
>>       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
>>       at java.lang.Thread.run(Thread.java:680)
>>
>>
>> On 5 January 2011 08:28, Alexander Broekhuis <a.broekhuis@gmail.com> wrote:
>>> Hi all,
>>>
>>> In my project I am upgrading Felix (1.0.3) and the EventAdmin (1.0.0)
>>> to the latest version, and now during shutdown (using the shutdownhook
>>> and ctrl-c), I get an IllegalStateException indicating the eventadmin
>>> is stopped.
>>> The exception is thrown when trying to send events during shutdown.
>>> Somehow I expected the framework to deregister the EventAdmin service
>>> before actually stopping it, so the client wouldn't be able to use it
>>> anymore. Now the service is still available, but the actual behavior
>>> isn't.
>>> This exception blocks the shutdown, and the only way to stop the
>>> process is by killing it.
>>>
>>> How should I handle this case? Do I have to catch an
>>> IllegalStateException at all sendEvent call's?
>>>
>>> --
>>> With kind regards,
>>>
>>> Alexander Broekhuis
>>>
>>
>>
>>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Met vriendelijke groet,

Alexander Broekhuis

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message