You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Alexander Broekhuis <a....@gmail.com> on 2011/01/05 08:28:30 UTC
How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi,
I've created an issue: https://issues.apache.org/jira/browse/FELIX-2997
On 13 June 2011 18:22, Carsten Ziegeler <cz...@apache.org> wrote:
> Am 08.06.11 10:19, schrieb Alexander Broekhuis:
>> Hi Carsten,
>>
>> It has been some time since I last tried newer versions of the
>> EventAdmin, but I am now testing the 1.2.12 version.
>> While I don't see the IllegalState problem any more, I do see a NPE
>> when shutting down the framework while sending events.
>> The stacktrace is:
>> Exception in thread "Event Test Generator" java.lang.NullPointerException
>> at org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.createHandlerTasks(BlacklistingHandlerTasks.java:116)
>> at org.apache.felix.eventadmin.impl.EventAdminImpl.sendEvent(EventAdminImpl.java:108)
>> at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:94)
>> at mc.product.fmcw.test.eventgenerator.FMCWGenerator$1.run(FMCWGenerator.java:55)
>> at java.lang.Thread.run(Thread.java:680)
>>
>>
>
> Yes, I think I saw this one as well occasionally - can you please create
> an issue for this one?
> I'll take care of it then.
>
> Regards
> Carsten
> --
> 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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
Am 08.06.11 10:19, schrieb Alexander Broekhuis:
> Hi Carsten,
>
> It has been some time since I last tried newer versions of the
> EventAdmin, but I am now testing the 1.2.12 version.
> While I don't see the IllegalState problem any more, I do see a NPE
> when shutting down the framework while sending events.
> The stacktrace is:
> Exception in thread "Event Test Generator" java.lang.NullPointerException
> at org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.createHandlerTasks(BlacklistingHandlerTasks.java:116)
> at org.apache.felix.eventadmin.impl.EventAdminImpl.sendEvent(EventAdminImpl.java:108)
> at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:94)
> at mc.product.fmcw.test.eventgenerator.FMCWGenerator$1.run(FMCWGenerator.java:55)
> at java.lang.Thread.run(Thread.java:680)
>
>
Yes, I think I saw this one as well occasionally - can you please create
an issue for this one?
I'll take care of it then.
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi Carsten,
It has been some time since I last tried newer versions of the
EventAdmin, but I am now testing the 1.2.12 version.
While I don't see the IllegalState problem any more, I do see a NPE
when shutting down the framework while sending events.
The stacktrace is:
Exception in thread "Event Test Generator" java.lang.NullPointerException
at org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.createHandlerTasks(BlacklistingHandlerTasks.java:116)
at org.apache.felix.eventadmin.impl.EventAdminImpl.sendEvent(EventAdminImpl.java:108)
at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:94)
at mc.product.fmcw.test.eventgenerator.FMCWGenerator$1.run(FMCWGenerator.java:55)
at java.lang.Thread.run(Thread.java:680)
On 14 February 2011 15:21, Carsten Ziegeler <cz...@apache.org> wrote:
> Hi,
>
> I just fixed another shutdown problem in the event admin, so maybe you
> want to try latest version from svn trunk
>
> Regards
> Carsten
>
> Am 17.01.11 17:35, schrieb Alexander Broekhuis:
>> Hi Carsten,
>>
>> Will do, I also tested with older versions, and 1.0.0 works ok. So I
>> will use that version for now.
>>
>>
>> On 17 January 2011 17:02, Carsten Ziegeler <cz...@apache.org> wrote:
>>> Hi Alex,
>>>
>>> ok, can you please file a bug and attach the source for your code so we
>>> can easily reproduce the problem?
>>>
>>> Thanks
>>> Carsten
>>>
>>> Am 17.01.11 11:02, schrieb Alexander Broekhuis:
>>>> Hi,
>>>>
>>>> Is there any update for this problem? I changed my code to use a
>>>> service tracker, and the same happens. So it doesn't seem to be
>>>> related to the use of the Dependence Manager.
>>>>
>>>> On 12 January 2011 07:16, Alexander Broekhuis <a....@gmail.com> wrote:
>>>>> Hi Pierre,
>>>>>
>>>>> The DM version I use is 2.0.1, and not trunk. So don't think it can be
>>>>> the compat bundle..
>>>>>
>>>>> But thanks for looking into it!
>>>>>
>>>>> On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
>>>>>> Hi Alexander;
>>>>>>
>>>>>> Are you using the dependencymanager from the trunk ?
>>>>>> If so, then I assume that you are also using the dependencymanager
>>>>>> compatibility bundle, because I see that you are using the old
>>>>>> "org.apache.felix.dependencymanager" package ?
>>>>>>
>>>>>> In this case, you might have found a bug from the DM compatibility bundle.
>>>>>> Please open a jira issue for DM, and attach to it your sample code, I will
>>>>>> then investigate.
>>>>>> (I think that your Sender.stop method is not properly invoked by the DM
>>>>>> compat bundle).
>>>>>>
>>>>>> Thanks;
>>>>>> /pierre
>>>>>>
>>>>>>
>>>>>> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
>>>>>> <a....@gmail.com>wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I created a small example with 2 bundles.
>>>>>>>
>>>>>>> When stopping execution using ctrl-c the interrupted exception is
>>>>>>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>>>>>>> given,
>>>>>>> and the shutdown stops. Trying to list bundles results in
>>>>>>> IllegalStateException. The only way to stop it is by killing the
>>>>>>> process.
>>>>>>>
>>>>>>> The code is a simple sender and receiver. The Dependency manager is
>>>>>>> used to get a reference to the EventAdmin.
>>>>>>>
>>>>>>>
>>>>>>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>>>>>>>> Alexander Broekhuis wrote
>>>>>>>>>>
>>>>>>>>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>>>>>>>>> using the EventAdmin although the service is already down. How do you
>>>>>>>>>> handle the unregister event of the event admin service?
>>>>>>>>>
>>>>>>>>> The EventAdmin is tracked using the DependencyManager. If the service
>>>>>>>>> is actually down, I would expect a NPE at the point where I use the
>>>>>>>>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>>>>>>>> wrong assumption?
>>>>>>>>>
>>>>>>>> I don't know the DependencyManager :) But maybe you can show the code,
>>>>>>>> you use?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Carsten
>>>>>>>> --
>>>>>>>> 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
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Met vriendelijke groet,
>>>>>
>>>>> 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
>>>
>>>
>>
>>
>>
>
>
> --
> 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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
I just fixed another shutdown problem in the event admin, so maybe you
want to try latest version from svn trunk
Regards
Carsten
Am 17.01.11 17:35, schrieb Alexander Broekhuis:
> Hi Carsten,
>
> Will do, I also tested with older versions, and 1.0.0 works ok. So I
> will use that version for now.
>
>
> On 17 January 2011 17:02, Carsten Ziegeler <cz...@apache.org> wrote:
>> Hi Alex,
>>
>> ok, can you please file a bug and attach the source for your code so we
>> can easily reproduce the problem?
>>
>> Thanks
>> Carsten
>>
>> Am 17.01.11 11:02, schrieb Alexander Broekhuis:
>>> Hi,
>>>
>>> Is there any update for this problem? I changed my code to use a
>>> service tracker, and the same happens. So it doesn't seem to be
>>> related to the use of the Dependence Manager.
>>>
>>> On 12 January 2011 07:16, Alexander Broekhuis <a....@gmail.com> wrote:
>>>> Hi Pierre,
>>>>
>>>> The DM version I use is 2.0.1, and not trunk. So don't think it can be
>>>> the compat bundle..
>>>>
>>>> But thanks for looking into it!
>>>>
>>>> On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
>>>>> Hi Alexander;
>>>>>
>>>>> Are you using the dependencymanager from the trunk ?
>>>>> If so, then I assume that you are also using the dependencymanager
>>>>> compatibility bundle, because I see that you are using the old
>>>>> "org.apache.felix.dependencymanager" package ?
>>>>>
>>>>> In this case, you might have found a bug from the DM compatibility bundle.
>>>>> Please open a jira issue for DM, and attach to it your sample code, I will
>>>>> then investigate.
>>>>> (I think that your Sender.stop method is not properly invoked by the DM
>>>>> compat bundle).
>>>>>
>>>>> Thanks;
>>>>> /pierre
>>>>>
>>>>>
>>>>> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
>>>>> <a....@gmail.com>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I created a small example with 2 bundles.
>>>>>>
>>>>>> When stopping execution using ctrl-c the interrupted exception is
>>>>>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>>>>>> given,
>>>>>> and the shutdown stops. Trying to list bundles results in
>>>>>> IllegalStateException. The only way to stop it is by killing the
>>>>>> process.
>>>>>>
>>>>>> The code is a simple sender and receiver. The Dependency manager is
>>>>>> used to get a reference to the EventAdmin.
>>>>>>
>>>>>>
>>>>>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>>>>>>> Alexander Broekhuis wrote
>>>>>>>>>
>>>>>>>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>>>>>>>> using the EventAdmin although the service is already down. How do you
>>>>>>>>> handle the unregister event of the event admin service?
>>>>>>>>
>>>>>>>> The EventAdmin is tracked using the DependencyManager. If the service
>>>>>>>> is actually down, I would expect a NPE at the point where I use the
>>>>>>>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>>>>>>> wrong assumption?
>>>>>>>>
>>>>>>> I don't know the DependencyManager :) But maybe you can show the code,
>>>>>>> you use?
>>>>>>>
>>>>>>> Regards
>>>>>>> Carsten
>>>>>>> --
>>>>>>> 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
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Met vriendelijke groet,
>>>>
>>>> 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
>>
>>
>
>
>
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi Carsten,
Will do, I also tested with older versions, and 1.0.0 works ok. So I
will use that version for now.
On 17 January 2011 17:02, Carsten Ziegeler <cz...@apache.org> wrote:
> Hi Alex,
>
> ok, can you please file a bug and attach the source for your code so we
> can easily reproduce the problem?
>
> Thanks
> Carsten
>
> Am 17.01.11 11:02, schrieb Alexander Broekhuis:
>> Hi,
>>
>> Is there any update for this problem? I changed my code to use a
>> service tracker, and the same happens. So it doesn't seem to be
>> related to the use of the Dependence Manager.
>>
>> On 12 January 2011 07:16, Alexander Broekhuis <a....@gmail.com> wrote:
>>> Hi Pierre,
>>>
>>> The DM version I use is 2.0.1, and not trunk. So don't think it can be
>>> the compat bundle..
>>>
>>> But thanks for looking into it!
>>>
>>> On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
>>>> Hi Alexander;
>>>>
>>>> Are you using the dependencymanager from the trunk ?
>>>> If so, then I assume that you are also using the dependencymanager
>>>> compatibility bundle, because I see that you are using the old
>>>> "org.apache.felix.dependencymanager" package ?
>>>>
>>>> In this case, you might have found a bug from the DM compatibility bundle.
>>>> Please open a jira issue for DM, and attach to it your sample code, I will
>>>> then investigate.
>>>> (I think that your Sender.stop method is not properly invoked by the DM
>>>> compat bundle).
>>>>
>>>> Thanks;
>>>> /pierre
>>>>
>>>>
>>>> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
>>>> <a....@gmail.com>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I created a small example with 2 bundles.
>>>>>
>>>>> When stopping execution using ctrl-c the interrupted exception is
>>>>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>>>>> given,
>>>>> and the shutdown stops. Trying to list bundles results in
>>>>> IllegalStateException. The only way to stop it is by killing the
>>>>> process.
>>>>>
>>>>> The code is a simple sender and receiver. The Dependency manager is
>>>>> used to get a reference to the EventAdmin.
>>>>>
>>>>>
>>>>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>>>>>> Alexander Broekhuis wrote
>>>>>>>>
>>>>>>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>>>>>>> using the EventAdmin although the service is already down. How do you
>>>>>>>> handle the unregister event of the event admin service?
>>>>>>>
>>>>>>> The EventAdmin is tracked using the DependencyManager. If the service
>>>>>>> is actually down, I would expect a NPE at the point where I use the
>>>>>>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>>>>>> wrong assumption?
>>>>>>>
>>>>>> I don't know the DependencyManager :) But maybe you can show the code,
>>>>>> you use?
>>>>>>
>>>>>> Regards
>>>>>> Carsten
>>>>>> --
>>>>>> 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
>>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Met vriendelijke groet,
>>>
>>> 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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Alex,
ok, can you please file a bug and attach the source for your code so we
can easily reproduce the problem?
Thanks
Carsten
Am 17.01.11 11:02, schrieb Alexander Broekhuis:
> Hi,
>
> Is there any update for this problem? I changed my code to use a
> service tracker, and the same happens. So it doesn't seem to be
> related to the use of the Dependence Manager.
>
> On 12 January 2011 07:16, Alexander Broekhuis <a....@gmail.com> wrote:
>> Hi Pierre,
>>
>> The DM version I use is 2.0.1, and not trunk. So don't think it can be
>> the compat bundle..
>>
>> But thanks for looking into it!
>>
>> On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
>>> Hi Alexander;
>>>
>>> Are you using the dependencymanager from the trunk ?
>>> If so, then I assume that you are also using the dependencymanager
>>> compatibility bundle, because I see that you are using the old
>>> "org.apache.felix.dependencymanager" package ?
>>>
>>> In this case, you might have found a bug from the DM compatibility bundle.
>>> Please open a jira issue for DM, and attach to it your sample code, I will
>>> then investigate.
>>> (I think that your Sender.stop method is not properly invoked by the DM
>>> compat bundle).
>>>
>>> Thanks;
>>> /pierre
>>>
>>>
>>> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
>>> <a....@gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> I created a small example with 2 bundles.
>>>>
>>>> When stopping execution using ctrl-c the interrupted exception is
>>>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>>>> given,
>>>> and the shutdown stops. Trying to list bundles results in
>>>> IllegalStateException. The only way to stop it is by killing the
>>>> process.
>>>>
>>>> The code is a simple sender and receiver. The Dependency manager is
>>>> used to get a reference to the EventAdmin.
>>>>
>>>>
>>>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>>>>> Alexander Broekhuis wrote
>>>>>>>
>>>>>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>>>>>> using the EventAdmin although the service is already down. How do you
>>>>>>> handle the unregister event of the event admin service?
>>>>>>
>>>>>> The EventAdmin is tracked using the DependencyManager. If the service
>>>>>> is actually down, I would expect a NPE at the point where I use the
>>>>>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>>>>> wrong assumption?
>>>>>>
>>>>> I don't know the DependencyManager :) But maybe you can show the code,
>>>>> you use?
>>>>>
>>>>> Regards
>>>>> Carsten
>>>>> --
>>>>> 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
>>>>
>>>
>>
>>
>>
>> --
>> Met vriendelijke groet,
>>
>> 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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi,
Is there any update for this problem? I changed my code to use a
service tracker, and the same happens. So it doesn't seem to be
related to the use of the Dependence Manager.
On 12 January 2011 07:16, Alexander Broekhuis <a....@gmail.com> wrote:
> Hi Pierre,
>
> The DM version I use is 2.0.1, and not trunk. So don't think it can be
> the compat bundle..
>
> But thanks for looking into it!
>
> On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
>> Hi Alexander;
>>
>> Are you using the dependencymanager from the trunk ?
>> If so, then I assume that you are also using the dependencymanager
>> compatibility bundle, because I see that you are using the old
>> "org.apache.felix.dependencymanager" package ?
>>
>> In this case, you might have found a bug from the DM compatibility bundle.
>> Please open a jira issue for DM, and attach to it your sample code, I will
>> then investigate.
>> (I think that your Sender.stop method is not properly invoked by the DM
>> compat bundle).
>>
>> Thanks;
>> /pierre
>>
>>
>> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
>> <a....@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I created a small example with 2 bundles.
>>>
>>> When stopping execution using ctrl-c the interrupted exception is
>>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>>> given,
>>> and the shutdown stops. Trying to list bundles results in
>>> IllegalStateException. The only way to stop it is by killing the
>>> process.
>>>
>>> The code is a simple sender and receiver. The Dependency manager is
>>> used to get a reference to the EventAdmin.
>>>
>>>
>>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>>> > Alexander Broekhuis wrote
>>> >>>
>>> >>> From the stacktrace below I have the feeling that the AbcGenerator is
>>> >>> using the EventAdmin although the service is already down. How do you
>>> >>> handle the unregister event of the event admin service?
>>> >>
>>> >> The EventAdmin is tracked using the DependencyManager. If the service
>>> >> is actually down, I would expect a NPE at the point where I use the
>>> >> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>> >> wrong assumption?
>>> >>
>>> > I don't know the DependencyManager :) But maybe you can show the code,
>>> > you use?
>>> >
>>> > Regards
>>> > Carsten
>>> > --
>>> > 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
>>>
>>
>
>
>
> --
> Met vriendelijke groet,
>
> Alexander Broekhuis
>
--
Met vriendelijke groet,
Alexander Broekhuis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi Pierre,
The DM version I use is 2.0.1, and not trunk. So don't think it can be
the compat bundle..
But thanks for looking into it!
On 12 January 2011 00:47, Pierre De Rop <pi...@gmail.com> wrote:
> Hi Alexander;
>
> Are you using the dependencymanager from the trunk ?
> If so, then I assume that you are also using the dependencymanager
> compatibility bundle, because I see that you are using the old
> "org.apache.felix.dependencymanager" package ?
>
> In this case, you might have found a bug from the DM compatibility bundle.
> Please open a jira issue for DM, and attach to it your sample code, I will
> then investigate.
> (I think that your Sender.stop method is not properly invoked by the DM
> compat bundle).
>
> Thanks;
> /pierre
>
>
> On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
> <a....@gmail.com>wrote:
>
>> Hi,
>>
>> I created a small example with 2 bundles.
>>
>> When stopping execution using ctrl-c the interrupted exception is
>> thrown. Somehow the stacktrace isn't show now, but only the warning is
>> given,
>> and the shutdown stops. Trying to list bundles results in
>> IllegalStateException. The only way to stop it is by killing the
>> process.
>>
>> The code is a simple sender and receiver. The Dependency manager is
>> used to get a reference to the EventAdmin.
>>
>>
>> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
>> > Alexander Broekhuis wrote
>> >>>
>> >>> From the stacktrace below I have the feeling that the AbcGenerator is
>> >>> using the EventAdmin although the service is already down. How do you
>> >>> handle the unregister event of the event admin service?
>> >>
>> >> The EventAdmin is tracked using the DependencyManager. If the service
>> >> is actually down, I would expect a NPE at the point where I use the
>> >> EventAdmin, not an exception from within the EventAdmin. Or is this a
>> >> wrong assumption?
>> >>
>> > I don't know the DependencyManager :) But maybe you can show the code,
>> > you use?
>> >
>> > Regards
>> > Carsten
>> > --
>> > 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
>>
>
--
Met vriendelijke groet,
Alexander Broekhuis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Pierre De Rop <pi...@gmail.com>.
Hi Alexander;
Are you using the dependencymanager from the trunk ?
If so, then I assume that you are also using the dependencymanager
compatibility bundle, because I see that you are using the old
"org.apache.felix.dependencymanager" package ?
In this case, you might have found a bug from the DM compatibility bundle.
Please open a jira issue for DM, and attach to it your sample code, I will
then investigate.
(I think that your Sender.stop method is not properly invoked by the DM
compat bundle).
Thanks;
/pierre
On Tue, Jan 11, 2011 at 2:42 PM, Alexander Broekhuis
<a....@gmail.com>wrote:
> Hi,
>
> I created a small example with 2 bundles.
>
> When stopping execution using ctrl-c the interrupted exception is
> thrown. Somehow the stacktrace isn't show now, but only the warning is
> given,
> and the shutdown stops. Trying to list bundles results in
> IllegalStateException. The only way to stop it is by killing the
> process.
>
> The code is a simple sender and receiver. The Dependency manager is
> used to get a reference to the EventAdmin.
>
>
> On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
> > Alexander Broekhuis wrote
> >>>
> >>> From the stacktrace below I have the feeling that the AbcGenerator is
> >>> using the EventAdmin although the service is already down. How do you
> >>> handle the unregister event of the event admin service?
> >>
> >> The EventAdmin is tracked using the DependencyManager. If the service
> >> is actually down, I would expect a NPE at the point where I use the
> >> EventAdmin, not an exception from within the EventAdmin. Or is this a
> >> wrong assumption?
> >>
> > I don't know the DependencyManager :) But maybe you can show the code,
> > you use?
> >
> > Regards
> > Carsten
> > --
> > 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
>
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by "Richard S. Hall" <he...@ungoverned.org>.
It's generally better to open a JIRA issue and attach files to it,
rather than send them to the list to everyone.
Thanks.
-> richard
On 1/11/11 8:42, Alexander Broekhuis wrote:
> Hi,
>
> I created a small example with 2 bundles.
>
> When stopping execution using ctrl-c the interrupted exception is
> thrown. Somehow the stacktrace isn't show now, but only the warning is given,
> and the shutdown stops. Trying to list bundles results in
> IllegalStateException. The only way to stop it is by killing the
> process.
>
> The code is a simple sender and receiver. The Dependency manager is
> used to get a reference to the EventAdmin.
>
>
> On 7 January 2011 12:47, Carsten Ziegeler<cz...@apache.org> wrote:
>> Alexander Broekhuis wrote
>>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>>> using the EventAdmin although the service is already down. How do you
>>>> handle the unregister event of the event admin service?
>>> The EventAdmin is tracked using the DependencyManager. If the service
>>> is actually down, I would expect a NPE at the point where I use the
>>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>>> wrong assumption?
>>>
>> I don't know the DependencyManager :) But maybe you can show the code,
>> you use?
>>
>> Regards
>> Carsten
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi,
I created a small example with 2 bundles.
When stopping execution using ctrl-c the interrupted exception is
thrown. Somehow the stacktrace isn't show now, but only the warning is given,
and the shutdown stops. Trying to list bundles results in
IllegalStateException. The only way to stop it is by killing the
process.
The code is a simple sender and receiver. The Dependency manager is
used to get a reference to the EventAdmin.
On 7 January 2011 12:47, Carsten Ziegeler <cz...@apache.org> wrote:
> Alexander Broekhuis wrote
>>>
>>> From the stacktrace below I have the feeling that the AbcGenerator is
>>> using the EventAdmin although the service is already down. How do you
>>> handle the unregister event of the event admin service?
>>
>> The EventAdmin is tracked using the DependencyManager. If the service
>> is actually down, I would expect a NPE at the point where I use the
>> EventAdmin, not an exception from within the EventAdmin. Or is this a
>> wrong assumption?
>>
> I don't know the DependencyManager :) But maybe you can show the code,
> you use?
>
> Regards
> Carsten
> --
> 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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
Alexander Broekhuis wrote
>>
>> From the stacktrace below I have the feeling that the AbcGenerator is
>> using the EventAdmin although the service is already down. How do you
>> handle the unregister event of the event admin service?
>
> The EventAdmin is tracked using the DependencyManager. If the service
> is actually down, I would expect a NPE at the point where I use the
> EventAdmin, not an exception from within the EventAdmin. Or is this a
> wrong assumption?
>
I don't know the DependencyManager :) But maybe you can show the code,
you use?
Regards
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
Hi,
On 5 January 2011 12:48, Carsten Ziegeler <cz...@apache.org> wrote:
>>
>> Also, it seems that the InterruptedException only occurs when starting
>> with no cache.
> What cache do you mean?
I mean the felix bundle cache "./cache".
>
> From the stacktrace below I have the feeling that the AbcGenerator is
> using the EventAdmin although the service is already down. How do you
> handle the unregister event of the event admin service?
The EventAdmin is tracked using the DependencyManager. If the service
is actually down, I would expect a NPE at the point where I use the
EventAdmin, not an exception from within the EventAdmin. Or is this a
wrong assumption?
--
Met vriendelijke groet,
Alexander Broekhuis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
Alexander Broekhuis wrote
> Hi,
>
> I am using version 1.2.8.
>
> Also, it seems that the InterruptedException only occurs when starting
> with no cache.
What cache do you mean?
>From the stacktrace below I have the feeling that the AbcGenerator is
using the EventAdmin although the service is already down. How do you
handle the unregister event of the event admin service?
Regards
Carsten
>
> 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 <cz...@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....@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
>>
>>
>
>
>
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
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 <cz...@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....@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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin
is stopped" during shutdown
Posted by Carsten Ziegeler <cz...@apache.org>.
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....@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
Re: How to handle "java.lang.IllegalStateException: The EventAdmin is
stopped" during shutdown
Posted by Alexander Broekhuis <a....@gmail.com>.
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....@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
>
--
Met vriendelijke groet,
Alexander Broekhuis
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org