From: Pietro P. <de...@op...> - 2002-12-14 15:49:13
|
hi, following the suggestion of our one of the few, I tried to test the above dialect, with non glorious results (86 failures out of 91 :-( ). To proceeded I have focused only on MultiTableTest. The first reason is that I have tested the dialect in my applications with string assigned identifiers, and there seemed to be some problems with native identifiers: <id type="long" column="id_" > <generator class="native"/> </id> create table rootclass ( id_ INTEGER IDENTITY NOT NULL, countX INTEGER not null, name VARCHAR(255) null, address VARCHAR(255) null, dateX DATETIME null, parent INTEGER null, primary key (id_) ) Unsuccessful: [Microsoft][ODBC Microsoft Access Driver] Syntax error in CREATE TABLE statement. but if I state it as <id type="long" column="id_" > <generator class="hilo.long"/> </id> create table rootclass ( id_ INTEGER not null, countX INTEGER not null, name VARCHAR(255) null, address VARCHAR(255) null, dateX DATETIME null, parent INTEGER null, primary key (id_) ) the table is created fine. So I guess that its the IDENTITY keyword that irritates access. and I mended MsAccessDialect with: public String getIdentityColumnString() { //return "IDENTITY NOT NULL"; return "NOT NULL"; } Then all db schema operations proceed fine for this test (not for the others, I believe because of filed names, but I'll try this later). The next problem for this test is that I get this monstruous: 16:34:26,912 DEBUG DriverManagerConnectionProvider:97 - returning connection to pool 16:34:26,942 DEBUG SessionFactoryImpl:113 - Instantiating session factory 16:34:26,942 INFO Dialect:37 - Using dialect: cirrus.hibernate.sql.MSAccessDialect 16:34:26,942 INFO DriverManagerConnectionProvider:36 - Hibernate connection pool size: 2 16:34:26,952 INFO DriverManagerConnectionProvider:65 - Using driver: com.inzoom.jdbcado.Driver at URL: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=XXXXXXXX;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb 16:34:26,952 INFO DriverManagerConnectionProvider:66 - Connection properties: {user=admin, password=} 16:34:26,962 INFO PreparedStatementCache:49 - prepared statement cache size: 100 16:34:26,962 INFO SessionFactoryImpl:144 - Use outer join fetching: false 16:34:26,972 DEBUG DriverManagerConnectionProvider:78 - Opening new JDBC connection 16:34:26,982 DEBUG DriverManagerConnectionProvider:89 - Created connection to: jdbc:izmado:IzmDllPath=E:\cvs_out\teamwork\html\WEB-INF\lib\IzmJniAdo.dll;IzmRoyaltyFree=643122985;Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};Dbq=e:\cvs_out\teamwork\data\teamwork_ol.mdb, Isolation Level: 2 16:34:27,002 DEBUG DriverManagerConnectionProvider:97 - returning connection to pool 16:34:27,002 INFO SessionFactoryImpl:167 - Use scrollable result sets: true 16:34:28,935 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory 16:34:28,955 DEBUG SessionFactoryObjectFactory:76 - registered: 40288086f21dae9100f21dae9f470000 (unnamed) 16:34:28,965 INFO SessionFactoryObjectFactory:82 - no JDNI name configured 16:34:28,975 INFO SessionFactoryImpl:261 - Query language substitutions: {no='N', true=1, yes='Y', false=0} 16:34:28,975 INFO SessionFactoryImpl:264 - Query language imports: cirrus.hibernate.test 16:34:28,975 DEBUG SessionFactoryImpl:276 - Instantiated session factory 16:34:29,125 DEBUG SessionImpl:332 - opened session 16:34:29,125 DEBUG JDBCTransaction:34 - begin 16:34:29,125 DEBUG DriverManagerConnectionProvider:73 - Using cached JDBC connection 16:34:29,135 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Multi#123] 16:34:29,185 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.Simple#1234] 16:34:29,185 DEBUG SessionImpl:521 - saving [cirrus.hibernate.test.SubMulti#2] 16:34:29,185 DEBUG JDBCTransaction:48 - commit 16:34:29,185 DEBUG SessionImpl:1605 - flushing session 16:34:29,185 DEBUG SessionImpl:1682 - Flushing entities and processing referenced collections 16:34:29,205 DEBUG SessionImpl:1874 - Processing unreferenced collections 16:34:29,205 DEBUG SessionImpl:1898 - Scheduling collection removes/(re)creates/updates 16:34:29,205 DEBUG SessionImpl:1617 - Flushed: 3 insertions, 0 updates, 0 deletions to 3 objects 16:34:29,205 DEBUG SessionImpl:1622 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections 16:34:29,205 DEBUG SessionImpl:1652 - Executing 16:34:29,205 DEBUG MultiTableEntityPersister:484 - Inserting entity: cirrus.hibernate.test.Multi#123 16:34:29,205 DEBUG MultiTableEntityPersister:485 - Version: 0 16:34:29,215 DEBUG BatcherImpl:109 - 1 open PreparedStatements 16:34:29,215 DEBUG SessionFactoryImpl:469 - prepared statement get: insert into rootclass ( countX, name, address, dateX, id_ ) values ( ?, ?, ?, ?, ? ) 16:34:29,215 DEBUG PreparedStatementCache:67 - Preparing statement: insert into rootclass ( countX, name, address, dateX, id_ ) values ( ?, ?, ?, ?, ? ) 16:34:29,225 DEBUG BatcherImpl:109 - 2 open PreparedStatements 16:34:29,225 DEBUG SessionFactoryImpl:469 - prepared statement get: insert into nonleafsubclass ( extraProp, other2, po, cal, floaty, sid ) values ( ?, ?, ?, ?, ?, ? ) 16:34:29,225 DEBUG PreparedStatementCache:67 - Preparing statement: insert into nonleafsubclass ( extraProp, other2, po, cal, floaty, sid ) values ( ?, ?, ?, ?, ?, ? ) 16:34:29,235 DEBUG MultiTableEntityPersister:386 - Dehydrating entity: cirrus.hibernate.test.Multi#123 16:34:29,275 DEBUG JDBCExceptionReporter:33 - SQL Exception com.inzoom.adojni.ComException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented in Microsoft OLE DB Provider for ODBC Drivers code=3105 Type=1 at com.inzoom.ado.Command.jniExecute(Native Method) at com.inzoom.ado.Command.execute(Command.java:39) at com.inzoom.ado.Command.executeUpdate(Command.java:51) at com.inzoom.ado.Command.executeUpdate(Command.java:42) at com.inzoom.jdbcado.PreparedStatement.executeUpdate(PreparedStatement.java:81) at cirrus.hibernate.persister.MultiTableEntityPersister.insert(MultiTableEntityPersister.java:501) at cirrus.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at cirrus.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:1674) at cirrus.hibernate.impl.SessionImpl.execute(SessionImpl.java:1654) at cirrus.hibernate.impl.SessionImpl.flush(SessionImpl.java:1599) at cirrus.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:51) at cirrus.hibernate.test.MultiTableTest.testMultiTable(MultiTableTest.java:38) 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:324) 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 junit.swingui.TestRunner$16.run(TestRunner.java:623) 16:34:29,275 WARN JDBCExceptionReporter:35 - SQL Error: 3105, SQLState: 16:34:29,295 ERROR JDBCExceptionReporter:42 - [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented 16:34:29,295 DEBUG PreparedStatementCache:91 - recaching 16:34:29,295 DEBUG PreparedStatementCache:126 - Total checked-out statements: 1 16:34:29,295 DEBUG PreparedStatementCache:127 - Checked out: [insert into nonleafsubclass ( extraProp, other2, po, cal, floaty, sid ) values ( ?, ?, ?, ?, ?, ? )] 16:34:29,295 DEBUG PreparedStatementCache:91 - recaching 16:34:29,295 DEBUG PreparedStatementCache:126 - Total checked-out statements: 0 16:34:29,295 DEBUG PreparedStatementCache:127 - Checked out: [] 16:34:29,305 DEBUG SessionImpl:366 - transaction completion 16:34:29,325 DEBUG SessionImpl:2428 - Running Session.finalize() 16:34:29,325 DEBUG SessionImpl:366 - transaction completion 16:34:29,325 WARN SessionImpl:2438 - Unclosed connection actually I used to get ODBC Microsoft Access Driver]Optional feature not implemented in Microsoft OLE DB Provider for ODBC in my applications too, but by setting getDefaultProperties().setProperty(Environment.OUTER_JOIN, "false"); I had spelled the evil, but it reappeared in the tests. Help ! bye |