Hi Anand,

I had done that before. So, including more info for better clarity.
Here is the Exception:

SEVERE: Error loading WebappClassLoader
    [java]   delegate: false
    [java]   repositories:
    [java] ----------> Parent Classloader:
    [java] [EMAIL PROTECTED]
    [java]  org.apache.jasper.servlet.JspServlet
    [java] java.lang.ClassNotFoundException: 
org.apache.jasper.servlet.JspServlet
    [java]     at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
    [java]     at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)

Here is the (part of the ) properties.
....
   <property name="catalina.jar"             
value="apache-tomcat-5.5.17/server/lib/catalina.jar"/>
   <property name="tomcat-util.jar"          
value="apache-tomcat-5.5.17/server/lib/tomcat-util.jar"/>
   <property name="naming-factory.jar"       
value="apache-tomcat-5.5.17/common/lib/naming-factory.jar"/>
   <property name="commons-modeler.jar"      
value="apache-tomcat-5.5.17/server/lib/commons-modeler.jar"/>
   <property name="catalina-storeconfig.jar" 
value="apache-tomcat-5.5.17/server/lib/catalina-storeconfig.jar"/>
   <property name="tomcat-coyote.jar"        
value="apache-tomcat-5.5.17/server/lib/tomcat-coyote.jar"/>
....


Here is the path element.

<path id="tomcat.libs">
<pathelement location="${catalina.jar}"/>
       <pathelement location="build"/>
        ....
       <pathelement location="${jasper-compiler.jar}"/>
       <pathelement location="${servlets-default.jar}"/>
       <pathelement location="${jasper-compiler-jdt.jar}"/>
       <pathelement location="${jasper-runtime.jar}"/>
       <pathelement location="${jsp-api.jar}"/>
       <pathelement location="${catalina-ant-jmx.jar}"/>
       <pathelement location="${catalina-ant.jar}"/>
       <pathelement location="${catalina-optional.jar}"/>
        ...

   </path>


[EMAIL PROTECTED] wrote:
Jeevan...

Think so in the classpath tag simple U have created a target. Point the
target to  path where dependency jar files exists in the environment by
using the below tag.

<path id="tomcat.libs">
      <pathelement location="${<jar files path>}"/>
</path>

Try after doing the same.

rgds,
anand




Jeevan <Jeevan.Ramakrish To: user@ant.apache.org [EMAIL PROTECTED]> cc: (bcc: anandsrider.d/Polaris) Sent by: Subject: ClassNotFoundException when appropriate jat in classpath Jeevan.Ramakrishn [EMAIL PROTECTED] 07/17/2006 12:01 PM Please respond to "Ant Users List"



Hi All,
I have a weird problem. I am a beginner with ant, I am trying to run a
program which contains the following code sample.

<Javacode>
System.setProperty("catalina.home", mTomcatHome);
System.setProperty("catalina.base", mTomcatHome);
String[] serverArgs = {"-config","conf" + File.separator + "server.xml"
,"start"};
Catalina server = new Catalina();
server.setParentClassLoader(getClass().getClassLoader());
server.process(serverArgs);
</Javacode>

using the following ant script

<target name="tomcat" description="Deploy the application and run tomcat">
         <mkdir dir="${build.dir}"/>
         <javac srcdir="./util" destdir="." includeAntRuntime="no"
includeJavaRuntime="no"
               fork="yes" memoryMaximumSize="${jvm.maxmemory}"
debug="${debug.flag}"
               deprecation="${deprecation.flag}">
           <classpath>
                <path refid="tomcat.libs"/>
            </classpath>
         </javac>
         <java classname="util.TomcatBooter" fork="yes">
              <arg value="${catalina.home}"/>
              <classpath>
                <path refid="tomcat.libs"/>
              </classpath>
         </java>
     </target>

Although on running this target the tomcat starts, tomcat is not
rendering the pages and puts out an Exception that says
java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet.
Although I have included all the jars available from tomcat including
jasper-compiler.jar (which contains JspServlet).
I have tried it out with a shell script and it works just fine.
Any help is appreciated.
Thanks and Regards,
Jeevan


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



This e-Mail may contain proprietary and confidential information and is sent 
for the intended recipient(s) only.  If by an addressing or transmission error 
this mail has been misdirected to you, you are requested to delete this mail 
immediately. You are also hereby notified that any use, any form of 
reproduction, dissemination, copying, disclosure, modification, distribution 
and/or publication of this e-mail message, contents or its attachment other 
than by its intended recipient/s is strictly prohibited.

Visit us at http://www.polaris.co.in


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

Reply via email to