users@jersey.java.net

Re: Error when reloading context in Tomcat

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 31 Jan 2008 09:39:17 +0100

Hi Travis,

Travis Reeder wrote:
> Not using any taglib's myself and not deploying any example webapps,
> just trying to use the jersey jar in tomcat for what it's meant for.

When i was referring to the example webapps i was wondering if you could
reproduce the problem by installing the war of the HelloWorldWebApp
example in Tomcat. That example represents about the simplest
servlet-based example one can do.

What is the setup of your Tomcat installation and execution? Is it just
the basic binary distribution? Did you copy the jersey.jar into the
Tomcat lib directory? Or is the jersey.jar included with a war?

I copied the core jersey jars into apache-tomcat-6.0.14/lib, created a
very simple web application, deployed the war (containing no jar files)
using the tomcat manager and was able to reload the web application
without reproducing the error.


> You're probably right about the taglib thing and I'm assuming these
> examples you mention should not be part of the core jersey jar.

The examples are not, but the JSP tag lib support is because it is
runtime feature.


> Any
> chance you can build them to a separate jar (or war for that matter)?
>

That might be possible as I will be revamping the MVC support, but i
would like to try and reproduce the problem first so i know what is
going on.

Paul.

> Travis
>
> On Jan 30, 2008 1:21 AM, Paul Sandoz <Paul.Sandoz_at_sun.com
> <mailto:Paul.Sandoz_at_sun.com>> wrote:
>
> Hi Travis,
>
> Perhaps this may be related to some JSP tag library extensions that
> are shipped with Jersey for experimental MVC support (see the
> Bookstore example):
>
> > SEVERE: Exception processing TLD META-INF/taglib.tld in JAR at
> > resource path C:\path to web app\WEB-INF\lib\jersey.jar in context
>
>
> I don't think it is a JNDI issue, Tomcat seems to use JNDI-based URIs
> to reference stuff independent of where things are physically located.
>
> Marc, did you observe the same processing exception related to the
> taglib.tld when encountering thread-local persistence issues or was
> it something different?
>
>
> I verified that the HelloWorldWebApp works OK when i reload from the
> Tomcat (6.0.14) manager.
>
> Then i verified that the Bookstore example (which supplies it's own
> 'jtsl.jar' and 'standard.jar' for tag lib processing) works when i
> reload from the Tomcat manager.
>
> Do the HelloWorldWebApp and Bookstore examples in the Jersey
> distribution work for you when you reload?
>
> Are you using any JSP tag library stuff with your application?
>
> Paul.
>
>
> On Jan 29, 2008, at 8:59 PM, Travis Reeder wrote:
>
> > I get this error *everytime* I try to reload a context in Tomcat
> > (without doing a hard restart of Tomcat). It works fine on first
> > start, just not after a reload.
> >
> > Has anyone run into this before? I noticed a jndi lookup in this
> > trace that might be the cause seeing as how jndi shouldn't be
> running.
> >
> > SEVERE: Exception processing TLD META-INF/taglib.tld in JAR at
> > resource path C:\path to web app\WEB-INF\lib\jersey.jar in context
> > java.lang.NullPointerException
> > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:
> > 1111)
> > at org.apache.tomcat.util.digester.Digester.parse(Digester.java:
> > 1562)
> > at org.apache.catalina.startup.TldConfig.tldScanStream
> > (TldConfig.java:518)
> > at org.apache.catalina.startup.TldConfig.tldScanJar
> > (TldConfig.java:476)
> > at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:
> > 301)
> > at org.apache.catalina.core.StandardContext.processTlds
> > (StandardContext.java:4428)
> > at org.apache.catalina.core.StandardContext.start
> > (StandardContext.java:4235)
> > at org.apache.catalina.core.ContainerBase.addChildInternal
> > (ContainerBase.java:791)
> > at org.apache.catalina.core.ContainerBase.addChild
> > (ContainerBase.java:771)
> > at org.apache.catalina.core.StandardHost.addChild
> > (StandardHost.java:525)
> > at org.apache.catalina.startup.HostConfig.deployDescriptor
> > (HostConfig.java:626)
> > at org.apache.catalina.startup.HostConfig.deployDescriptors
> > (HostConfig.java:553)
> > at org.apache.catalina.startup.HostConfig.deployApps
> > (HostConfig.java:488)
> > at org.apache.catalina.startup.HostConfig.check(HostConfig.java:
> > 1206)
> > at org.apache.catalina.startup.HostConfig.lifecycleEvent
> > (HostConfig.java:293)
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:117)
> > at org.apache.catalina.core.ContainerBase.backgroundProcess
> > (ContainerBase.java:1337)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
> > at org.apache.catalina.core.ContainerBase
> > $ContainerBackgroundProcessor.run(ContainerBase.java:1590)
> > at java.lang.Thread.run(Thread.java:619)
> > Jan 29, 2008 11:55:05 AM org.apache.catalina.startup.ContextConfig
> > processDefaultWebConfig
> > SEVERE: Parse error in default web.xml
> > java.lang.NullPointerException
> > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:
> > 1111)
> > at org.apache.tomcat.util.digester.Digester.parse(Digester.java:
> > 1562)
> > at
> > org.apache.catalina.startup.ContextConfig.processDefaultWebConfig
> > (ContextConfig.java:695)
> > at org.apache.catalina.startup.ContextConfig.defaultWebConfig
> > (ContextConfig.java:632)
> > at org.apache.catalina.startup.ContextConfig.start
> > (ContextConfig.java:1061)
> > at org.apache.catalina.startup.ContextConfig.lifecycleEvent
> > (ContextConfig.java:261)
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:117)
> > at org.apache.catalina.core.StandardContext.start
> > (StandardContext.java:4239)
> > at org.apache.catalina.core.ContainerBase.addChildInternal
> > (ContainerBase.java:791)
> > at org.apache.catalina.core.ContainerBase.addChild
> > (ContainerBase.java:771)
> > at org.apache.catalina.core.StandardHost.addChild
> > (StandardHost.java:525)
> > at org.apache.catalina.startup.HostConfig.deployDescriptor
> > (HostConfig.java:626)
> > at org.apache.catalina.startup.HostConfig.deployDescriptors
> > (HostConfig.java:553)
> > at org.apache.catalina.startup.HostConfig.deployApps
> > (HostConfig.java:488)
> > at org.apache.catalina.startup.HostConfig.check(HostConfig.java:
> > 1206)
> > at org.apache.catalina.startup.HostConfig.lifecycleEvent
> > (HostConfig.java:293)
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:117)
> > at org.apache.catalina.core.ContainerBase.backgroundProcess
> > (ContainerBase.java:1337)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
> > at org.apache.catalina.core.ContainerBase
> > $ContainerBackgroundProcessor.run(ContainerBase.java:1590)
> > at java.lang.Thread.run(Thread.java:619)
> > Jan 29, 2008 11:55:05 AM org.apache.catalina.startup.ContextConfig
> > applicationWebConfig
> > SEVERE: Parse error in application web.xml file at jndi:/localhost/
> > WEB-INF/web.xml
> > java.lang.NullPointerException
> > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:
> > 1111)
> > at org.apache.tomcat.util.digester.Digester.parse(Digester.java:
> > 1562)
> > at
> > org.apache.catalina.startup.ContextConfig.applicationWebConfig
> > (ContextConfig.java:369)
> > at org.apache.catalina.startup.ContextConfig.start
> > (ContextConfig.java:1062)
> > at org.apache.catalina.startup.ContextConfig.lifecycleEvent
> > (ContextConfig.java:261)
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:117)
> > at org.apache.catalina.core.StandardContext.start
> > (StandardContext.java:4239)
> > at org.apache.catalina.core.ContainerBase.addChildInternal
> > (ContainerBase.java:791)
> > at org.apache.catalina.core.ContainerBase.addChild
> > (ContainerBase.java:771)
> > at org.apache.catalina.core.StandardHost.addChild
> > (StandardHost.java:525)
> > at org.apache.catalina.startup.HostConfig.deployDescriptor
> > (HostConfig.java:626)
> > at org.apache.catalina.startup.HostConfig.deployDescriptors
> > (HostConfig.java:553)
> > at org.apache.catalina.startup.HostConfig.deployApps
> > (HostConfig.java:488)
> > at org.apache.catalina.startup.HostConfig.check(HostConfig.java:
> > 1206)
> > at org.apache.catalina.startup.HostConfig.lifecycleEvent
> > (HostConfig.java:293)
> > at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > (LifecycleSupport.java:117)
> > at org.apache.catalina.core.ContainerBase.backgroundProcess
> > (ContainerBase.java:1337)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
> > at org.apache.catalina.core.ContainerBase
> >
> $ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
> > at org.apache.catalina.core.ContainerBase
> > $ContainerBackgroundProcessor.run(ContainerBase.java:1590)
> > at java.lang.Thread.run(Thread.java:619)
> > Jan 29, 2008 11:55:05 AM org.apache.catalina.startup.ContextConfig
> > start
> > SEVERE: Marking this application unavailable due to previous error(s)
> > Jan 29, 2008 11:55:05 AM org.apache.catalina.core.StandardContext
> > start
> > SEVERE: Error getConfigured
> > Jan 29, 2008 11:55:05 AM org.apache.catalina.core.StandardContext
> > start
> > SEVERE: Context [] startup failed due to previous errors
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> <mailto:users-unsubscribe_at_jersey.dev.java.net>
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
> <mailto:users-help_at_jersey.dev.java.net>
>
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109