Summary: | $CATALINA_BASE/shared/lib and $CATALINA_BASE/shared/classes libraries not found in specific deployments | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | Peter Lynch <plynch> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | P1 | ||
Version: | 5.5.12 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | other | ||
Attachments: |
testcases 2 passing
testcases 2 failing |
Description
Peter Lynch
2006-05-16 00:00:41 UTC
Created attachment 18292 [details]
testcases 2 passing
see the README.txt in each test case dir for info
Created attachment 18293 [details]
testcases 2 failing
see the README.txt in each test dir
clarify summary Wondering why this issue is not being looked at? Peter, issues can be ignored for many reasons. We appreciate your bug reports, and as you can see no one has questioned its contents. However, no one appears to care enough to comment, vote, or provide a patch. Please remember that most of us are volunteers, we don't get paid to fix a specific bug. That's why the best chance for a speedy fix of this issue is if you provide a working patch as an attachment to this Bugzilla item. I'm also downgrading the severity of this issue, because there's an easy workaround of putting the relevant class(es) or jar(s) in the webapp-specific classloader repositories. Shapira, To add to what Peter Lynch had experienced, what if theres exists a need for a set of classes to be shared across all the contexts. In this case, the ideal place is shared/lib, though the shared classes can be placed in tomcat/common too. When we place the required jar in common/lib, the classes reffered within the shared classes that are not actually shared across contexts also need to be placed there. Am I correct ? Jain, /shared/lib and /shared/classes do work in Tomcat 5.5.23. The problem that Peter was experiencing is due to a specific advanced configuration, where the webapp is being deployed by using a context.xml file. When the app is deployed into webapps folder, as is the usual way, everything is fine. I have not tested and do not know if and why Peter's deployment using context xml file behaves differently. As far as I understand, the existence of /shared/lib is a requirement of Servlet Spec. E.g. in Servlet Spec. 2.4 chapter SRV.9.7.1 we may read "When a number of applications make use of the same code or resources, they will typically be installed as library files in the container. (...) The container must provide a directory for these libraries. The files placed within this directory must be available across all Web applications. The location of this directory is container-specific." Konstantin. Found the cause: The context files of those applications that are failing have privileged="true" on their <Context> element. If privileged flag is set, the Webapp classloader of the application uses the Server (aka Catalina) classloader instead of the Shared one as its parent. That is by design and WONTFIX. Though that is not mentioned in class-loader-howto.html, it is mentioned in the description of the privileged attribute of Context here: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html *** This bug has been marked as a duplicate of bug 44094 *** |