Generated sources by JAXB and problem with encoding

I recently had to solve the problem with JAXB to generate bad source from XSD. The problem was basically that the XSD source from which they were subsequently generated Java code contained in the tag Czech diacritics characters, and unfortunately, the output files were not generated in the UTF-8, but the native format of operating system of my laptop, which is MacCentralEurope.
Pokračovat ve čtení „Generated sources by JAXB and problem with encoding“

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 ( 1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass ( 1491)
at com.sun.faces.config.ConfigureListener.configure ( 635)
at com.sun.faces.config.ConfigureListener.configure ( 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