2008 m. spalio 30 d., ketvirtadienis

Starting RichFaces with Eclipse

Hello!

Here what I faced when followed yesterday the "An Introduction To JBoss RichFaces", an extremely good article on "kickstart" of using RichFaces with Eclipse. I thank very much the author of the article Max Katz for the excellent tutorial!

But, of course, I never passed through without problems... And I had problems here too...

1 To be smart :) I installed the currently latest release of Eclipse for Java EE Developers (Ganymede: ) instead of Europa release given in the article. Then I had a happy time trying to install latest JBoss Tools plugin (currently JBossTools-2.1.2.GA-ALL-win32.zip) with the all same result: JBoss Tools failed to visualize its palette. Finally I found myself stairing at the bootom right of the JBoss Release 2.1.2.GA page where one can find that the 2.1.2.GA is only for WTP 3.3.2 (Europa release) but not Ganymede (WTP 3.4.x release). That is... the currently latest release of JBoss Tools is not compatible with the currently latest release of Eclipse. Pitty. But nothing doing though.
So, I installed Europa and enjoyed seeing the JBoss Tools palette.

2 Now, let us take the template souce from the article. I put it as instructed but the addition environmental choice had not appaired :( . When tried to create JSF project with JSF Environment "JSF 1.2 with Facelets" I got an error on Tomcat 6.0.18 server start:

SEVERE: Error configuring application listener of class com.sun.faces.config.ConfigureListener
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener

I had to spend a lot of time not knowing that after we install new templates we MUST do something with the workspace directory of Eclipse. In my case, I closed Eclipse, deleted its workspace directory lanched Eclipse again and... voilà! I got the power :) ... The environmental choice did appair.

3 So, its time to server's start... Ooops!!! It crashes again :'(. Thank you, the reason differs and I could start figureing out the reason again. The error message was: Content is not allowed in prolog. Ok, it was quite simple to resolve. In Web.xml between the xml header and web-app version number there a line appaired
(2.5 == "2.5")
surely, xml files may not have anything there. So I deleted this line and successfully started server. This line appaired in xml because in the project creation wizard's I selected Servlet version 2.5 instead of 2.4. If I leave the default the problem does not appair. So you must follow the Max Katz tutorial very precisely: hi writes "
  1. For a template, select one based on the Tomcat version you are using
  2. Click Finish to create the project
"
If you press Finish you will never go to the wrong place to choose wrong configuration as I regretably did.

So I hope, dear reader, that you will not repeat my mistakes. :)

Komentarų nėra: