Wednesday, July 4, 2007

Yet another blog

Hey dude, are you out of mind? You have too many blogs already! Why create a new one?

Hehe true. But since I'm working on too many different things I believe I really need a new blog. This one will be about problems I encounter on my projects (and surely the solutions to them). I hope this will help those who encounter the same problem as me.

Now let's get onto the first problem.

Since the return of an old friend who was fighting alongside with me in the fierce battle to wipe out all the evilness in this world, I am now working on a new project - Enfair (you'll hear more details about it soon :P). The project makes use of 2 common libraries - JSF and MyFaces Tomahawk. On his comp everything went smoothly without any problem. But on mine the stupid thing always refused to work by throwing a crazy exception:

07/07/04 16:50:43 oracle.classloader.util.AnnotatedClassNotFoundException:

Missing class: [Ljava.lang.String;

Dependent class: com.sun.faces.config.ConfigureListener
Loader: current-workspace-app.web.Tomahawk-Project1-webapp:0.0.0
Code-Source: .../jdevstudio10132/jdev/mywork/Tomahawk/Project1/public_html/WEB-INF/lib/jsf-impl.jar
Configuration: WEB-INF/lib/ directory in .../jdevstudio10132/jdev/mywork/Tomahawk/Project1/public_html/WEB-INF/lib

This load was initiated at current-workspace-app.web.Tomahawk-Project1-webapp:0.0.0 using the loadClass() method.

Been trying to resolve the problem without any luck, I tried deploying the project to Tomcat. A similar exception is thrown:

java.lang.ClassNotFoundException: [Ljava.lang.String;
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

It has been bugging me for quite a while until I entered the right keyword on Google and found the solution.

The problem was that Tomahawk and the JSF library bundled with JDeveloper were not fully compatible in Java 6. Fortunately there have been a new patch from https://javaserverfaces.dev.java.net to fix it. I downloaded version 1.2_04 P02 (23 May 2007) and it runs like a charm now :)

So scary how a tiny problem could lead to a big disaster.