remm 2003/06/23 14:44:32 Modified: catalina/src/share/org/apache/catalina/loader WebappLoader.java Log: - Add logging on initialization of the URL stream handler. Revision Changes Path 1.19 +30 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Index: WebappLoader.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- WebappLoader.java 20 Jun 2003 21:39:13 -0000 1.18 +++ WebappLoader.java 23 Jun 2003 21:44:32 -0000 1.19 @@ -164,6 +164,12 @@ /** + * First load of the class. + */ + private static boolean first = true; + + + /** * The class loader being managed by this Loader component. */ private WebappClassLoader classLoader = null; @@ -253,11 +259,18 @@ protected PropertyChangeSupport support = new PropertyChangeSupport(this); - // Classpath set in the loader - private String classpath=null; + /** + * Classpath set in the loader. + */ + private String classpath = null; + + + /** + * Repositories that are set in the loader, for JMX. + */ + private ArrayList loaderRepositories = null; + - // repositories that are set in the loader, for jmx - private ArrayList loaderRepositories; // ------------------------------------------------------------- Properties @@ -690,10 +703,18 @@ // Register a stream handler factory for the JNDI protocol URLStreamHandlerFactory streamHandlerFactory = new DirContextURLStreamHandlerFactory(); - try { - URL.setURLStreamHandlerFactory(streamHandlerFactory); - } catch (Throwable t) { - // Ignore the error here. + if (first) { + first = false; + try { + URL.setURLStreamHandlerFactory(streamHandlerFactory); + } catch (Exception e) { + // Log and continue anyway, this is not critical + log.error("Error registering jndi stream handler", e); + } catch (Throwable t) { + // This is likely a dual registration + log.info("Dual registration of jndi stream handler: " + + t.getMessage()); + } } // Construct a class loader based on our current repositories list
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]