We had the same problem two weeks ago. Upgrading Tomcat to 5.0.28 made it go
away. 

Mark Langley
CaseBank Technologies Inc.
http://www.casebank.com


-----Original Message-----
From: Darren Hartford [mailto:[EMAIL PROTECTED] 
Sent: November 8, 2004 10:54 AM
To: Maven Users List
Subject: Class Cast exception trying to use org.apache.jasper.JspC

Hey all,
Having an issue trying to pre-compile JSP's for Tomcat5.

Rather than repeating, below is a post back in March with the same problem.

I may just be having a difficult time going through the mailing list and
using google - I just can not find a solution.  Any help would be greatly
appreciated! (note: my maven.xml is slightly different, but same problem).
-D

=======
Todays task: pre-compiling JSPs...

I have the following in my maven.xml:

 <goal name="compile-jsp">
    <ant:path id="jspc.classpath">
      <ant:path refid="maven.dependency.classpath"/>
      <ant:pathelement path="${maven.build.dest}"/>
    </ant:path>

<ant:taskdef name="jasper2"   classname="org.apache.jasper.JspC"
classpathref="jspc.classpath"/>
    <ant:jasper2
      package="${pom.package}.jsp"
      destDir="${maven.war.src}"
      uriroot="${maven.war.src}"
      srcdir="${maven.war.src}"
      classpathref="jspc.classpath">
      <ant:include name="**/*.jsp"/>
      <ant:exclude name="**/includes/**/*.jsp"/>
    </ant:jasper2>
   </goal>

I have as dependencies:
servlet-api,jasper-compiler,jasper-runtime,jsp-api,catalina-ant,catalina
-deployer

Running this same ant script using just ant, everything works great
(using the Tomcat 5 deployer distribution). Under Maven however, i get a
ClassCast Exception. My guesses here is that the version of Ant packaged
with Maven (im using RC1) and the org.apache.jasper.JspC are not
compatible.

So is there another way to run this from maven? For example can I
replace the Ant jars in $MAVEN_HOME$/lib ? Can I create a build.xml file
that is called from Maven in a separate JVM to accomplish this?

I've tried using the ant:jspc task inside maven.xml, but that is causing
errors as well, and i'm not interested in compiling pages for tomcat 4.

Any suggestions would be greatly appriciated.

jc
======


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


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

Reply via email to