why is a .lck file created and not deleted by java logging

。_饼干妹妹 提交于 2019-12-05 20:42:53

You should expect to see lock files when the FileHandler is open. If you see them linger after the VM exits, then it is because the The FileHandler was not closed, the VM was halted or crashed while the handler shutdown hook was running, or an I/O exception took place while trying to remove them.

You could be running into JDK-8060132 Handlers configured on abstract nodes in logging.properties are not always properly closed. Related: JDK-6274920: JDK logger holds strong reference to java.util.logging.Logger instances.

Looking at the config, you have a FileHandler installed on the root logger and a FileHandler installed on the SimpleServlet. Since the ClassLoaderLogManager is not being used in a JVM global way, the installed default LogManager is creating the FileHandlers before you startup your local ClassLoaderLogManager. Remove the FileHandler entries from the java_home/jre/lib comfig you have and use the ClassLoaderLogManager.readConfiguration methods to load the webapp local configuration.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!