Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333314

Summary: As a user I want to specify custom classloader, authenticator and access log valves in web app's context.xml
Product: [RT] Gemini.Web Reporter: Violeta Georgieva <milesg78>
Component: unknownAssignee: Violeta Georgieva <milesg78>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: glyn.normington, milesg78
Version: unspecified   
Target Milestone: 1.2.0.M02   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
patch proposal none

Description Violeta Georgieva CLA 2010-12-29 14:59:21 EST
Hi,

I want to specify in the web application's context.xml the following configurations:
- custom classloader
- basic authenticator
- access log valve

1. When I specify a custom classloader the following exception is thrown:
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.loader.WebappLoader
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)

The problem is discussed also in the following mail thread:
http://dev.eclipse.org/mhonarc/lists/virgo-dev/msg00532.html

2. When I specify an authenticator the following exception is thrown:
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.authenticator.BasicAuthenticator
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)

3. When I specify an access log valve the following exception is thrown:
Caused by: java.lang.ClassNotFoundException: org.apache.catalina.valves.AccessLogValve
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)


In order to solve this issues I can propose to add the following packages:
- org.apache.catalina.loader
- org.apache.catalina.valves 
- org.apache.catalina.authenticator
To the "Import-Package" header of the "org.eclipse.gemini.web.tomcat" bundle.

Regards
Violeta
Comment 1 Violeta Georgieva CLA 2010-12-29 15:03:39 EST
Created attachment 185889 [details]
patch proposal
Comment 2 Glyn Normington CLA 2010-12-30 03:47:41 EST
The proposed fix seems reasonable to me.
Comment 3 Violeta Georgieva CLA 2010-12-30 09:23:53 EST
Tested, committed, pushed.