From: Donnie H. <do...@ha...> - 2002-04-14 19:01:42
|
Gavin, Thanks for responding. I was able to figure out how to run FooBarTest. After setting the proper "SelectMethod=cursor" parameter in the URL, I was able to run a large number of the tests. Here are a couple of the issues I encountered: In testLoad there was a NPE, though the program kept running: testLoad... java.lang.NullPointerException at cirrus.hibernate.impl.RelationalDatabaseSession$Key.hashCode(RelationalDatab aseSession.java:183) at java.util.HashMap.hash(HashMap.java:250) at java.util.HashMap.get(HashMap.java:301) at cirrus.hibernate.impl.RelationalDatabaseSession.save(RelationalDatabaseSessi on.java:464) at cirrus.hibernate.impl.RelationalDatabaseSession.insert(RelationalDatabaseSes sion.java:445) at cirrus.hibernate.test.FooBarTest.testLoad(FooBarTest.java:178) 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 cirrus.hibernate.test.TestCase.run(TestCase.java:46) at cirrus.hibernate.test.FooBarTest.main(FooBarTest.java:1217) In testQuery, there was this exception: testQuery... Exception in thread "main" java.lang.reflect.InvocationTargetException 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 cirrus.hibernate.test.TestCase.run(TestCase.java:46) at cirrus.hibernate.test.FooBarTest.main(FooBarTest.java:1217) Caused by: java.lang.Exception: component query at cirrus.hibernate.test.TestCase.assertTrue(TestCase.java:66) at cirrus.hibernate.test.FooBarTest.testQuery(FooBarTest.java:323) ... 6 more I couldn't quite figure out what was underlying this issue. You'll note from the "... 6 more" line that this was under JDK 1.4. It was with the 0.9.8 release. A couple of other comments, most of which you probably know: 1) The sybase dialect really isn't appropriate for SQL Server 2000. SS2K has data types that a lot more directly map to the java.sql.Types (e.g. bit to BIT, bigint to BIGINT, etc.). 2) In trying to workaround one problem, I had to change some hibernate code (nothing permanent). The lack of a build facility meant I had to cobble together a batch file to do that. A nice Ant script would be great (maybe I missed something in the download). 3) This is more of a philosophical thing. I agree quite fully about the reflection-based approach to mapping. However, I tend to think that the DB should be the authority when it comes to the schema, not the app or a .xml file. This is primarily because the things that one can specify about the schema in, for example, Enterprise Manager start getting fairly database-specific (constraints, triggers, etc.); and they aren't necessarily important to represent in the .xml file. So I tend to start in the database and try to take as much advantage as possible of its capabilities to declaratively define the schema and the rules for enforcing data integrity. Another point is that writing bean-style property methods on a class is excruciatingly tedious. What I'm getting at is that I'd like to see a generator facility to go from the schema to the .xml and from the .xml to the skeleton of the bean classes. It wouldn't need to be a required capability to use Hibernate, more of an optional facility like the current schema generator. Just one man's opinion... Thanks again, Donnie > -----Original Message----- > From: Gavin_King/Cirrus%CI...@ci... > [mailto:Gavin_King/Cirrus%CI...@ci...] > Sent: Saturday, April 13, 2002 9:12 PM > To: Donnie Hale > Cc: hib...@li... > Subject: RE: [Hibernate-devel] SQL Server 2000 questions > > > > > Don't know if/when you'll get this, but thought I'd send it while I go > off > > and look into things. > > > Are there instructions, or can you point me in the right direction, to > run > > the test suite against a particular JDBC driver / database? I > want to run > it > > against SQL Server 2K w/ the MS JDBC driver just to see what I discover. > > The class cirrus.hibernate.test.FooBarTest is executable. Run it with > "mssql" as a command line argument. > > Hope thats enough to get you started. Any problems let me know. > > peace > > Gavin > > |