tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22113] New: - Improvable Exception Message "Cannot create resource instance"
Date Mon, 04 Aug 2003 17:16:57 GMT
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: tomcat-dev@jakarta.apache.org
        ReportedBy: dev@nils-dehn.de


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.

Mime
View raw message