My Oracle Support Banner

JSP Using FileWatcher Service Spins On CPU And Never Returns On All Linux Flavours (Doc ID 2949011.1)

Last updated on MAY 19, 2023

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 19]
Information in this document applies to any platform.


The Java Stored Procedure that does registering file path with a WatchService for a file does watch successfully on Windows.
The same code fails to execute on Linux platforms and the .register() method goes into a spin on the CPU and never returns.
The issue can be reproduced consistently on Linux environment.

Following code snippet can be used to reproduce the issue.



The code works fine on Windows platforms but hangs in Linux platforms.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.