From 8f7c40356af80705086519ad53d73ed291c41736 Mon Sep 17 00:00:00 2001 From: loy Date: Fri, 2 Feb 2018 17:23:11 +0800 Subject: [PATCH] =?UTF-8?q?hibernate=E4=BD=BF=E7=94=A8=E6=94=B9=E8=BF=87?= =?UTF-8?q?=E5=8C=85=E5=90=8D=E7=9A=84hsql=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/third/org/hibernate/dialect/HSQLDialect.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java b/fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java index 52a6cabdb..aeb25c7a6 100644 --- a/fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java +++ b/fine-hibernate/src/com/fr/third/org/hibernate/dialect/HSQLDialect.java @@ -114,7 +114,14 @@ public class HSQLDialect extends Dialect { super(); 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 ); hsqldbVersion = Integer.parseInt( versionString.substring( 0, 1 ) ) * 100;