Differences between revisions 4 and 5
Revision 4 as of 2006-05-13 01:42:23
Size: 4730
Comment: ugly url
Revision 5 as of 2009-09-20 23:00:51
Size: 4734
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 56: Line 56:
also see [http://marc.theaimsgroup.com/?l=tomcat-user&m=111660999324714&w=2 for this problem] also see [[http://marc.theaimsgroup.com/?l=tomcat-user&m=111660999324714&w=2|for this problem]]
Line 72: Line 72:
[http://lists.apple.com/archives/Java-dev/2005/May/msg00760.html Description of the bug] [[http://lists.apple.com/archives/Java-dev/2005/May/msg00760.html|Description of the bug]]


The main problem is, although Tomcat 5.5.9 requires a JDK 5.0 it wont allow to compiler 5.0 constructs out of the box.

MyFaces, Tomcat 5.5.9, JDK 1.4.x

Install Tomcat, apply the compatibility pack mentioned on the Apache Tomcat website, then follow the normal MyFaces installation instructions for Tomcat 5.5.x.

MyFaces, Tomcat 5.5.9, JDK 1.5.x

Install Tomcat, then follow the normal MyFaces installation instructions for Tomcat 5.5.x.

If you need to use Java 5.0 language constructs, you'll need to revert the JSP compiler to the default JDK one. The integrated jikes-compiler is not working in this particular version of Tomcat. There is a howto on the Tomcat website to get those things up and running, but that howto is wrong. The correct way to get things up and running is following:

first of all remove all jikes related jars from the tomcat lib dir,
second add tools.jar from the jdk to the tomcat classpath
third add ant.jar from an ant installation to the classpath
fourth replace the servlet entry from the conf/web.xml 



and now startup tomcat with a working jdk 1.5 and pages should compile

also see for this problem

Another way probably would be to replace the integrated jikes with the one from Eclipse 3.1, this way however has not been tested at the time of writing this.

The downside of this approach is, that a valid JDK is needed while the integrated jikes would allow to use only a JRE. But until the version problems are not solved using the javac compiler instead and a JDK probably is the better approach.

Special considerations on the Mac

Although the latest version of MacOS delivers a JDK 5.0 out of the box there are several problems to get Tomcat and MyFaces up and running. The problem is, that with newer JDK versions and in combination with Tomcat following bug occurs:

Description of the bug

so, if an error message similar to following:

>  org.apache.jasper.JasperException: Unable to compile class for JSP
>  Generated servlet error:
>  error: error reading /System/Library/Java/Extensions/libJ3D.jnilib; java.util.zip.ZipException: error in opening zip file
>  1 error
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
> org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:246)  
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) 
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

is thrown, os refuses to compile the jsp, the reason for this is a strange bug caused by the combination of osx and jasper, where jasper assumes that everything under certain dirs referenced by javac is java and as soon as it hits a binary this error is thrown. This problem happens with a handful of binaries, installed by subversion, XCode and other tools. The only solution for now, neither Apple nor the ASF have fixed the problem yet, is to move the binaries out of the search path. Once this is done everything else regarding JDK 5.0 and Tomcat should be followed and MyFaces should run.

Tomcat_5_5_9_configuration (last edited 2009-09-20 23:00:51 by localhost)