tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: JSP pre-compilation problem
Date Thu, 21 Jun 2007 12:50:33 GMT
Dunno, but I thought jetty was using jasper from glassfish not apache.
You might try using the maven jspc plugin from codehaus, it works for  
us in geronimo.

With the latest version you can specify exactly which jasper version  
you want to use, here's the snippet from the geronimo pom:

                 <plugin>
                     <groupId>org.codehaus.mojo.jspc</groupId>
                     <artifactId>jspc-maven-plugin</artifactId>
                     <version>2.0-SNAPSHOT</version>
                     <executions>
                         <execution>
                             <goals>
                                  <goal>compile</goal>
                             </goals>
                             <configuration>
                                 <warSourceDirectory>${pom.basedir}/ 
src/main/webapp</warSourceDirectory>
                             </configuration>
                         </execution>
                     </executions>

                     <!-- Use the Tomcat 6 JSP compiler, but with our  
custom Jasper version -->
                     <dependencies>
                         <dependency>
                             <groupId>org.codehaus.mojo.jspc</groupId>
                             <artifactId>jspc-compiler-tomcat6</ 
artifactId>
                             <version>2.0-SNAPSHOT</version>
                             <exclusions>
                                 <exclusion>
                                     <groupId>org.apache.tomcat</ 
groupId>
                                     <artifactId>jasper</artifactId>
                                 </exclusion>
                             </exclusions>
                         </dependency>

                         <dependency>
                             <groupId>org.apache.tomcat</groupId>
                             <artifactId>jasper</artifactId>
                             <version>6.0.13-G543818</version>
                         </dependency>
                     </dependencies>
                 </plugin>

thanks
david jencks

On Jun 21, 2007, at 6:37 AM, Kevin Jackson wrote:

> Hi all,
>
> I'm working with mvn and the jetty jspc plugin for pre-compiling jsps
> and I've come across this error:
>
> [INFO] [jetty-jspc:jspc {execution: jspc}]
> 2007-06-21 11:15:18.969::INFO:  Logging to STDERR via  
> org.mortbay.log.StdErrLog
> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
> [Lorg.apache.jasper.compiler.JavacErrorDetail;
>        at org.apache.jasper.compiler.JDTJavaCompiler.compile 
> (JDTJavaCompiler.java:466)
>        at org.apache.jasper.compiler.Compiler.generateClass 
> (Compiler.java:317)
>        at org.apache.jasper.compiler.Compiler.compile(Compiler.java: 
> 364)
>        at org.apache.jasper.JspC.processFile(JspC.java:1137)
>        at org.apache.jasper.JspC.execute(JspC.java:1306)
>        at org.mortbay.jetty.jspc.plugin.JspcMojo.compile 
> (JspcMojo.java:284)
>        at org.mortbay.jetty.jspc.plugin.JspcMojo.execute 
> (JspcMojo.java:213)
>
> I've looked online (and to be honest I cannot find the JDTJavaCompiler
> src, but I did find the JDTCompiler src @
> http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/ 
> apache/jasper/compiler/JDTCompiler.java)
> which had the following:
>
> if (!problemList.isEmpty()) {
>            JavacErrorDetail[] jeds =
>                (JavacErrorDetail[]) problemList.toArray(new
> JavacErrorDetail[0]);
>            errDispatcher.javacError(jeds);
>        }
>
> From my limited knowledge of the codebase, this looks like a likely
> candidate for the cause of the error message I'm seeing.  I'm going to
> swap the jspc plugin to (a slightly modified version of) the standard
> mvn jspc plugin to see if the same error occurs.
>
> I also checked the tomcat bugzilla and didn't find anything that  
> looked similar.
>
> env info:
> -tomcat version 6.0.13
> -mvn version 2.0.7
> -jetty jspc plugin version 6.1.0
> -jdk6
>
> Thanks,
> Kev
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message