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. :)

Embedded JBoss on Tomcat6 with Java JDK 1.6

Several days ago I started evaluating Seam framework (http://www.seamframework.org) . Of course I found that the best application server to use with the framework is for sure JBoss AS.
That is, to follow the tutorial (http://docs.jboss.com/seam/latest/reference/en-US/html/tutorial.html) one has to install either JBoss AS or, if one preferes Tomcat, Embedded JBoss.
Our customer wants Tomcat. Thus, we must go with:

the latest Tomcat release (Tomcat 6.0.18)
the latest Java (JDK 1.6.0_07) and
the latest embedded jbos (embedded-jboss-beta3)
Windows XP SP3

In the installation guide we find that to work with JDK 1.6 a Java option must be set:
-Dsun.lang.ClassLoader.allowArraySyntax=true
That is perfectly clear but... don't expect to work if you install everithing as instucted in documentation: the issues is that if you install Tomcat 6 under its default path ("C:\Program Files\Apache Software Foundation\Tomcat 6.0") then the Tomcat server will crash starting!!!
After hours of googling I found a forum thread http://www.seamframework.org/18890.lace posing this problem and solving it.
Tomcat log shows
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Parse: name=vfsfile:/C:/Dokumente%20und%20Einstellungen/nes/Eigene%20Dateien/workspace/SUPCockpit/test-build/ state=Not Installed mode=Manual requiredState=Parse
(the example taken from http://www.seamframework.org/18890.lace).
And the problem is that the path to vfsfile includes spaces. Of course it does, because default tomcat installation path does!!! So, just reinstall Tomcat under installation directory with no spaces an the problem must go away! :)

Why am I starting my weblog

Nowadays I am performing an investigation in the field of available Rich Internet Application technologies. The targeted customer is an isurance company which would like to move its client/server intranet applicatio to Web. The programming language is one of the thing we have allready made a positive decisions about.

I spent a lot of time looking for the frameworks and IDE. Everybody knows there is a lot of them and I in no case want to start fruitless discussions on what frameworks or IDE is better. Nevertheless, I would not object comparying them to each other as far as we consider a feature in respect to abovementioned needs.

My main goal now is to help people who are installing a lot of different software, evaluating it, combining it with other pieces of soft and having lots of headackes, not to repeate mistakes that I did.