DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22113>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22113

Improvable Exception Message "Cannot create resource instance"

           Summary: Improvable Exception Message "Cannot create resource
                    instance"
           Product: Tomcat 4
           Version: 4.1.24
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina:Modules
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I didn't know which module this belongs to - sorry.

When org.apache.naming.factory.ResourceFactory fails to instanciate an
object by e.g. Class.forName().getInstance a NamingException                   
("Cannot create resource instance") is issued.

Request for enhancement: Do not ignore the exception thrown by getInstance().
Instead use NamingException.setRootCause() to pass the information. This 
will avoid many headaches. (Oh yes, like mine). If e.g. a DataSource cannot be 
created because of a JDBC driver issue this would be obvious then.

[...]
                    try {
                        factory = (ObjectFactory) 
                            Class.forName(javaxSqlDataSourceFactoryClassName)
                            .newInstance();
                    } catch(Throwable t) {
/* NEW */              NamingException nx = new NamingException(t.getMessage());
/* NEW */              nx.setRootCause(t);
/* NEW */              throw nx;
                    }

[...] 2 more repetitions.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to