Browse Source

hibernate使用改过包名的hsql问题

10.0
loy 7 years ago
parent
commit
8f7c40356a
  1. 9
      fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java

9
fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java

@ -114,7 +114,14 @@ public class HSQLDialect extends Dialect {
super(); super();
try { try {
final Class props = ReflectHelper.classForName( "org.hsqldb.persist.HsqlDatabaseProperties" ); Class p;
try {
// loy: 我们的hsql驱动改了包名,这里也改下
p = ReflectHelper.classForName( "com.fr.third.org.hsqldb.persist.HsqlDatabaseProperties" );
} catch (Exception e) {
p = ReflectHelper.classForName( "org.hsqldb.persist.HsqlDatabaseProperties" );
}
final Class props = p;
final String versionString = (String) props.getDeclaredField( "THIS_VERSION" ).get( null ); final String versionString = (String) props.getDeclaredField( "THIS_VERSION" ).get( null );
hsqldbVersion = Integer.parseInt( versionString.substring( 0, 1 ) ) * 100; hsqldbVersion = Integer.parseInt( versionString.substring( 0, 1 ) ) * 100;

Loading…
Cancel
Save