Matthias Hryniszak
added a comment - 04/Oct/10 7:26 AM As a workaround (really ugly one) one can insert the following at the beginning of the script:
if (org.springframework.mock.jndi.SimpleNamingContextBuilder.currentContextBuilder)
org.springframework.mock.jndi.SimpleNamingContextBuilder.currentContextBuilder.deactivate()
which will deactivate the mock.
I think the real issue is that the SimpleNamingContext binds to all protocols which is OK in test environments but doing it in console is wrong as it forbids playing around with any JNDI stuff.