Results 1 to 2 of 2
  1. #1
    karq is offline Member
    Join Date
    May 2010
    Rep Power

    Default tomcat .war deploying error


    I made my first ant build file, what makes a .war file.
    Here's my build file:
    Java Code:
    <project name="datafilter" default="war" basedir=".">
        <property name="lib.dir" value="lib" />
        <property name="web.content" value="web" />
        <property name="src.dir" value="src" />
        <property name="build.dir" value="build" />
        <property name="" value="datafilter" />
        <property name="conf.dir" value="etc" />
        <property name="dist.dir" value="dist" />
    	<path id="classpath">
     	<fileset dir="${basedir}/lib">
                    <include name="annotations-api.jar"/>
                    <include name="antlr-2.7.6.jar"/>
                    <include name="asm.jar"/>
                    <include name="asm-attrs.jar"/>
                    <include name="catalina.jar"/>
                    <include name="catalina-ant.jar"/>
                    <include name="catalina-ha.jar"/>
                    <include name="catalina-tribes.jar"/>
                    <include name="cglib-2.1.3.jar"/>
                    <include name="commons-collections-2.1.1.jar"/>
                    <include name="commons-logging-1.1.jar"/>
                    <include name="dom4j-1.6.1.jar"/>
                    <include name="ehcache-1.2.3.jar"/>
                    <include name="ejb3-persistence.jar"/>
                    <include name="el-api.jar"/>
                    <include name="hibernate3.jar"/>
                    <include name="hibernate-annotations.jar"/>
                    <include name="hibernate-commons-annotations.jar"/>
                    <include name="hibernate-entitymanager.jar"/>
                    <include name="hibernate-tools.jar"/>
                    <include name="jasper.jar"/>
                    <include name="jasper-el.jar"/>
                    <include name="jasper-jdt.jar"/>
                    <include name="javassist.jar"/>
                    <include name="jdbc2_0-stdext.jar"/>
                    <include name="jsp-api.jar"/>
                    <include name="jta.jar"/>
                    <include name="log4j-1.2.16.jar"/>
                    <include name="postgresql-8.3-603.jdbc3.jar"/>
                    <include name="servlet-api.jar"/>
                    <include name="tomcat-coyote.jar"/>
                    <include name="tomcat-dbcp.jar"/>
                    <include name="tomcat-i18n-es.jar"/>
                    <include name="tomcat-i18n-fr.jar"/>
                    <include name="tomcat-i18n-ja.jar"/>
    <target name="clean">
    	<echo>Cleaning the ${build.dir}</echo>
    	<delete dir="${build.dir}"/>
    <target name="init" depends="clean">
    	<echo>Creating the build directory</echo>
    	<mkdir dir="${build.dir}/WEB-INF/classes"/>
    	<mkdir dir="${build.dir}/WEB-INF/lib"/>
    <target name="compile" depends="init">
    	<echo>Compile the source files</echo>
    	<javac srcdir="${src.dir}" destdir="${build.dir}/WEB-INF/classes">
    		<classpath refid="classpath"/>
    <target name="copy" depends="compile">
    	<copy todir="${build.dir}/WEB-INF">
    		<fileset dir="${conf.dir}"/>
    	<copy todir="${build.dir}">
    		<fileset dir="${web.content}"/>
    	<copy todir="${build.dir}/WEB-INF/lib">
    		<fileset dir="${lib.dir}"/>
    <target name="war" depends="copy">
    	<echo>Building the war file</echo>
    	<war destfile="${dist.dir}/${}.war" webxml="${build.dir}/WEB-INF/web.xml">
    		<fileset dir="${build.dir}"/>
    After deploying and running my app in tomcat I get this error:
    Java Code:
    org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Zurich, Switzerland
    Rep Power


    Quote Originally Posted by karq View Post
    After deploying and running my app in tomcat I get this error:
    [CODE]org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcesso r cannot be cast to org.apache.AnnotationProcessor

    i couldn't find any errors in your build.xml. but look here for other sources

    DefaultAnnotationProcessor cannot be cast

    it seem to be a very common exception.

Similar Threads

  1. Replies: 0
    Last Post: 09-23-2010, 07:34 AM
  2. Error while deploying WAR file
    By aks_1 in forum Java Servlet
    Replies: 1
    Last Post: 05-04-2010, 05:57 PM
  3. error deploying Enterprise application
    By mihael in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 01-30-2009, 11:46 AM
  4. Error deploying Entity Bean
    By RobertoWIN_MX in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 05-01-2008, 05:17 AM
  5. Error while deploying.war in WAS6.1(Plz help)
    By Shweta.pattankar in forum Advanced Java
    Replies: 1
    Last Post: 07-12-2007, 07:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts