Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.9.27
-
None
Description
JNDIUtil.lookup always cast the JNDI lookup result to a String.
This method should support other object types like: java.net.URL, ...
Description:
1. In our environment, we have declared a variable in Websphere that holds a URL.
2. We use an <insertFromJNDI /> tag.
3. Then the following exception is thrown:
ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:71 - RuntimeException in Action for tag [insertFromJNDI] java.lang.ClassCastException: java.net.URL incompatible with java.lang.String
at java.lang.ClassCastException: java.net.URL incompatible with java.lang.String
at at ch.qos.logback.classic.util.JNDIUtil.lookup(JNDIUtil.java:38)
at at ch.qos.logback.classic.joran.action.InsertFromJNDIAction.begin(InsertFromJNDIAction.java:62)
at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:273)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:127)
at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:40)
at at ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332)
at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:126)