Hi,

>
> 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.

>>You may want to have a look at Eclipse Gemini Web (OSGi Web Container
>>Reference Implementation)
Thanks for the reference. We are using eclipse equinox jasper. Could that
be a reason that TldCache not getting initialized?

Thanks
Best Regards
/Thusitha


On Fri, Mar 20, 2015 at 12:00 AM, Violeta Georgieva <miles...@gmail.com>
wrote:

> Hi,
>
> 2015-03-19 5:34 GMT+02:00 Thusitha Thilina Dayaratne <thusit...@wso2.com>:
> >
> > 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.
>
> You may want to have a look at Eclipse Gemini Web (OSGi Web Container
> Reference Implementation)
>
> Regards,
> Violeta
>
> > Thanks
> > Best Regards
> > /Thusitha
> >
>



-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog      alokayasoya.blogspot.com
About    http://about.me/thusithathilina

Reply via email to