DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39589>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39589

           Summary: $CATALINA_BASE/shared/lib and
                    $CATALINA_BASE/shared/classes not found in specific
                    deployments
           Product: Tomcat 5
           Version: 5.5.12
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P1
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


ENV:
JDK 1.5.0_05
Tomcat 5.5.12
JAMonapi ( jamonapi.sf.net ) 020106
Linux or Windows

I am using JAMonapi war file as a simple example test case, however I expect the
problem to occur with any webapp deployed in the same way.

According to Tomcat 5.5. documentation:
http://tomcat.apache.org/tomcat-5.5-doc/appdev/deployment.html - Shared Library
Files
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
"Shared - This class loader is the place to put classes and resources that you
wish to share across ALL  web applications (unless Tomcat internal classes also
need access, in which case you should put them in the Common  class loader
instead). All unpacked classes and resources in $CATALINA_BASE/shared/classes,
as well as classes and resources in JAR files under $CATALINA_BASE/shared/lib,
are made visible through this class loader. If multiple Tomcat instances are run
from the same binary using the $CATALINA_BASE environment variable, then this
classloader repositories are relative to $CATALINA_BASE rather than 
$CATALINA_HOME."

Basic Test Setup - the steps below are for reference. See the attached zip files
for the complete test CATALINA_BASE files for four test cases. TWO PASS, TWO 
FAIL.

1. Install tomcat 5.5.12 and add env. variable CATALINA_HOME to point to the
directory of the installation.
2. Create a CATALINA_BASE directory with all the prerequisite directories:
conf/
logs/
shared/lib
temp/
webapps/
work/

3. Add an CATALINA_BASE env variable to point to the base directory made in 
step 2

4. Add a shared library to the $CATALINA_BASE/shared/lib dir. In this case it
will be JAMon-020106.jar.

5. Install simple config files to $CATALINA_BASE/conf - server.xml, web.xml,
tomcat-users.xml ( see zip files )

6. Create a standard context file called JAMon.xml and install to 
$CATALINA_BASE/conf/<enginename>/<hostname>/JAMon.xml
($CATALINA_BASE/conf/test-engine/localhost/JAMon.xml in the tests)

7. Edit the following files as required with the correct paths in the failing
test cases:
   Correct the docBase in $CATALINA_BASE/conf/test-engine/localhost/JAMon.xml
to point to either the JAMon.war file or the expanded webapp in a directory.

According to the tomcat documentation I expect the test cases which fail to 
pass.

To run the tests I used 'catalina.sh start' and 'catalina.bat start'. Examine
the contents of catalina.out in CATALINA_BASE/logs dir for the
ClassNotFoundException after starting the container. IN the failing tests if the
 shared jar file contents are placed in $CATALINA_BASE/shared/classes it also
results in ClassNotFoundException.

It should look like this:


$ cat ./logs/catalina.out 
15-May-2006 8:57:53 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-7082
15-May-2006 8:57:53 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1094 ms
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardService start
INFO: Starting service test
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.12
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
15-May-2006 8:57:54 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
INFO: Missing application web.xml, using defaults only
StandardEngine[test-engine].StandardHost[localhost].StandardContext[]
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter JAMonFilter
java.lang.ClassNotFoundException: com.jamonapi.JAMonFilter
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1338)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)
        at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:211)
        at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
        at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:79)
        at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3563)
        at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4133)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
        at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
        at
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:603)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
        at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
        at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
        at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
        at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
        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:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
15-May-2006 8:57:54 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/JAMon] startup failed due to previous errors
15-May-2006 8:57:55 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-7082
15-May-2006 8:57:55 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
15-May-2006 8:57:55 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1249 ms

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to