MySQL not support by JMatter?

25 views
Skip to first unread message

Dema

unread,
Jun 20, 2006, 11:59:18 PM6/20/06
to jmatter
I am getting this when trying to use MySQL 5 with JMatter:

schema-x:
[echo] performing a schema export
[java] Exception in thread "main" org.hibernate.MappingException:
could not instantiate id generator
[java] at
org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:97)
[java] at
org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
[java] at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:182)
[java] at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
[java] at
com.u2d.persist.HBMSingleSession.init(HBMSingleSession.java:67)
[java] at com.u2d.app.Application.<init>(Application.java:51)
[java] at
com.u2d.persist.HibernatePersistor.main(HibernatePersistor.java:54)
[java] Caused by: org.hibernate.MappingException: Dialect does not
support sequences
[java] at
org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:531)
[java] at
org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:65)
[java] at
org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:93)
[java] ... 6 more
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 6 seconds

eitan

unread,
Jun 21, 2006, 3:12:38 AM6/21/06
to jmatter
ok, so the jmatter hbmmaker, the code that autogenerates the hibernate
mapping files for a given object model is currently configured to
specify
sequences as the mechanism the generating primary keys, which is my
preference (since i use postgres) but is of course a problem when using
a database that uses a different generator mechanism (mysql doesn't
support sequences).

short term fix: see com.u2d.persist.HBMMaker line 600 and uncomment:
// idGenElem.addAttribute("class", "native");
and comment out the subsequent code; or temporarily use postgres.

as you know, i just open-sourced this framework and
i'm sure a number of similar issues (supporting a community using
a diverse combination of tools) will inevitably come up.

eitan

unread,
Jun 21, 2006, 1:21:41 PM6/21/06
to jmatter
ok, i've tested mysql. switching to "native" pk generation fixes that
problem.
however, on linux i have discovered another bug with mysql that is
particular
to linux. the bug is already documented by mysql here:

http://bugs.mysql.com/bug.php?id=16894

i have tested only with v4.x so not sure about v5.x though the bug
description
lists both versions. so i'm not sure what i can do about this for
folks who want
to run mysql on linux...which i expect to be a fairly big chunk of the
user
population..

eitan

unread,
Jun 21, 2006, 1:34:55 PM6/21/06
to jmatter
ok, final update: i just upgraded to mysql v5 and tested jmatter with
it and it runs
great!

Reply all
Reply to author
Forward
0 new messages