tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <je...@ptc.com>
Subject Re: Tomcat 7.0.25 issue
Date Mon, 23 Jan 2012 21:07:44 GMT
Okay, I got impatient since I couldn't find any matching bug in the 
database and filed bug 52511 
<https://issues.apache.org/bugzilla/show_bug.cgi?id=52511>.

On 1/23/2012 2:56 PM, Jess Holle wrote:
> Note that the exception logged says:
>
> 2012-01-23 09:13:01,010 ERROR [pool-8-thread-1] 
> org.apache.catalina.startup.ContextConfig  - Unable to determine URL 
> for WEB-INF/classes
> javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found
>     at 
> org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
>     at 
> org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
>     at 
> org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
>     at 
> org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
>     at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
>     at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>     at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>     at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
>     at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>     at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
>     at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
>     at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>     at 
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
>     at 
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
>     at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>     at java.lang.Thread.run(Thread.java:662)
>
> Clearly the lack of /WEB-INF/classes is not worthy of an exception, 
> nor an error.
>
> On 1/23/2012 2:15 PM, Jess Holle wrote:
>> If one's web-app does not contain WEB-INF/classes, Tomcat 7.0.25 logs 
>> an error.
>>
>> This has never been considered an error in any Tomcat to date that I 
>> am aware of -- nor any other servlet engine I've tried.
>>
>> This appears to be an accident as ContextConfig had:
>>
>>                         webinfClasses = 
>> context.getServletContext().getResource(
>>                                 "/WEB-INF/classes");
>>                         processAnnotationsUrl(webinfClasses, webXml);
>>
>> and now has
>>
>>                         NamingEnumeration<Binding>  listBindings =
>>                             
>> context.getResources().listBindings("/WEB-INF/classes");
>>                         while (listBindings.hasMoreElements()) {
>>                             Binding binding = 
>> listBindings.nextElement();
>>                             if (binding.getObject() instanceof 
>> FileDirContext) {
>>                                 File webInfCLassDir =
>>                                     new File(
>>                                         ((FileDirContext) 
>> binding.getObject()).getDocBase());
>>                                 
>> processAnnotationsFile(webInfCLassDir, webXml);
>>                             }
>>                         }
>>
>> which is all well and good except for the differences in behavior 
>> when /WEB-INF/classes is not found.
>>
>> Is there a bug and/or patch for this?
>>
>> If not I can file a bug -- and hack my own patch, I suppose, though 
>> I'd appreciate a stab at a patch by someone who is actually familiar 
>> with this code (which I am not).
>>
>> -- 
>> Jess Holle


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message