JSP precompilation problem with Tomcat 5.0.26 embedded in JBoss 3.2.5

Discussion in 'Java' started by skidvd, Aug 5, 2004.

  1. skidvd

    skidvd Guest

    Hello:

    I am attempting to upgrade from JBoss 3.0.4 to 3.2.5. However,
    following the upgrade,
    I can no longer seem to precompile my JSPs as I did before. The
    following build.xml
    extract worked fine in 3.0.4:

    <jspc srcdir="${srcDir}" destdir="${jspDir}"
    package="${pkgName}" verbose="2"

    compilerclasspath="${env.CATALINA_HOME}/jasper-compiler.jar">
    <include name="**/*.jsp" />
    <classpath>
    <pathelement
    path="${env.CATALINA_HOME}/servlet-api.jar"/>
    <pathelement
    path="${env.CATALINA_HOME}/commons-logging.jar"/>
    <pathelement
    path="${env.CATALINA_HOME}/jasper-compiler.jar"/>
    <pathelement
    path="${env.CATALINA_HOME}/jasper-runtime.jar"/>
    <pathelement
    path="${env.XERCES_HOME}/xmlParserAPIs.jar"/>
    <pathelement path="${env.XERCES_HOME}/xercesImpl.jar"/>
    <pathelement path="${srcDir}/WEB-INF/lib/taglibs.jar"/>
    </classpath>
    </jspc>


    Follwing the 3.2.5 upgrade, this now produces errors such as the
    following:

    [jasperc] org.apache.jasper.JasperException: Unrecognized option:
    -v2.
    Use -help for help.

    I have also unsuccessfuly tried the apparently new, Tomcat 5
    recommended
    way of precompiling as follows:

    <taskdef classname="org.apache.jasper.JspC" name="jasper2">
    <classpath>
    <pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
    <fileset dir="${env.CATALINA_HOME}">
    <include name="*.jar"/>
    </fileset>
    <fileset dir="${env.CATALINA_HOME}/">
    <include name="servlet*.jar"/>
    </fileset>
    <fileset dir="${env.CATALINA_HOME}/">
    <include name="commons*.jar"/>
    </fileset>
    <pathelement path="${srcDir}/WEB-INF/lib/taglibs.jar"/>
    </classpath>
    </taskdef>

    <jasper2
    validateXml="false"
    uriroot="${srcDir}"
    webXmlFramgment="${srcDir}/WEB-INF/generated_web.xml"
    outputDir="${jspDir}"/>


    This produces the following error

    java.lang.IncompatibleClassChangeError: Implementing class

    What am I missing and/or not doing in the new version? This is a
    stock 3.2.5 installation. I'd appreciate any tips on what to investigate or
    how I might track this down and resolve it.

    Thanks!
     
    skidvd, Aug 5, 2004
    #1
    1. Advertising

  2. skidvd

    Thai DANG Guest

    Re: JSP precompilation problem with Tomcat 5.0.26 embedded in JBoss3.2.5

    ask your question in the tomcat-user mailing ! :)

    On 5 Aug 2004 08:32:59 -0700
    (skidvd) wrote:

    > Hello:
    >
    > I am attempting to upgrade from JBoss 3.0.4 to 3.2.5. However,
    > following the upgrade,
    > I can no longer seem to precompile my JSPs as I did before. The
    > following build.xml
    > extract worked fine in 3.0.4:
    >
    > <jspc srcdir="${srcDir}" destdir="${jspDir}"
    > package="${pkgName}" verbose="2"
    >
    > compilerclasspath="${env.CATALINA_HOME}/jasper-compiler.jar">
    > <include name="**/*.jsp" />
    > <classpath>
    > <pathelement
    > path="${env.CATALINA_HOME}/servlet-api.jar"/>
    > <pathelement
    > path="${env.CATALINA_HOME}/commons-logging.jar"/>
    > <pathelement
    > path="${env.CATALINA_HOME}/jasper-compiler.jar"/>
    > <pathelement
    > path="${env.CATALINA_HOME}/jasper-runtime.jar"/>
    > <pathelement
    > path="${env.XERCES_HOME}/xmlParserAPIs.jar"/>
    > <pathelement path="${env.XERCES_HOME}/xercesImpl.jar"/>
    > <pathelement path="${srcDir}/WEB-INF/lib/taglibs.jar"/>
    > </classpath>
    > </jspc>
    >
    >
    > Follwing the 3.2.5 upgrade, this now produces errors such as the
    > following:
    >
    > [jasperc] org.apache.jasper.JasperException: Unrecognized option:
    > -v2.
    > Use -help for help.
    >
    > I have also unsuccessfuly tried the apparently new, Tomcat 5
    > recommended
    > way of precompiling as follows:
    >
    > <taskdef classname="org.apache.jasper.JspC" name="jasper2">
    > <classpath>
    > <pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
    > <fileset dir="${env.CATALINA_HOME}">
    > <include name="*.jar"/>
    > </fileset>
    > <fileset dir="${env.CATALINA_HOME}/">
    > <include name="servlet*.jar"/>
    > </fileset>
    > <fileset dir="${env.CATALINA_HOME}/">
    > <include name="commons*.jar"/>
    > </fileset>
    > <pathelement path="${srcDir}/WEB-INF/lib/taglibs.jar"/>
    > </classpath>
    > </taskdef>
    >
    > <jasper2
    > validateXml="false"
    > uriroot="${srcDir}"
    > webXmlFramgment="${srcDir}/WEB-INF/generated_web.xml"
    > outputDir="${jspDir}"/>
    >
    >
    > This produces the following error
    >
    > java.lang.IncompatibleClassChangeError: Implementing class
    >
    > What am I missing and/or not doing in the new version? This is a
    > stock 3.2.5 installation. I'd appreciate any tips on what to investigate or
    > how I might track this down and resolve it.
    >
    > Thanks!
     
    Thai DANG, Aug 6, 2004
    #2
    1. Advertising

  3. skidvd

    skidvd Guest

    Thai:

    Thanks for your suggestion. I have posted this same question there
    with no response. I'll be happy to dig into this, but right now I
    clueless as to where to begin as the "IncompatibleClassChangeError:
    Implememting class" does not give me much to work with.

    Thanks in advance for any help anyone may be able to provide!
     
    skidvd, Aug 10, 2004
    #3
  4. On 10 Aug 2004 07:54:09 -0700, skidvd wrote:

    > Thanks for your suggestion. I have posted this same question there
    > with no response. I'll be happy to dig into this, but right now I
    > clueless as to where to begin as the "IncompatibleClassChangeError:


    And it was such that mindprod.com moved across the waters..
    And mindprod.com (that move across the waters) did state..
    <http://mindprod.com/jgloss/errormessages.html#INCOMPATIBLECLASSCHANGEERROR>

    HMPH ;-)

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Aug 10, 2004
    #4
  5. skidvd

    skidvd Guest

    Unfortunately I am still not making any progress with this issue. I
    have read and understand the Javadoc for the
    IncompatibleClassChangeError. However, I have not yet found anything
    that creates any different outcome from my attempts to change items
    possible indicated by that Exception.

    Perhaps the ANT stack trace and my build.xml filemay help. I'd
    cerainly appreaciet any and allhelp as I have been frustrated by this
    problem for over a week now with seemingly no progress despite
    significant effort.


    BUILD FAILED
    java.lang.IncompatibleClassChangeError: Implementing class

    java.lang.IncompatibleClassChangeError: Implementing class
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at
    org.apache.tools.ant.loader.AntClassLoader2.defineClassFromData(AntClassLoader2.java:76)
    at
    org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1073)
    at
    org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1137)
    at
    org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
    at
    org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:960)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:219)
    at
    org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
    at
    org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
    at
    org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    at org.apache.tools.ant.Task.perform(Task.java:364)
    at org.apache.tools.ant.Target.execute(Target.java:341)
    at org.apache.tools.ant.Target.performTasks(Target.java:369)
    at
    org.apache.tools.ant.Project.executeTarget(Project.java:1214)
    at
    org.apache.tools.ant.Project.executeTargets(Project.java:1062)
    at org.apache.tools.ant.Main.runBuild(Main.java:673)
    at org.apache.tools.ant.Main.startAnt(Main.java:188)
    at
    org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
    at
    org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)


    Here is the excerpt from my build.xml

    <target name="jspc" depends="prepare, compile"
    description="prepares JSP source files">

    <!-- <echoproperties/> -->
    <echo message="About to define JspC task"/>
    <taskdef classname="org.apache.jasper.JspC" name="jasper2">
    <!--
    -->
    <classpath id="jspc.classpath">
    <pathelement path="${env.JAVA_HOME}/lib/tools.jar"/>
    <fileset dir="${env.CATALINA_HOME}">
    <include name="jasper-compiler.jar"/>
    </fileset>
    <pathelement path="${srcDir}/WEB-INF/lib/taglibs.jar"/>
    </classpath>
    </taskdef>
    <echo message="after JspC task defintion"/>

    <echo message="About to invoke jasper2"/>
    <jasper2
    validateXml="false"
    uriroot="${srcDir}"
    webXmlFramgment="${srcDir}/WEB-INF/generated_web.xml"
    outputDir="${jspDir}"/>

    </target>

    <target name="jspCompile" depends="jspc"
    description="compiles JSP source files">
    <javac srcdir="${jspDir}" destdir="${srcDir}/WEB-INF/classes"
    classpathref="classpath"/>
    </target>


    I would greatly appreciate any and all help in resolving this
    issue as I am at my wits end and out of ideas to try.

    Thanks in advance!
     
    skidvd, Aug 11, 2004
    #5
  6. skidvd

    rrahimunisa

    Joined:
    Dec 12, 2008
    Messages:
    1
    do you still need help? i figured out a way to precompile jsp. But now i have problems when i change my jsp. tomcat is not precompiling new jsp's.
     
    rrahimunisa, Dec 12, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bcassand
    Replies:
    4
    Views:
    1,482
    Martin Moessner
    Jan 12, 2004
  2. Dale
    Replies:
    0
    Views:
    2,417
  3. teo
    Replies:
    4
    Views:
    500
  4. harryos
    Replies:
    0
    Views:
    570
    harryos
    Dec 1, 2008
  5. Roxy
    Replies:
    5
    Views:
    698
    Arne Vajhøj
    Dec 16, 2008
Loading...

Share This Page