From: Gavin K. <Gav...@ex...> - 2002-12-15 02:07:49
|
Pietro, its best to concentrate on FooBarTest first, since that is the most generic set of tests. And you should go through and remove all the test code that relates to features that are unsupported by Access (I'm thinking subselects in particular). > -----Original Message----- > From: Pietro Polsinelli [mailto:de...@op...]=20 > Sent: Sunday, 15 December 2002 2:48 AM > To: hib...@li... > Subject: [Hibernate] microsoft access dialect 2 - getting messy >=20 >=20 > hi, > following the suggestion of our one of the few, I tried=20 > to test the above=20 > dialect, with non glorious results (86 failures out of 91 :-( ). To=20 > proceeded I have focused only on MultiTableTest. >=20 > The first reason is that I have tested the dialect in my=20 > applications with=20 > string assigned identifiers, and there seemed to be some=20 > problems with=20 > native identifiers: >=20 > <id type=3D"long" column=3D"id_" > > <generator class=3D"native"/> > </id> >=20 > 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_) > ) >=20 > Unsuccessful: [Microsoft][ODBC Microsoft Access Driver]=20 > Syntax error in=20 > CREATE TABLE statement. >=20 > but if I state it as >=20 > <id type=3D"long" column=3D"id_" > > <generator class=3D"hilo.long"/> > </id> >=20 > 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_) > ) >=20 > the table is created fine. So I guess that its the IDENTITY=20 > keyword that=20 > irritates access. and I mended MsAccessDialect with: >=20 > public String getIdentityColumnString() { > //return "IDENTITY NOT NULL"; > return "NOT NULL"; > } >=20 > Then all db schema operations proceed fine for this test (not for the=20 > others, I believe because of filed names, but I'll try this=20 > later). The=20 > next problem for this test is that I get this monstruous: >=20 > 16:34:26,912 DEBUG DriverManagerConnectionProvider:97 - returning=20 > connection to pool > 16:34:26,942 DEBUG SessionFactoryImpl:113 - Instantiating=20 > session factory 16:34:26,942 INFO Dialect:37 - Using dialect:=20 > cirrus.hibernate.sql.MSAccessDialect > 16:34:26,942 INFO DriverManagerConnectionProvider:36 - Hibernate=20 > connection pool size: 2 > 16:34:26,952 INFO DriverManagerConnectionProvider:65 - Using driver:=20 > com.inzoom.jdbcado.Driver at URL:=20 > jdbc:izmado:IzmDllPath=3DE:\cvs_out\teamwork\html\WEB-INF\lib\Iz mJniAdo.dll;IzmRoyaltyFree=3DXXXXXXXX;Provider=3DMSD> ASQL;Driver=3D{Micros= oft > Access Driver (*.mdb)};Dbq=3De:\cvs_out\teamwork\data\teamwork_ol.mdb > 16:34:26,952 INFO DriverManagerConnectionProvider:66 - Connection=20 > properties: {user=3Dadmin, password=3D} > 16:34:26,962 INFO PreparedStatementCache:49 - prepared=20 > statement cache=20 > size: 100 > 16:34:26,962 INFO SessionFactoryImpl:144 - Use outer join=20 > fetching: false 16:34:26,972 DEBUG=20 > DriverManagerConnectionProvider:78 - Opening new JDBC=20 > connection > 16:34:26,982 DEBUG DriverManagerConnectionProvider:89 -=20 > Created connection=20 > to:=20 > jdbc:izmado:IzmDllPath=3DE:\cvs_out\teamwork\html\WEB-INF\lib\Iz > mJniAdo.dll;IzmRoyaltyFree=3D643122985;Provider=3DMSDASQL;Driver=3D{ > Microsoft=20 > Access Driver (*.mdb)};Dbq=3De:\cvs_out\teamwork\data\teamwork_ol.mdb,=20 > Isolation Level: 2 > 16:34:27,002 DEBUG DriverManagerConnectionProvider:97 - returning=20 > connection to pool > 16:34:27,002 INFO SessionFactoryImpl:167 - Use scrollable=20 > result sets: true 16:34:28,935 DEBUG=20 > SessionFactoryObjectFactory:39 - initializing class=20 > SessionFactoryObjectFactory > 16:34:28,955 DEBUG SessionFactoryObjectFactory:76 - registered:=20 > 40288086f21dae9100f21dae9f470000 (unnamed) > 16:34:28,965 INFO SessionFactoryObjectFactory:82 - no JDNI=20 > name configured 16:34:28,975 INFO SessionFactoryImpl:261 -=20 > Query language substitutions:=20 > {no=3D'N', true=3D1, yes=3D'Y', false=3D0} > 16:34:28,975 INFO SessionFactoryImpl:264 - Query language imports:=20 > cirrus.hibernate.test > 16:34:28,975 DEBUG SessionFactoryImpl:276 - Instantiated=20 > session factory 16:34:29,125 DEBUG SessionImpl:332 - opened=20 > session 16:34:29,125 DEBUG JDBCTransaction:34 - begin=20 > 16:34:29,125 DEBUG DriverManagerConnectionProvider:73 - Using=20 > cached JDBC=20 > connection > 16:34:29,135 DEBUG SessionImpl:521 - saving=20 > [cirrus.hibernate.test.Multi#123] 16:34:29,185 DEBUG=20 > SessionImpl:521 - saving [cirrus.hibernate.test.Simple#1234] > 16:34:29,185 DEBUG SessionImpl:521 - saving=20 > [cirrus.hibernate.test.SubMulti#2] > 16:34:29,185 DEBUG JDBCTransaction:48 - commit > 16:34:29,185 DEBUG SessionImpl:1605 - flushing session=20 > 16:34:29,185 DEBUG SessionImpl:1682 - Flushing entities and=20 > processing=20 > referenced collections > 16:34:29,205 DEBUG SessionImpl:1874 - Processing unreferenced=20 > collections 16:34:29,205 DEBUG SessionImpl:1898 - Scheduling=20 > collection=20 > removes/(re)creates/updates > 16:34:29,205 DEBUG SessionImpl:1617 - Flushed: 3 insertions,=20 > 0 updates, 0=20 > deletions to 3 objects > 16:34:29,205 DEBUG SessionImpl:1622 - Flushed: 0=20 > (re)creations, 0 updates,=20 > 0 removals to 0 collections > 16:34:29,205 DEBUG SessionImpl:1652 - Executing > 16:34:29,205 DEBUG MultiTableEntityPersister:484 - Inserting entity:=20 > cirrus.hibernate.test.Multi#123 > 16:34:29,205 DEBUG MultiTableEntityPersister:485 - Version: 0=20 > 16:34:29,215 DEBUG BatcherImpl:109 - 1 open=20 > PreparedStatements 16:34:29,215 DEBUG SessionFactoryImpl:469=20 > - prepared statement get: insert=20 > into rootclass ( countX, name, address, dateX, id_ ) values=20 > ( ?, ?, ?, ?, ? ) 16:34:29,215 DEBUG=20 > PreparedStatementCache:67 - Preparing statement: insert=20 > into rootclass ( countX, name, address, dateX, id_ ) values=20 > ( ?, ?, ?, ?, ? ) 16:34:29,225 DEBUG BatcherImpl:109 - 2 open=20 > PreparedStatements 16:34:29,225 DEBUG SessionFactoryImpl:469=20 > - prepared statement get: insert=20 > into nonleafsubclass ( extraProp, other2, po, cal, floaty,=20 > sid ) values (=20 > ?, ?, ?, ?, ?, ? ) > 16:34:29,225 DEBUG PreparedStatementCache:67 - Preparing=20 > statement: insert=20 > into nonleafsubclass ( extraProp, other2, po, cal, floaty,=20 > sid ) values (=20 > ?, ?, ?, ?, ?, ? ) > 16:34:29,235 DEBUG MultiTableEntityPersister:386 -=20 > Dehydrating entity:=20 > cirrus.hibernate.test.Multi#123 > 16:34:29,275 DEBUG JDBCExceptionReporter:33 - SQL Exception > com.inzoom.adojni.ComException: [Microsoft][ODBC Microsoft Access=20 > Driver]Optional feature not implemented in Microsoft OLE DB=20 > Provider for=20 > ODBC Drivers code=3D3105 Type=3D1 > 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=20 > com.inzoom.jdbcado.PreparedStatement.executeUpdate(PreparedSta > tement.java:81) > at=20 > cirrus.hibernate.persister.MultiTableEntityPersister.insert(Mu ltiTableEntityPersister.java:501) > at=20 > cirrus.hibernate.impl.ScheduledInsertion.execute(ScheduledInse > rtion.java:20) > at=20 > cirrus.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:1674) > at=20 > cirrus.hibernate.impl.SessionImpl.execute(SessionImpl.java:1654) > at=20 > cirrus.hibernate.impl.SessionImpl.flush(SessionImpl.java:1599) > at=20 > cirrus.hibernate.transaction.JDBCTransaction.commit(JDBCTransa > ction.java:51) > at=20 > cirrus.hibernate.test.MultiTableTest.testMultiTable(MultiTable > Test.java:38) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at=20 > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > orImpl.java:39) > at=20 > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > odAccessorImpl.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:=20 > 3105, SQLState: 16:34:29,295 ERROR JDBCExceptionReporter:42 -=20 > [Microsoft][ODBC Microsoft=20 > Access Driver]Optional feature not implemented > 16:34:29,295 DEBUG PreparedStatementCache:91 - recaching=20 > 16:34:29,295 DEBUG PreparedStatementCache:126 - Total=20 > checked-out statements: 1 16:34:29,295 DEBUG=20 > PreparedStatementCache:127 - Checked out: [insert into=20 > nonleafsubclass ( extraProp, other2, po, cal, floaty, sid )=20 > values ( ?, ?,=20 > ?, ?, ?, ? )] > 16:34:29,295 DEBUG PreparedStatementCache:91 - recaching=20 > 16:34:29,295 DEBUG PreparedStatementCache:126 - Total=20 > checked-out statements: 0 16:34:29,295 DEBUG=20 > PreparedStatementCache:127 - Checked out: [] 16:34:29,305=20 > DEBUG SessionImpl:366 - transaction completion 16:34:29,325=20 > DEBUG SessionImpl:2428 - Running Session.finalize()=20 > 16:34:29,325 DEBUG SessionImpl:366 - transaction completion=20 > 16:34:29,325 WARN SessionImpl:2438 - Unclosed connection >=20 > actually I used to get > =09 > ODBC Microsoft Access Driver]Optional feature not=20 > implemented in=20 > Microsoft OLE DB Provider for ODBC >=20 > in my applications too, but by setting >=20 > =09 > getDefaultProperties().setProperty(Environment.OUTER_JOIN, "false"); >=20 > I had spelled the evil, but it reappeared in the tests. Help ! bye >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility=20 > Learn to use your power at OSDN's High Performance Computing=20 > Channel http://hpc.devchannel.org/=20 > _______________________________________________ > hibernate-devel mailing list hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel >=20 ********** CAUTION - Disclaimer ********** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS******** End of Disclaimer ********** |