UVAshley / krank

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

default krank build uses incorrect dialect for mysql #25

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Checkout and build crank as per
http://code.google.com/p/krank/wiki/BuildingCrankWithMaven

2. Modify examples/blank-project to use a simple JPA-annotated pojo (add
class to persistence.xml, add class to crud managed objects, add pages and
faces-config for a simple listing)

3. Set up applicationContext.xml to connect to a mysql database with the
table for the pojo already in place

4. Attempt to load up the listing page

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

Should get the listing, instead I get a hibernate error saying there is an
error in my syntax. Turns out the problem is that Hibernate isn't using the
correct dialect for mysql. Had to change the dialect property of the
jpaVendorAdapter to org.hibernate.dialect.MySQLInnoDBDialect like this:

<bean name="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    <property name="showSql" value="true" />
    <property name="databasePlatform"
value="org.hibernate.dialect.MySQLInnoDBDialect" />
</bean>

Then I'm able to get listings from the db.

What version of the product are you using? On what operating system?

Trunk build of krank, Windows XP

Please provide any additional information below.

This is a great product that fills IMHO a huge gap in Java web development.
Keep up the good work!

default krank build uses incorrect dialect for mysql

Original issue reported on code.google.com by k2e...@gmail.com on 4 Mar 2008 at 8:48