org.hibernate.HibernateException: No DatabaseDialectMapper known for database [DB2]

java2s.com | 2 months ago
  1. 0

    Help « Exception « JPA Q&A

    java2s.com | 2 months ago
    org.hibernate.HibernateException: No DatabaseDialectMapper known for database [DB2]
  2. 0

    Bug 193280 – org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: DB2

    netbeans.org | 1 year ago
    org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: DB2
  3. 0

    [LEP-2469] HibernateException: Hibernate Dialect must be explicitly set for database: DB2 UDB for AS/400 - Liferay Issues

    liferay.com | 1 year ago
    org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: DB2 UDB for AS/400
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JBoss 4.0.4 Entity Bean using EJB 3.0 w/ Sybase 12.5

    Google Groups | 1 decade ago | puneet...@gmail.com
    org.hibernate.HibernateException: Hibernate Dialect must be explicitly set for database: Adaptive Server Enterprise
  6. 0

    under mysql, union-subclass doesn't work when calling session.create(); the key cannot be generated since the PLAYER table isn't autoincrement configured (which seems logic). It may be a mistake i did or a mysql limitation, but i wanted to share this unit test with you guys. mapping file: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.eyrolles.sportTracker.model"> <class name="Person" table="PERSON"> <id name="id" column="PERSON_ID"> <generator class="native"/> </id> <property name="name" column="PERSON_NAME"/> <property name="birthday" column="BIRTHDAY"/> <property name="height" column="HEIGHT"/> <property name="weight" column="WEIGHT"/> <union-subclass name="Player" > <property name="specificPlayerProperty" /> </union-subclass> <union-subclass name="Coach" > <property name="specificCoachProperty" /> </union-subclass> </class> </hibernate-mapping> classes public class Person { private Long id; private String name; private Date birthday; private float height; private float weight; ... } public class Player extends Person implements Serializable{ private String specificPlayerProperty; ... } public class Coach extends Person implements Serializable{ private String specificCoachProperty; ... } unitTest (schemaexport activated): public class TestH3Inheritance extends TestCase { public void testMakePersistant() throws Exception { System.out.println("==========testMakePersistant========"); Session session = HibernateUtil.getSession(); Transaction tx=null; try { tx = session.beginTransaction(); Player player = new Player("Anthony"); session.create(player); tx.commit(); } catch (Exception e) { if (tx!=null) tx.rollback(); e.printStackTrace(); throw e; } finally { session.close(); System.out.println("==========testMakePersistant========"); } } ... } stacktrace: create table PERSON ( PERSON_ID bigint not null auto_increment, PERSON_NAME varchar(255), BIRTHDAY datetime, HEIGHT float, WEIGHT float, primary key (PERSON_ID) ) 22:19:01,904 DEBUG SchemaExport:154 - create table Coach ( PERSON_ID bigint not null, PERSON_NAME varchar(255), BIRTHDAY datetime, HEIGHT float, WEIGHT float, specificCoachProperty varchar(255) ) 22:19:01,936 DEBUG SchemaExport:154 - create table Player ( PERSON_ID bigint not null, PERSON_NAME varchar(255), BIRTHDAY datetime, HEIGHT float, WEIGHT float, specificPlayerProperty varchar(255) ) 22:19:01,951 INFO SchemaExport:166 - schema export complete 22:19:01,967 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:mysql://localhost/SportTracker Running test... ==========testMakePersistant======== Hibernate: insert into Player (PERSON_NAME, BIRTHDAY, HEIGHT, WEIGHT, specificPlayerProperty) values (?, ?, ?, ?, ?) org.hibernate.HibernateException: The database returned no natively generated identity value at org.hibernate.persister.BasicEntityPersister.getGeneratedIdentity(BasicEntityPersister.java:2020) at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1558) at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1955) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:30) at org.hibernate.event.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:221) at org.hibernate.event.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:148) at org.hibernate.event.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:94) at org.hibernate.event.DefaultCreateEventListener.entityIsTransient(DefaultCreateEventListener.java:105) at org.hibernate.event.DefaultCreateEventListener.onCreate(DefaultCreateEventListener.java:65) at org.hibernate.event.DefaultCreateEventListener.onCreate(DefaultCreateEventListener.java:33) at org.hibernate.impl.SessionImpl.create(SessionImpl.java:678) at org.hibernate.impl.SessionImpl.create(SessionImpl.java:682) at com.eyrolles.sportTracker.test.TestH3Inheritance.testMakePersistant(TestH3Inheritance.java:26) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at com.eyrolles.sportTracker.test.TestCase.runTest(TestCase.java:18) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) i can upload the sources

    Hibernate JIRA | 1 decade ago | Anthony Patricio
    org.hibernate.HibernateException: The database returned no natively generated identity value

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      No DatabaseDialectMapper known for database [DB2]

      at com.safeway.app.wmas.appointment.scheduler.impl.CompareVersionsTask.processChanges()
    2. com.safeway.app
      CompareVersionsTask.processChanges
      1. com.safeway.app.wmas.appointment.scheduler.impl.CompareVersionsTask.processChanges(CompareVersionsTask.java:428)
      1 frame
    3. test.safeway.app
      CompareVersionsTaskTest.testProcessChangesForCreateAction
      1. test.safeway.app.wmas.appointment.scheduler.impl.CompareVersionsTaskTest.testProcessChangesForCreateAction(CompareVersionsTaskTest.java:143)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
      3. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
      4. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
      5. java.lang.reflect.Method.invoke(Method.java:391)
      5 frames
    5. JUnit
      TestSuite.run
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      7. junit.framework.TestSuite.runTest(TestSuite.java:208)
      8. junit.framework.TestSuite.run(TestSuite.java:203)
      8 frames
    6. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
      3 frames