Hi Chris, Thanks a lot for the quick response. Please find inline answers.
On 3/18/15 5:39 AM, Thusitha Thilina Dayaratne wrote: >> I'm in the process of migrating embedded tomcat 7.0.59 application >> to Tomcat 8.0.20. Tomcat is been bundle as a OSGI bundle. First I >> get a NullPointerException when trying to access the server home >> page. I fixed that manually setting an empty TldCache instance in >> the context as follows >> >> [snip] >> >> >> Now it is not throwing the NPE. but instead of that I'm getting >> following exception >> >> org.apache.jasper.JasperException: The absolute uri: >> http://tiles.apache.org/tags-tiles cannot be resolved in either >> web.xml or the jar files deployed with this application at >> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) >I >> >looks like you are missing the Tiles JAR. Is it located in your >WEB-INF/lib directory? These jar files are located in a folder called plugins. We are reading them from our JarScanner >> I'm also using a extended JarScanner as follows >> >> public class CarbonTomcatJarScanner extends StandardJarScanner{ > Without trying to read and understand all this code, can you explain > why you are using your own JarScanner instead of Tomcat's? Perhaps > there is a way to do this where you don't need to write your own > JarScanner. According the servlet 3.0 spec, tldScanner classes are picked up during web-app load phase from the classPath using SPI mechanism. Normal sequence is to scan; - WEB-INF/lib - parent URL classPath However with the BundleClassLoader being the parent classLoader of Tomcat web-app classLoder, it fails to pick up TLD scanner references reside in plugins directory. That is why we have used a our own JarScanner >> It seems that this is relate to JarScanner. Can someone tell me >> what I have done wrong here? Or a way to fix this? Is this occur >> because I set TldCache manually? >I'm curious as to why the TldCache isn't being set up correctly in the >first place. In your other recent thread ("NPE in >JspCompilationContext.getTldResourcePath"), there were a couple of >questions from the community that it doesn't look like you have >answered. Perhaps answering those might help you solve both problems >at once. I'm not so quite sure about that. I manually set the TldCache and manually added the JasperInitializer to the StandardContext to get rid of the NPE I will try to answer the an answered questions in other thread. Thanks Best Regards /Thusitha On Thu, Mar 19, 2015 at 3:08 AM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Thusitha, > > On 3/18/15 5:39 AM, Thusitha Thilina Dayaratne wrote: > > I'm in the process of migrating embedded tomcat 7.0.59 application > > to Tomcat 8.0.20. Tomcat is been bundle as a OSGI bundle. First I > > get a NullPointerException when trying to access the server home > > page. I fixed that manually setting an empty TldCache instance in > > the context as follows > > > > [snip] > > > > > > Now it is not throwing the NPE. but instead of that I'm getting > > following exception > > > > org.apache.jasper.JasperException: The absolute uri: > >> http://tiles.apache.org/tags-tiles cannot be resolved in either > >> web.xml or the jar files deployed with this application at > >> > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) > > It > >> > looks like you are missing the Tiles JAR. Is it located in your > WEB-INF/lib directory? > > > I'm also using a extended JarScanner as follows > > > > public class CarbonTomcatJarScanner extends StandardJarScanner{ > > Without trying to read and understand all this code, can you explain > why you are using your own JarScanner instead of Tomcat's? Perhaps > there is a way to do this where you don't need to write your own > JarScanner. > > > It seems that this is relate to JarScanner. Can someone tell me > > what I have done wrong here? Or a way to fix this? Is this occur > > because I set TldCache manually? > > I'm curious as to why the TldCache isn't being set up correctly in the > first place. In your other recent thread ("NPE in > JspCompilationContext.getTldResourcePath"), there were a couple of > questions from the community that it doesn't look like you have > answered. Perhaps answering those might help you solve both problems > at once. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1 > Comment: GPGTools - http://gpgtools.org > > iQIcBAEBCAAGBQJVCfBVAAoJEBzwKT+lPKRYdSoP/1jjvwNnNlTDSaR8ptkN3TLk > u37oZ5qmuNNTcY/F7Clh0cEmslvu8e3oqqTZQ7IBT9PMwBUmyoUhN2PtljQLY3UQ > QFPQyARHKdf6f+MJx3zFBpJr/mlzrMtaNXMGXtCMkesD6Kf8FdWn70/irKG69/fv > TyGI8lD07p/lRbkKIsg7uFuWItuRgCG4SO00XqmpTEnE22kpjwW9IRp1Ajn6EFk0 > cKuRNXZzkXoTSqMT+PpqwZf/dr3Bx7cBajievhoBIXL41EhMI2gYpzhSKljkwb9x > mP3bMDl7XyYX43Ka5ojyZaI1RXouGK95X8TKpyr+nxjuFUX1asQdJ40vAb6zICO7 > UTDUDJep7Kr0x9VtX/EiRuNJVl0zETe8uAUVmKhGovZ6xpAXUN0T/tb3BcfHAqXl > 65WmcqfeELdNYyQdd2FTK7t9UXWDVKv0v/C0GXSnZxGO1pWLv7brEF2gikEXucum > zRZiQLA+EZ5jLtkRJ/Vhe15IDpzspvsZKoe3BTAIICe0AYScy80rZHNW1DOdW8JK > IJd9mn2itG78WqiGZH5QdIB3KvkXYpRMRyTlVlqQvkcby8Q2ineGU2ibeao6b3AH > LtcmNdg1IU4QaatEtblgrLw/7CSoUNnnYMNDU7S1zXcwEnvjiqCzt482oPli5q+c > kvAaju0Xgig8M9u8Paer > =V7TO > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- Thusitha Dayaratne Software Engineer WSO2 Inc. - lean . enterprise . middleware | wso2.com Mobile +94712756809 Blog alokayasoya.blogspot.com About http://about.me/thusithathilina