-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Behrooz,
On 3/26/18 12:26 AM, Behrooz Nobakht wrote: > Hi, > > I am migrating a code base from Tomcat 8.0.38 to 9.0.6. There are a > few things I'd like to confirm based on observations so far and ask > for advice: > > 1. Default Class Loader > > In 9, it seems that the default is ParallelWebAppClassLoader > compared with WebAppClassLoader in 8.0. What behavior changes does > the new class loader bring esp. now that it seems to use > "concurrent" approach? > > One specific observation so far is that the code > > Thread.currentThread().getContextClassLoader() > > used to give out "a" class loader in 8.0 but it returns null in > 9.0. Any advice on this? What code is fetching the TCCL? Something like a ServletContextListener? > 2. ClassNotFoundException: > org.apache.naming.java.javaURLContextFactory > > Having the code: > > InitialContext ic = new InitialContext() What data type is InitialContext in your code, here? Can you post the complete stack trace? > used to work on Tomcat 8.0 but now yields the above exception in > Tomcat 9. It seems that catalina.jar is not exposed by default to a > webapp class loader. Nor should it. It should not have been available to applications in Tomcat 8, either. Are you bundling catalina.jar with your application? - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlq5LncdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFhSiBAArOCcZ0okwbEp1ag+ gCJw3jXcndN3JfmcEoIjNddR8/P2BvGSpZrvNX3b/hECrmlMV7hUl0SpORl7afL5 zrP1liEdRlZ50EmpQJULG+yjktc298Ip6eXWQLa6oX9OOLbkZyknlGeI249j6syo FXomtb6ZQ4F0WP9wC14N/keAHL2nqTOk7+1p1khfIYPVUM1MfT9EtVnW3weL9kHd sn1FZIV3TNkOiukQm9znIeed00YlH0kaS2V9l/GNOvkhwH66xROxiJukm3dUzTQe djsigv/mHrEWZDG9rhteJbt9RB6XMsaQogfXh8JlZsfxt2i7Yy12O2LOOHFIMaTl 4fjKxiuQl0iOi52rfvrp+CTO/0y0TklPh3gYcNa2dpZm/UGkLrRty199Qs9+KIgy d0L5zT9pwFusTwKt/wiVyGcm+Jg2Lq13fD8WNMmElk1h78ceVbM3NFDxZqqaSHK2 p3S3xrMsTeFfyFI2BRdUXlV/+HGwwLYnmHWPVSEUhV448WXdOd0kehYSJGLmfXBM UrYiZksVTYjsJc5zCADtp4xNm/At9T/Ktcfp67Rm97bR8ityQBuf9xKpJ7eo5Gzj Ecl4kFz2W4sRxli0H5zX8lcoO7A9AAk7P0bR1ooMZ/8d6nx1WrIx19zNXz1ou8me qI6/uYGGZX23quqgKXKP9g2basE= =DOWh -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org