-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Chuck,
Thanks for the response. On 3/19/2010 6:38 PM, Caldarale, Charles R wrote: > I'd be somewhat reluctant to see that behavior changed at this stage > of the game. I'd prefer to have an additional environment variable > that allows specifying where the policy file is rather than requiring > it to be in $CATALINA_BASE/conf/catalina.policy. Fair enough: I was just surprised to see that Tomcat easily allows you to get yourself into an impossible situation. >> In the InitListener.java class, I basically just try to create a log4j >> logger like this: >> >> Logger.getLogger(className) >> >> In both of these situations, Tomcat ought to be able to load the >> classes required. > > It may be that the real exception is getting eaten somewhere > (possibly inside the JRE), and all you're left with is something a > bit too generic to describe the actual problem. Perhaps either the > static initializer or a constructor is failing due to read access > being inhibited. > > Might want to try adding something like this to the catalina.policy > file: > > grant codeBase "file:${catalina.base}/webapps/[appName]/WEB-INF/lib/-" { > permission java.io.FilePermission \ > "${catalina.base}/webapps/[appName]/WEB-INF/classes/logging.properties", > "read"; > }; Unfortunately, I don't have a WEB-INF/classes/logging.properties file, though it's non-existence might still cause an access violation if the code is trying to read it. I think the LogManager has probably already read my file (it's WEB-INF/classes/commons-logging.properties), since the entirety of the file is this: org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger The above reference to Log4JLogger is likely to be the source of the problem, so I suspect the file has already been read. Since the code is mine, I can easily instrument it and see what thread's context class loader is at the time. Any other suggestions? Thanks, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkunsXgACgkQ9CaO5/Lv0PAz8wCbBpiRZWBHbLvnjnIAeD/tUcRt 4WcAoJYBnoJBacyZ+5zBrxKgdbFIqWGt =FiHC -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org