[b]Hibernate version: Hibernate 2.1.2[/b]
[b]Mapping documents:[/b]
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="at.oeamtc.um.model.UMUserActivation" table="users_activation">
<id name="id" type="long">
<column name="ID" />
<generator class="identity"/>
</id>
<property name="userid" type="long"/>
<property name="code" type="string"/>
<property name="activated" type="integer"/>
<property name="username" type="string"/>
<property name="password" type="string"/>
<property name="usergroup" type="string"/>
<property name="pnr" type="long"/>
<property name="active" type="string"/>
<property name="auth_activation" type="timestamp"/>
<property name="auth_deactivation" type="timestamp"/>
<property name="auth_registration" type="timestamp"/>
<property name="birthdate" type="date"/>
<property name="cont_adr_home_city" type="string"/>
<property name="cont_adr_home_country" type="string"/>
<property name="cont_adr_home_district" type="string"/>
<property name="cont_adr_home_geo_lat" type="float"/>
<property name="cont_adr_home_geo_long" type="float"/>
<property name="cont_adr_home_hnr" type="string"/>
<property name="cont_adr_home_state" type="string"/>
<property name="cont_adr_home_street" type="string"/>
<property name="cont_adr_home_zip" type="string"/>
<property name="cont_email_home" type="string"/>
<property name="cont_fax_home" type="string"/>
<property name="cont_phone_home" type="string"/>
<property name="deceased" type="integer"/>
<property name="emp_active" type="integer"/>
<property name="emp_empnr" type="string"/>
<property name="emp_joindate" type="date"/>
<property name="emp_leavedate" type="date"/>
<property name="firstname" type="string"/>
<property name="gender" type="string"/>
<property name="group_tentative" type="integer"/>
<property name="lastlogin" type="date"/>
<property name="lastmodified" type="date"/>
<property name="lastname" type="string"/>
<property name="memberinfo_active" type="integer"/>
<property name="memberinfo_category" type="string"/>
<property name="memberinfo_joindate" type="date"/>
<property name="memberinfo_leavedate" type="date"/>
<property name="mailing_permit_email" type="integer"/>
<property name="mailing_permit_im" type="integer"/>
<property name="mailing_permit_mobile" type="integer"/>
<property name="mailing_permit_post" type="integer"/>
<property name="salutation" type="string"/>
<property name="title" type="string"/>
<property name="user_type" type="string"/>
<property name="newsletter" type="string"/>
</class>
</hibernate-mapping>
[b]Code between sessionFactory.openSession() and session.close():[/b]
...
// this code is done once at init of application
Configuration cfg = new Configuration();
cfg.addClass(UMUserActivation.class);
sessions = cfg.buildSessionFactory();
...
// this code is done with each create
session = sessions.openSession();
Long l = (Long)session.save(o);
o.setId(l);
session.flush();
session.close();
...
[b]Full stack trace of any exception that occurs:[/b]
2004-10-22 14:45:40,257 ERROR [main] store.Config (init:73) - Dialect does not support identity key generation
net.sf.hibernate.MappingException: Dialect does not support identity key generation
at net.sf.hibernate.dialect.Dialect.getIdentitySelectString(Dialect.java:289)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:633)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:715)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at at.oeamtc.um.store.Config.init(Config.java:71)
at at.oeamtc.um.store.Config.<init>(Config.java:58)
at at.oeamtc.um.store.Config.<clinit>(Config.java:42)
at at.oeamtc.um.UmServiceTestCase.<init>(UmServiceTestCase.java:46)
at at.oeamtc.um.UmServiceTestSuite.suite(UmServiceTestSuite.java:19)
at at.oeamtc.um.AllTests.suite(AllTests.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.getTest(RemoteTestRunner.java:364)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:398)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
2004-10-22 14:45:40,273 ERROR [main] store.Config (<clinit>:44) - net.sf.hibernate.MappingException: Dialect does not support identity key generation
at.oeamtc.um.manager.UMServerException: net.sf.hibernate.MappingException: Dialect does not support identity key generation
at at.oeamtc.um.store.Config.init(Config.java:74)
at at.oeamtc.um.store.Config.<init>(Config.java:58)
at at.oeamtc.um.store.Config.<clinit>(Config.java:42)
at at.oeamtc.um.UmServiceTestCase.<init>(UmServiceTestCase.java:46)
at at.oeamtc.um.UmServiceTestSuite.suite(UmServiceTestSuite.java:19)
at at.oeamtc.um.AllTests.suite(AllTests.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.getTest(RemoteTestRunner.java:364)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:398)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
Caused by: net.sf.hibernate.MappingException: Dialect does not support identity key generation
at net.sf.hibernate.dialect.Dialect.getIdentitySelectString(Dialect.java:289)
at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:633)
at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:715)
at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:41)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:750)
at at.oeamtc.um.store.Config.init(Config.java:71)
... 13 more
Failed to invoke suite(): at.oeamtc.um.manager.UMServerException: not initialized or init not successful
[b]Name and version of the database you are using:[/b]
MySQL 3.23.41
[b]MySql Driver:[/b]
mysql-connector-java-3.0.15-ga-bin.jar
[b]Create of Table:[/b]
DROP TABLE IF EXISTS `users_activation`;
CREATE TABLE IF NOT EXISTS `users_activation` (
`id` int(11) NOT NULL auto_increment,
`userid` int(11) default NULL,
`code` varchar(64) default NULL,
`activated` tinyint(1) default '0',
`username` varchar(20) default NULL,
`password` varchar(100) default NULL,
`usergroup` varchar(40) default NULL,
`pnr` int(8) default NULL,
`active` tinyint(1) default '0',
`auth_activation` datetime default NULL,
`auth_deactivation` datetime default NULL,
`auth_registration` datetime default NULL,
`birthdate` date default NULL,
`cont_adr_home_complete` tinyint(1) default '0',
`cont_adr_home_city` varchar(30) default NULL,
`cont_adr_home_country` char(2) default NULL,
`cont_adr_home_district` varchar(40) default NULL,
`cont_adr_home_geo_lat` float default NULL,
`cont_adr_home_geo_long` float default NULL,
`cont_adr_home_hnr` varchar(18) default NULL,
`cont_adr_home_state` varchar(40) default NULL,
`cont_adr_home_street` varchar(30) default NULL,
`cont_adr_home_zip` varchar(7) default NULL,
`cont_adr_work_complete` tinyint(1) default '0',
`cont_adr_work_city` varchar(30) default NULL,
`cont_adr_work_country` char(2) default NULL,
`cont_adr_work_district` varchar(40) default NULL,
`cont_adr_work_geo_lat` float default NULL,
`cont_adr_work_geo_long` float default NULL,
`cont_adr_work_hnr` varchar(18) default NULL,
`cont_adr_work_state` varchar(40) default NULL,
`cont_adr_work_street` varchar(30) default NULL,
`cont_adr_work_zip` varchar(7) default NULL,
`cont_email_home` varchar(255) default NULL,
`cont_email_work` varchar(255) default NULL,
`cont_fax_home` varchar(40) default NULL,
`cont_fax_work` varchar(40) default NULL,
`cont_phone_home` varchar(40) default NULL,
`cont_phone_work` varchar(40) default NULL,
`deceased` tinyint(1) default '0',
`emp_active` tinyint(1) default '0',
`emp_empnr` varchar(6) default NULL,
`emp_joindate` date default NULL,
`emp_leavedate` date default NULL,
`firstname` varchar(40) default NULL,
`gender` char(1) default NULL,
`group_tentative` tinyint(1) default '0',
`lastlogin` datetime default NULL,
`lastmodified` datetime default NULL,
`lastname` varchar(40) default NULL,
`memberinfo_active` tinyint(1) default '0',
`memberinfo_category` char(3) default NULL,
`memberinfo_joindate` date default NULL,
`memberinfo_leavedate` date default NULL,
`memberinfo_lv` tinyint(1) default NULL,
`mailing_permit_email` tinyint(1) default '0',
`mailing_permit_im` tinyint(1) default '0',
`mailing_permit_mobile` tinyint(1) default '0',
`mailing_permit_post` tinyint(1) default '0',
`memberinfo_service_sb` tinyint(1) default '0',
`memberinfo_service_creditcard` tinyint(1) default '0',
`memberinfo_service_eev` tinyint(1) default '0',
`memberinfo_service_uqwkrs` tinyint(1) default '0',
`memberinfo_zv` tinyint(2) default NULL,
`salutation` varchar(40) default NULL,
`title` varchar(40) default NULL,
`user_type` char(2) default NULL,
`newsletter` varchar(100) default NULL,
PRIMARY KEY (`id`),
KEY `code` (`code`),
KEY `pnr` (`pnr`),
KEY `emp_empnr` (`emp_empnr`),
KEY `active` (`active`),
KEY `cont_adr_home_city` (`cont_adr_home_city`),
KEY `cont_adr_home_country` (`cont_adr_home_country`),
KEY `cont_adr_home_zip` (`cont_adr_home_zip`),
KEY `cont_email_home` (`cont_email_home`),
KEY `emp_active` (`emp_active`),
KEY `firstname` (`firstname`),
KEY `gender` (`gender`),
KEY `group_tentative` (`group_tentative`),
KEY `lastname` (`lastname`),
KEY `mailing_permit_email` (`mailing_permit_email`),
KEY `memberinfo_active` (`memberinfo_active`),
KEY `memberinfo_leavedate` (`memberinfo_leavedate`),
KEY `username` (`username`)
) TYPE=MyISAM PACK_KEYS=0 COMMENT='Standard user data of UIDB' AUTO_INCREMENT=62 ;
|