You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gustavo Cebrian <gu...@greenhatconsulting.com> on 2003/08/21 19:05:19 UTC

Exception.

Has anyone come across this exception?

javax.servlet.ServletException: Exception processing JAR at resource path /WEB-INF/lib/jaxb-api.jar
	at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
	at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
	at org.apache.catalina.core.StandardService.start(StandardService.java:497)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
	at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
	at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
----- Root Cause -----
java.io.FileNotFoundException
	at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:344)
	at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:161)
	at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:42)
	at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:78)
	at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:85)
	at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:69)
	at org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:906)
	at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
	at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)

***********************************************
Gustavo Cebrian
Analyst/Programmer

Want to improve the ROI on your EAI project?
Download RV Tester and reduce your development 
and testing timescales by as much as 50%. 
http://www.greenhatconsulting.com/rvtester 

Green Hat Consulting Ltd.
107 Fleet Street, London EC4A 2AB
DDI +44 (0)20 7936 9495
Mobile +44 (0)7788 922291
http://www.greenhatconsulting.com
gustavo.cebrian@greenhatconsulting.com
***********************************************




-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org]
Sent: 21 August 2003 12:10
To: Tomcat Users List
Subject: Re: Setting the root application


That is because / matches EVERY request so you have replaced the default 
servlet. Your servelt is now responsible for serving images.

An easy workaround is to:
- use welcome file listing in web.xml
- create a welcome file (ex: index.jsp) that redirects to your servlet mapped 
to a better mapping

-Tim

Duncan Strang wrote:
> Hi
>  
> I hope you don't consider this too trivial a question but I have tried
> everything I can think of to get this working. I have read as much of
> the docs as I can, looked at the faq's and searched the archives. I know
> the information is there but I can't find it.
>  
> I want to make my application the root application.
> That is, I don't want to have to type in the context path after the port
> I just want to type http://localhost:8080
>  
> Actually I have this working.
> The first resource accessed is a Servlet
> here's my servlet mapping
>  
>    <servlet-mapping>
>         <servlet-name>LocaleChecker</servlet-name>
>         <url-pattern>/</url-pattern>
>     </servlet-mapping>
>  
> When I access http://localhost:8080 <http://localhost:8080/>  the
> servlet executes and forwards the request to a jsp dependant on weather
> a cookie is available
>  here is the server.xml that sets the root application
>  
> <Context path="" docBase="mydir" debug="0"/>
>  
> here is the jsp that is being executed
>  
> ...
>  
> <%System.out.println("JSP resource paths = " +
> application.getResourcePaths("")); %>
>  
> <br><br>
> <table>
>     <tr>
>         <td><img src="/images/england.gif"></td>
>     </tr>
> </table>
>  
> ...
>  
> The output from getResourcePaths is
>  
> JSP resource paths = [/header.jsp, /images/, /.nbattrs, /getCountry.jsp,
> /WEB-INF/]
> Yes, the images are available in the images directory.
>  
> However, no matter what I do I cannot get the images to display. I have
> tried every conceivable path expression without luck.
>  
> Any halp much appreciated.
>  
> Cheers
> Duncan L.Srang
>  
>  
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org