Hibernate version:3.1.2
I am getting really frustrated here. I have an SQLServer db and an Oracle db.
I have a test using a simple JDBC connection and anothe test using hibernate. With Oracle settings all is fine in both tests.
With the SQLServer db the simple JDBC connection is fine.
Using hibernate I get:
15-05-2008 11:07:00 [main] WARN - SQL Error: 208, SQLState: S0002
15-05-2008 11:07:00 [main] ERROR - Invalid object name 'GROUPS'.
My properties are:
Code:
hibernate.dfwv.connection.isolation=2
hibernate.dfwv.max_fetch_depth=1
hibernate.dfwv.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.dfwv.show_sql=true
hibernate.dfwv.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
hibernate.dfwv.connection.url=jdbc:sqlserver://localhost;databaseName=mydb
hibernate.dfwv.connection.username=sa
hibernate.dfwv.connection.password=mypassword
hibernate.dfwv.jdbc.batch_size=0
The stack trace is
Code:
15-05-2008 11:17:14 [main] DEBUG - could not execute query [select this_.ABB_GROUP_NAME as ABB1_27_0_, this_.VERSION as VERSION27_0_, this_.LAST_UPD as LAST3_27_0_, this_.DISPLAY_GROUP_NAME as DISPLAY4_27_0_ from GROUPS this_]
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'GROUPS'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.sendExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteQuery(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1552)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at org.springframework.orm.hibernate3.HibernateTemplate$5.doInHibernate(HibernateTemplate.java:520)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
at org.springframework.orm.hibernate3.HibernateTemplate.loadAll(HibernateTemplate.java:516)
at uk.co.formfill.dfcommon.data.dfwv.group.GroupDaoHibernate.getAllGroups(GroupDaoHibernate.java:61)
at uk.co.formfill.dfcommon.data.dfwv.group.BillsGroupDaoHibernateIntegrationTest.testGetAllGroups(BillsGroupDaoHibernateIntegrationTest.java:64)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
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 junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)