Problem with Java Server Faces on JDK 1.6

On my new project, I had a problem with the web application deployment, which consisted of the classic combination of Java Server Faces, Spring Framework, iBatis. I guess it was because I asked Google’s bad, but I spent it, how to solve this problem, some time, so they deserve an entry in my blog.

So what was the problem? Once I tried to deploy to Tomcat, I got this error message:

java.lang.ClassNotFoundException: [Ljava.lang.String;
at org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass (WebappClassLoader.java: 1491)
at com.sun.faces.config.ConfigureListener.configure (ConfigureListener.java: 635)
at com.sun.faces.config.ConfigureListener.configure (ConfigureListener.java: 422)
        ...

I tried various queries, but I was not successful. When I lost hope, I found the following link, which is described bug in JDK .

Before I come across this error, because the last one was a web application to JDK 1.5, where everything works fine. So if anybody knows this bug, I offer the „official workaround.

Just pass the JVM startup parameter:

-Dsun.lang.ClassLoader.allowArraySyntax = true

Leave a Reply

Tato stránka používá Akismet k omezení spamu. Podívejte se, jak vaše data z komentářů zpracováváme..