Thứ Tư, 9 tháng 9, 2009

Javax.faces.FacesException: java.lang.ClassNotFoundException: [Ljava.lang.String;

Đây là một trong những nguyên nhần gây nên lỗi HTTP 404 (request not available)
================================================================
1. java.lang.ClassNotFoundException: [Ljava.lang.String;
2. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386) 3. at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232) 4. at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:635)
5. at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:422)
6. at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
================================================================
Solutions:
Since I'm running this from within Eclipse 3.4 - WTP it is easily solvable by locating JVM runtime in Eclipse's preferences (Window->Preferences->Installed JREs), highlighting the entry and adding runtime parameter -Dsun.lang.ClassLoader.allowArraySyntax=true
Save it and run your project, you should not see this problem anymore. If you are running straight Tomcat then add the same runtime option into Catalina.sh (Catalina.bat on Windows)

1 nhận xét:

night star nói...

sao hok up lên wmits ???

Đăng nhận xét