
JNDIUtil.lookup always cast the JNDI lookup result to a String -------------------------------------------------------------- Key: LBCLASSIC-240 URL: http://jira.qos.ch/browse/LBCLASSIC-240 Project: logback-classic Issue Type: Bug Components: joran Affects Versions: 0.9.27 Reporter: Maxence Dewil Assignee: Logback dev list 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) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira