It is still not obvious to me how the String value of a URL could be used within a logback configuration file. As mentioned earlier, even if no ClassCastException were thrown, if the variable is used for the file property, it is likely to be invalid. For example, "file://tmp/my.log" is *not* valid input for the constructor of FileOutputStream. Could you please describe how you would like to make use of the JNDI variable?