Oracle に接続しようとしていますが、構成でこのプロパティを有効にしていても、Hibernate-5.0 でこのエラーが発生します。
> Aug 10, 2015 8:49:34 AM org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Aug 10, 2015 8:49:35 AM org.hibernate.AssertionFailure <init>
ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: getGeneratedKeys() support is not enabled
Exception in thread "main" org.hibernate.AssertionFailure: getGeneratedKeys() support is not enabled
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.checkAutoGeneratedKeysSupportEnabled(StatementPreparerImpl.java:94)
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:113)
at org.hibernate.id.SequenceIdentityGenerator$Delegate.prepare(SequenceIdentityGenerator.java:93)
私のhibernate.cfg.xmlは以下の通りです。
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">*****</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@*****</property>
<property name="hibernate.connection.username">*****</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.jdbc.use_get_generated_keys">true</property>
<property name="show_sql">true</property>
<property name="connection.pool_size">1</property>
<!-- List of XML mapping files -->
<mapping resource="mapping/Employee.hbm.xml" />
</session-factory>
そして Employee.hbm.xml は以下のようになります
<hibernate-mapping>
<class name="domain.Employee" table="EMPLOYEE">
<id name="id" type="integer" column="id">
<generator class="sequence-identity">
<param name="sequence">EMP_SEQ</param>
</generator>
</id>
<property name="firstName" column="first_name" type="string" />
<property name="lastName" column="last_name" type="string" />
<property name="salary" column="salary" type="integer" />
</class>
何度も試しましたが解決しないようです。ここでどこが間違っているのですか?任意のポインターは大きな助けになります。前もって感謝します。