Hi
Is there a guide somewhere to update from 3.3. to 3.5?
I've added the dependencies:
hibernate-core.3.5.1-Final.jar
and
javassist-3.9.0.GA.jar
I noticed that Hibernate.STRING and other are deprecated but it does compile ok...
When I run a test that does Schema validation, I now get this:
[junit] Testcase: testSchemaValidation took 14.5 sec
[junit] Caused an ERROR
[junit] No Dialect mapping for JDBC type: -1
[junit] org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
[junit] at org.hibernate.dialect.TypeNames.get(TypeNames.java:79)
[junit] at org.hibernate.dialect.TypeNames.get(TypeNames.java:104)
[junit] at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:347)
[junit] at org.hibernate.mapping.Column.getSqlType(Column.java:208)
[junit] at org.hibernate.mapping.Table.validateColumns(Table.java:280)
[junit] at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1174)
[junit] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
[junit] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:387)
[junit] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
[junit] at com.appendium.pf.AbstractTestCase.setUp(AbstractTestCase.java:52)
[junit] at com.appendium.pf.beans.SchemaValidationTest.setUp(SchemaValidationTest.java:22)
Any suggestion? this is new since upgrading...
This seems to be related to using a "text" field (mapped to a String).
This throws the exception <property name="changes" type="text" />
This is ok <property name="changes" type="clob" />
BUT the class is using String for field 'changes', so it does not work at runtime!
Any suggestion? Thanks!
I'm using OracleDialect
My hibernate.cfg.xml is as follows:
Code:
<hibernate-configuration>
<session-factory name="test">
<!-- connection and DB details -->
<!-- Oracle -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="connection.url">jdbc:oracle:thin:@//localhost:1521/orcl</property>
<property name="connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name="connection.username">XXXXXXXXXX</property>
<property name="connection.password">XXXXXXXXXX</property>
<!-- transaction handling -->
<property name="current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</property>
<!-- schema validation -->
<property name="hbm2ddl.auto">validate</property>
<!-- optimisation -->
<property name="jdbc.batch_size">32</property>
<property name="default_batch_fetch_size">8</property>
<property name="jdbc.fetch_size">2</property>
<property name="max_fetch_depth">2</property>
<property name="cglib.use_reflection_optimizer">true</property>
<!-- logging -->
<property name="show_sql">true</property>
<property name="use_sql_comments">true</property>
<property name="format_sql">true</property>
<!-- caching -->
<property name="cache.use_second_level_cache">false</property>
<property name="cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="cache.use_query_cache">false</property>
<!-- mappings ==================================================================== -->
<mapping resource="hibernate/Accrual.hbm.xml" />
...
</session-factory>
</hibernate-configuration>