You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Rainer Jung <ra...@kippdata.de> on 2017/09/23 15:07:48 UTC
Re: ClassLoaderLogManager.readConfiguration locates
logging.properties incorrectly with JDK 9
Sorry about more than a year delay. I just ran into the same issue and
found your mail. It should be fixed now by
http://svn.apache.org/viewvc?rev=1809434&view=rev which will be part of
TC 9.0.1. I also plan to backport this to TC 8.5 (at least).
I have not chosen to do a Multi-Release jar but instead used a simple
static check for Java 9.
Regards,
Rainer
Am 28.07.2016 um 15:07 schrieb Chris Hegarty:
> Hi,
>
> The following exception can be seen when, running with JDK 9 b115 ( early access )
> and shutting down the Tomcat server. The issue is that the code in
> org.apache.juli.ClassLoaderLogManager.readConfiguration() expects to find the
> ‘logging.properties' file in the ‘lib' directory of the JRE image. This is not the case in
> JDK 9, it has been moved to the ‘conf' directory of the image. See the "New run-time
> image structure” of JEP 220 [1] for details of this.
>
> The code can be simply updated to look in the ‘conf’ directory, or alternatively can
> select between ‘conf’ and ‘lib’ if required to run on multiple releases.
>
> Configuration error
> java.io.FileNotFoundException: /opt/jdk-9.jdk_b115/Contents/Home/lib/logging.properties (No such file or directory)
> at java.io.FileInputStream.open0(java.base@9-ea/Native Method)
> at java.io.FileInputStream.open(java.base@9-ea/FileInputStream.java:195)
> at java.io.FileInputStream.<init>(java.base@9-ea/FileInputStream.java:138)
> at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:479)
> at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:402)
> at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:398)
> at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
> at org.apache.juli.ClassLoaderLogManager.getClassLoaderInfo(ClassLoaderLogManager.java:398)
> at org.apache.juli.ClassLoaderLogManager.addLogger(ClassLoaderLogManager.java:136)
> at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:507)
> at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:402)
> at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:398)
> at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
> at org.apache.juli.ClassLoaderLogManager.getClassLoaderInfo(ClassLoaderLogManager.java:398)
> at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:493)
> at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:309)
> at java.util.logging.LogManager.readPrimordialConfiguration(java.logging@9-ea/LogManager.java:437)
> at java.util.logging.LogManager.access$800(java.logging@9-ea/LogManager.java:156)
> at java.util.logging.LogManager$2.run(java.logging@9-ea/LogManager.java:387)
> at java.security.AccessController.doPrivileged(java.base@9-ea/Native Method)
> at java.util.logging.LogManager.ensureLogManagerInitialized(java.logging@9-ea/LogManager.java:380)
> at java.util.logging.LogManager.getLogManager(java.logging@9-ea/LogManager.java:422)
> at java.util.logging.SimpleFormatter.getLoggingProperty(java.logging@9-ea/SimpleFormatter.java:63)
> at jdk.internal.logger.SimpleConsoleLogger$Formatting.getSimpleFormat(java.base@9-ea/SimpleConsoleLogger.java:491)
> at jdk.internal.logger.SurrogateLogger.getSimpleFormat(java.base@9-ea/SurrogateLogger.java:62)
> at java.util.logging.SimpleFormatter.<init>(java.logging@9-ea/SimpleFormatter.java:67)
> at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(java.base@9-ea/Native Method)
> at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(java.base@9-ea/NativeConstructorAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(java.base@9-ea/DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(java.base@9-ea/Constructor.java:453)
> at java.lang.Class.newInstance(java.base@9-ea/Class.java:550)
> at org.apache.juli.logging.DirectJDKLog.<clinit>(DirectJDKLog.java:49)
> at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:115)
> at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:137)
> at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:188)
> at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:52)
>
> -Chris.
>
> [1] http://openjdk.java.net/jeps/220
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org