Ok here's my problem:-

I have a Singleton class that gets instantiated while the Servlet(a 
container servlet) initializes and in my web application I have JSPs with 
Javabeans which then use the Singleton class(called TomcatManager) to get 
handles on the Wrapper and Deployer objects so that I can control my 
web-aplications.

The need here is to contol/administer web applications from a single point 
and we wanted to have more control on adminstering the webapp but 
automatically copying JARs required etc which the default Admin would not do.

So here's what I did:-

I took the catalina.jar that comes in CATALINA_HOME/server/lib and copied 
it on to CATALINA_HOME/comman/lib.

And here's the exception that I get from the Java bean that's trying to use 
the Deployer class:-

java.lang.LinkageError: Class org/apache/catalina/Context violates loader 
constraints
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:670)
        at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1088)
        at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:987)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at 
com.lbi.cas.deployment.handlers.ListCASHandler.<init>(ListCASHandler.java:27)
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at 
com.lbi.cas.deployment.components.RequestManager.getRequestHandler(RequestManager.java:70)
        at 
org.apache.jsp._0002fjsp_0002fc3_0005fcas_0005flist_jsp._jspService(_0002fjsp_0002fc3_0005fcas_0005flist_jsp.java:90)

If I'm right this is sometihng to do with dependencies of the classes.

I'm not sure where I'm going wrong.

Anand


Reply via email to