UVAshley / krank

Automatically exported from code.google.com/p/krank
0 stars 0 forks source link

Exception in 'Employee Records' while running crank-crud-webapp #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. svn co http://krank.googlecode.com/svn/tags/crank-base-1.0.4 crank
2. cd crank
3. mvn install
4. cd examples/crank-crud-webapp
5. mvn jetty:run
6. Click 'Employee records'

What is the expected output? What do you see instead?

The expected output is the listing. What I see is

javax.el.ELException: /file:/C:/Documents%20and%20Settings/fgonzalez/.m2/
repository/org/crank/crank-jsf-support/1.0.4/crank-jsf-support-1.0.4.jar!/
META-INF/template/listing.xhtml @177,47 value="#{jsfCrudAdapter.model}": 
org.springframework.jdbc.BadSqlGrammarException: 
PreparedStatementCallback; bad SQL grammar [select id, firstName, 
lastName, 5 from Employee LIMIT 10 OFFSET 0]; nested exception is 
java.sql.SQLException: Unexpected token: 10 in statement [select id, 
firstName, lastName, 5 from Employee LIMIT 10 OFFSET 0]

LIMIT and OFFSET should be used with table alias in hsqldb.

Please find a patch to EmployeeDataSource.java attached (not tested with 
MySQL).

Original issue reported on code.google.com by fglez....@gmail.com on 13 Jan 2010 at 3:19

Attachments: