Vlib example

Stefan Wachter <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
Hi all.

I am currently evaluating Tapestry. I like very much what I saw until now.

However, I had some difficulties in running the Vlib example. I am using
JBoss with a MySQL database. In the method OperationsBean.validateUniquePerson
two SQL statements are constructed that are not valid for MySQL. The problem
is simply the spaces after the LOWER keyword. In MySQL no spaces must appear
between the LOWER keyword and the following parenthesis. The lines to change
are:

            ...
            assembly.addParameter("LOWER  (EMAIL) = ?", trimmedEmail);
            ...
and
            ...
            assembly.addParameter("LOWER (FIRST_NAME) = ?",
trimmedFirstName);
            ...
            assembly.addParameter("LOWER (LAST_NAME) = ?", trimmedLastName);
            ...

The second problem that I encountered is that the VARCHAR data type can have
at most 255 characters for the MySQL database. Therefore I had to adjust the
jbosscmp-jdbc.xml file.

After these two changes the application runs great.

--Stefan



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.