|
ResultSetWrapper is essential for having decent performance on badly implemented drivers like oracle/mssql btw. does it run under JDK 6? yes it runs under Java 6. i still think there should be a better way to implement that caching mechanism, but i haven't gave much thought about it for an acceptable solution. I'm looking for informations about compatibility between Hibernate and JDK 6. Are the troubleshootings mentioned above still valid? We want to migrate an enterprise application, based on Hibernate, from JDK 1.4.2 to JDK 6, and this issue leads us to ask questions about the feasibility of this migration. Thank you in advance for your feedbacks. We've not had much luck running Hibernate (generally 3.2.4.sp1.cp06) under JDK 1.6. The problems can be difficult to detect, so an initial switch might appear to work. We can recreate a number of errors, but pinpointing the exact issue has been difficult - but a switch back to JDK 1.5 always resolves anomalies. We would see this error on one of our systems - after the exception occurred the session factory goes bad and only a restart allows continuation. (1) SQL resulted in illegal operation, mismatched types, or incorrect cardinality. [SQL0302] Conversion error on host variable or parameter *N. On another application when we try to insert a record we get: (2) [SQL0311] Length in a varying-length or LOB host variable not valid. We're not using LOBs. With JDK 1.5 planned to sunset in October of 2009 we see an urgent need for a 1.6 upgrade. The "difficult to detect" errors generally fall into the category of problems where Hibernate code is relying on iteration of non-ordered collections. This is something that changed in at least the sun 1.6 jdk. Those uses need to be cleaned up to require the properly ordered collections when/where needed. Anyway, moving to 1.5 is on the roadmap along with correcting these types of "assumption issues" listed above. Adding drop in support for jdbc 4 is also on readmap. As ever, if something is truly critical to you then feel free to implement the needed changes and submit the diffs here for inclusion "back up stream". Ahmet, better solutions to the ResultSetWrapper are (1) to utilize AOP and pointcuts against the JDBC driver or (2) to use instrucmentation of those JDBC drivers in the cases where the JDBC driver suffers from these performance issues. That's obviously not something Hibernate can provide though. I also ran into this issue when trying to resolve HHH-3579. The classes BlobImpl, ClobImpl, SerializableBlob, SerializableClob also have 2 new methods that Legacy code won't call these methods since they didn't yet exist and current code base FWIW, my system exhibited very similar behavior to Ben's The solution for us was upgrading our JDBC driver implementation and Hibernate to the latest versions. Before: After: Hi Jim, Thanks for the feedback. Was it necessary to upgrade Hibernate to get things to work? Would it have worked by just upgrading the JDBC driver? Thanks, Thanks Jim! We have verified that with a jt400 jdbc driver upgrade from version 5.x to 6.x our second issue, described above, has been resolved. We'll try and report back on the more involved first issue at a later date. FYI, for the JDBC4 portion, here is the design discussion -> http://www.jboss.org/community/wiki/Hibernate-JDBC4support Currently scheduled for 3.6, though considering possibly adding to 3.5 -> http://www.jboss.org/community/wiki/HibernateRoadmap Changed summary in accordance with the fact that the original discussion focuses on JDBC4, which is part of JDK 1.6. This support has been added on trunk. We still need to work out the details of testing in terms of CI, so I am going to leave this open a bit longer. Added unit test using jdbc proxies. CI plans need to be updated to account for running with both. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ResultSetWrapper is also used in Loader.java, and it seems tricky to remove it from there. Bascially, either all those new methods needs to be implemented, or a better way of caching Column names should be found instead of implementing Resultset with a wrapper.