Re: 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

2015-03-26 Thread Thusitha Thilina Dayaratne
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?

I'm using In tomcat 7 when creating EmbeddedServletOptions (get call from
JspServlet init method) inside the constructor tldLocationsCache is
initiated as

tldLocationsCache = TldLocationsCache.getInstance(context);

in the getInstance method, if context don't have cache set it will set
a new empty cache and return that.

public static synchronized TldLocationsCache getInstance(
ServletContext ctxt) {
if (ctxt == null) {
throw new IllegalArgumentException(ServletContext was null);
}
TldLocationsCache cache = (TldLocationsCache) ctxt.getAttribute(KEY);
if (cache == null) {
cache = new TldLocationsCache(ctxt);
ctxt.setAttribute(KEY, cache);
}
return cache;
}

In tomcat 8 that method looks like follows. So if cache is not set at
the context then this will return null

public static TldCache getInstance(ServletContext servletContext) {
if (servletContext == null) {
throw new IllegalArgumentException(Localizer.getMessage(
org.apache.jasper.compiler.TldCache.servletContextNull));
}
return (TldCache)
servletContext.getAttribute(SERVLET_CONTEXT_ATTRIBUTE_NAME);
}

In my application I have 2 contexts. One is the StandardContext which
is created by the root app, and another context which is created by
equinox jasper.

I have manually added the SCI for the Tomcat OSGi bundle and then
TldCache is get initialized by the JasperInitializer onStartup method.

But how can I initialize the TldCache for jsp? ATM I manually set the
already initialized Tldcache for the jsp.


Can someone tell me what might be the issue here? What I've done wrong here?

In tomcat 7.0.59. We didn't use SCI to initialize the Jasper.


Thanks

Best Regards

/Thusitha


On Fri, Mar 20, 2015 at 1:55 PM, Thusitha Thilina Dayaratne 
thusit...@wso2.com wrote:

 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
  
 

Re: 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

2015-03-20 Thread Thusitha Thilina Dayaratne
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 

Re: 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

2015-03-19 Thread Violeta Georgieva
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



Re: 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

2015-03-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Thusitha,

On 3/18/15 11:34 PM, Thusitha Thilina Dayaratne wrote:
 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.

Well, just because you aren't getting an NPE any longer doesn't mean
that you actually solved the root of the problem. The root of the
problem is that your TLDs aren't being loaded. You just ended up
putting a band-aid on the cache, which is still empty.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVCxIkAAoJEBzwKT+lPKRYHkAP/jFYoFQLJXZZ9sf/+UBo9jEx
oDXHloweXQ7T1V8aVu2ksH9mgzPtofSbYTwjeiQimQsAkUW0rFAcBPCrgsnzrrN6
xJss6aFMLC3aac1+linQaWaeSj4WX3lhbe1lghP0yqN18UxsoTuzUg6JqgQ5fs9w
7bAixbQko9GREJbPuT93IvpEcKx6hKwVre2m8VdkDsaNgELHDSqNykcoGLDOobdX
RKG+tggg1bsOnJ/aDcN75faOwKE7dNtLysi/d4UpgMYRzMcxVo8CT1u2ttTbFeBe
iiBYtdPZ1Fcosa8bLKj71LVFQ79+Id13kY0bxXczBM+SL88N5KEOI0fCqd94ysQq
OIY3Ppr2CTNLHl7zZskSTYtqCUe6TeaP6n+YW3VsxKfjlukJRjnVMjwrWQqqPs5n
SxmDRG7iF1YNXltHntK8pslgjQy69oGCsJiqMt3fhRmsF1Nnm/F/JR1oDYVWSJ3y
AKDa+0+pUqFuJRb4KGXAfi6Q6AXEp613LOX1P8psOg3DbE68CCrXXpuoFU9AGkma
XKr8aLf6MKtvj/aeoK/rTRlCVAPXztzfH4iHQq7zSQbJoSv0xORznszgoEXScYsj
Cs/ufky+hb/DEBVb1hhPLIYUMCMx0xuBn7RD7X7OVzyoS1Onv+zu06hfeAK1MVO/
83f4J5mbTh+myhiHwkXA
=i+Iu
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2015-03-18 Thread Thusitha Thilina Dayaratne
Hi,

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

if(config.getServletContext().getAttribute(org.apache.jasper.compiler.TldCache)
== null){
Constructor? constructor =
Class.forName(org.apache.jasper.compiler.TldCache).getConstructor(ServletContext.class,
Map.class, Map.class);
Object instance =
constructor.newInstance(config.getServletContext(), new
HashMapString, TldResourcePath(), new HashMapTldResourcePath,
TaglibXml());

config.getServletContext().setAttribute(org.apache.jasper.compiler.TldCache,
instance);
}

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)
 at
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:277)
 at
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:75)
 at
 org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:240)
 at
 org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:124)
 at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:411)
 at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:469)
 at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1430)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:139)
 at
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
 at
 org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
 at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
 at
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:570)
 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
 at org.wso2.carbon.ui.JspServlet.service(JspServlet.java:175)
 at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:80)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
 at
 org.eclipse.equinox.http.helper.ContextPathServletAdaptor.service(ContextPathServletAdaptor.java:37)
 at
 org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
 at
 org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
 at
 org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
 at
 org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:64)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)
 at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
 at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
 at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
 at
 org.eclipse.equinox.http.servlet.internal.RequestDispatcherAdaptor.forward(RequestDispatcherAdaptor.java:30)
 at
 org.eclipse.equinox.http.helper.ContextPathServletAdaptor$RequestDispatcherAdaptor.forward(ContextPathServletAdaptor.java:362)
 at
 org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
 at
 org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:185)
 at
 org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:419)
 at
 org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:370)
 at org.wso2.carbon.ui.action.ActionHelper.render(ActionHelper.java:52)
 at org.wso2.carbon.ui.TilesJspServlet.service(TilesJspServlet.java:101)
 at 

Re: 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

2015-03-18 Thread Thusitha Thilina Dayaratne
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
 

Re: 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

2015-03-18 Thread Christopher Schultz
-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