[logback-user] Current version of logback can't read my JNDI entry

Hendrik Stichweh hendrikstichweh at gmail.com
Wed Mar 30 15:01:38 CEST 2022

I'm running a program on a WebSphere Liberty 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20220330/a38635dc/attachment.html>

More information about the logback-user mailing list