code: public Object getResolvedObj() {
          if (getCause() instanceof javax.naming.NamingException) {
              return ((javax.naming.NamingException) getCause()).getResolvedObj();
          }
          return null;
      }
docs: Convenience method to get the resolved object associated with this
  exception, if the root cause was an instance of
  {@link javax.naming.NamingException}.
  
  @return the object that was resolved so far if the root cause is an
  instance of javax.naming.NamingException, or <code>null</code>
  if the resolved object field has not been set