[logback-user] Current version of logback can't read my JNDI entry
Ceki Gülcü
ceki at qos.ch
Wed Mar 30 20:22:40 CEST 2022
Hello Hendrik,
The new JNDI naming restriction is intended to prevent malicious JNDI
attacks in configuration files.
Do you know which Jakarta/EE/JavaEE specification WebSphere Liberty 21
implements? I would suggest reading section "Application Component
Environment Namespace" in the relevant document.
You might try to use one of the following namespaces:
java:comp, java:module, java:app, java:global
with and without the env/ suffix.
--
Ceki Gülcü
Sponsoring SLF4J/logback/reload4j at https://github.com/sponsors/qos-ch
On 3/30/2022 3:01 PM, Hendrik Stichweh wrote:
> I'm running a program on a WebSphere Liberty 21.0.0.11 with logging from
> logback 1.2.11.
>
> I have a log output folder specified in my server.xml as: <jndiEntry
> jndiName="logging/logPath" value="${server.output.dir}/logs"/>
>
> In the logback.xml I read this entry with the line: <insertFromJNDI
> env-entry-name="logging/logPath" as="logPath"/>
>
> This worked in the old logback versions However in the new version of
> logback this name is not allowed as the name now must start with "java:".
>
> So when I tried to change the line to: <insertFromJNDI
> env-entry-name="java:comp/env/logging/logPath" as="logPath"/>
>
> I get
>
> |14:37:59,720 |-ERROR in
> ch.qos.logback.classic.joran.action.InsertFromJNDIAction - Failed to
> lookup JNDI env-entry [java:comp/env/stibam/logPath]
> javax.naming.NamingException: CWNEN1000E: |
>
> Is there an error in my reading out of that JNDI variable?
>
More information about the logback-user
mailing list