Only the error messages are propagated in the NamingException: } catch (java.beans.IntrospectionException ie) { throw new NamingException(ie.getMessage()); } Since some exceptions do not have a message associated with it, it is very hard sometimes to tell what went wrong from the NamingException. So it would be nice if the actual exception was chained with the NamingException. The change is small: } catch (java.lang.IllegalAccessException iae) { NamingException ex = new new NamingException(iae.getMessage()); ex.setRootCause(iae); throw ex; } Also, there is a call to e.printStackTrace() which probably shouldn't be there.
Now that we require JDK 1.4 where setRootCause is available, this fix is possible, so I've done it in TOMCAT_5_0 and HEAD. Thanks.
Thanks! Btw, the setRootCause() method on NamingException was actually available in 1.3.x (if not before that even).