You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Richard Eckart de Castilho <re...@apache.org> on 2023/04/30 16:09:48 UTC

Expected InterruptedException logged as error during shutdown?

Hi all,

is anybody familiar with this exception:


---------
2023-04-30 18:01:08 ERROR [ModificationWatcher Task] [SYSTEM] Task - Task 'ModificationWatcher' terminated
java.lang.InterruptedException: sleep interrupted
	at java.lang.Thread.sleep(Native Method) ~[?:?]
	at org.apache.wicket.util.thread.Task$1.run(Task.java:151) [wicket-util-9.12.0.jar:9.12.0]
	at java.lang.Thread.run(Thread.java:829) [?:?]
---------

This seems to happen when I shut down my Spring Boot based application. As far as I can see, it is generated
when org.apache.wicket.util.watch.ModificationWatcher.destroy() is called:


---------
	@Override
	public void destroy()
	{
		if (task != null)
		{
			// task.stop();
			task.interrupt();
		}
	}
---------

It seems to me, that this exception is kind of expected when shutting down the application.
Is that that case? If it is an expected and common exception, it might not need to be logged
as an error?

Cheers,

-- Richard


Re: Expected InterruptedException logged as error during shutdown?

Posted by Richard Eckart de Castilho <re...@apache.org>.
https://github.com/apache/wicket/pull/588

> On 1. May 2023, at 08:56, Richard Eckart de Castilho <re...@apache.org> wrote:
> 
>> On 1. May 2023, at 08:55, Ernesto Reinaldo Barreiro <re...@gmail.com> wrote:
>> 
>> Are you getting this in production? As far as I know modifications watcher
>> is only used in development mode.
> 
> In development mode - but it is still quite annoying to get an error for what
> seems to be "normal development" operation.


Re: Expected InterruptedException logged as error during shutdown?

Posted by Richard Eckart de Castilho <re...@apache.org>.
> On 1. May 2023, at 08:55, Ernesto Reinaldo Barreiro <re...@gmail.com> wrote:
> 
> Are you getting this in production? As far as I know modifications watcher
> is only used in development mode.

In development mode - but it is still quite annoying to get an error for what
seems to be "normal development" operation.

-- Richard

Re: Expected InterruptedException logged as error during shutdown?

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Are you getting this in production? As far as I know modifications watcher
is only used in development mode.

On Sun, Apr 30, 2023 at 7:09 PM Richard Eckart de Castilho <re...@apache.org>
wrote:

> Hi all,
>
> is anybody familiar with this exception:
>
>
> ---------
> 2023-04-30 18:01:08 ERROR [ModificationWatcher Task] [SYSTEM] Task - Task
> 'ModificationWatcher' terminated
> java.lang.InterruptedException: sleep interrupted
>         at java.lang.Thread.sleep(Native Method) ~[?:?]
>         at org.apache.wicket.util.thread.Task$1.run(Task.java:151)
> [wicket-util-9.12.0.jar:9.12.0]
>         at java.lang.Thread.run(Thread.java:829) [?:?]
> ---------
>
> This seems to happen when I shut down my Spring Boot based application. As
> far as I can see, it is generated
> when org.apache.wicket.util.watch.ModificationWatcher.destroy() is called:
>
>
> ---------
>         @Override
>         public void destroy()
>         {
>                 if (task != null)
>                 {
>                         // task.stop();
>                         task.interrupt();
>                 }
>         }
> ---------
>
> It seems to me, that this exception is kind of expected when shutting down
> the application.
> Is that that case? If it is an expected and common exception, it might not
> need to be logged
> as an error?
>
> Cheers,
>
> -- Richard
>
>

-- 
Regards - Ernesto Reinaldo Barreiro