3 Replies Latest reply on Nov 17, 2010 8:22 AM by Peter Johnson

    JSP Precompile Error

    acc01 Newbie

      Hi,

       

      I am trying to precompile JSPs using jasper in jboss 4.3 cp08. (http://community.jboss.org/wiki/PrecompileJSPs)

       

      It starts off fine, and then suddently throws teh followign error:

       

      java.lang.ExceptionInInitializerError

       

      Any ideas what causes this?

        • 1. Re: JSP Precompile Error
          Wolf-Dieter Fink Master

          I think it will be difficult to give you an answer/idea with this sparse information

          • 2. Re: JSP Precompile Error
            acc01 Newbie

            I understand, but thats the only error that is thrown. The ANT task that generates JAVA from the JSP is as follows:

             

                 <echo>Creating java source from jsp</echo>
                    <taskdef classname="org.apache.jasper.JspC" name="jasper2">
                        <classpath id="jspc.classpath">
                            <pathelement location="${java.home}/../lib/tools.jar" />
                            <path refid="war.classpath"/>
                            <path refid="jboss.classpath"/>      
                        </classpath>
                    </taskdef>

             

                    <jasper2 validateXml="false" uriroot="${war.path}" webXmlFragment="${war.path}/WEB-INF/generated_web.xml" addWebXmlMappings="true" outputDir="${war.path}/WEB-INF/src" />

             

            Not sure what else I can provide. I only asked this question incase this is somethign that may have been encountered by someone in the past.

            • 3. Re: JSP Precompile Error
              Peter Johnson Master
              Not sure what else I can provide.

              So what you are saying is that when you ran ant the only output you got was that one line you posted (the exception name) and nothingelse? Hmm, your copy of ant must be corrupted, I recommend you reinstall ant! ;-)

               

              But seriously, it would have helped if you posted the full ant output, or at least the full stack trace for the error. Postrng the JSP file that failed is probably also helpful.

               

              Does the "jasper2" task have an option to retain the generated .java file? If so, post thatalso.

               

              Finally, run ant with the -v option, that will provide more information. That is the output you should post.