Al Thompson wrote:
Hi:
After some mucking around, I see that a possible cause of problems with OJB+Oracle may be related to a workaround in PlatformOracleImpl. The source comments for the method changePreparedStatementResultSetType() state:
* Attempts to modify a private member in the Oracle thin driver's resultset * to allow proper setting of large binary streams.
I won't classify this workaround as hideous, as I don't have a better idea at the moment. A problem stems from the fact that somehow in the 9i version of the jdbc driver, the PreparedStatement object changes from a concrete object to a dynamic proxy (as in java.lang.reflect.Proxy). It seems to be not possible to retrieve any field members, private or otherwise, from said proxy instance.
I decided to change this method to a no-op in the hopes that someone in Redwood City or Bangalore got around to fixing the bug/feature that made this workaround necessary in the first place. I don't seem to be that lucky.
Before I changed this method to a no-op, I got the following results from the junit tests:
junit-no-compile-no-prepare: [junit] Running org.apache.ojb.broker.AllTests [junit] Tests run: 174, Failures: 0, Errors: 3, Time elapsed: 161.508 sec [junit] TEST org.apache.ojb.broker.AllTests FAILED [junit] Running org.apache.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/home/atx/ws/tools/ojb/target/test/ojb/OJB.properties [junit] Tests run: 147, Failures: 1, Errors: 32, Time elapsed: 30.895 sec [junit] TEST org.apache.ojb.odmg.AllTests FAILED [junit] Running org.apache.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/home/atx/ws/tools/ojb/target/test/ojb/OJB.properties [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 7.972 sec
Now I get:
junit-no-compile-no-prepare: [junit] Running org.apache.ojb.broker.AllTests [junit] Tests run: 174, Failures: 7, Errors: 5, Time elapsed: 197.636 sec [junit] TEST org.apache.ojb.broker.AllTests FAILED [junit] Running org.apache.ojb.odmg.AllTests [junit] [BOOT] INFO: OJB.properties: file:/home/atx/ws/tools/ojb/target/test/ojb/OJB.properties [junit] Tests run: 147, Failures: 6, Errors: 35, Time elapsed: 44.308 sec [junit] TEST org.apache.ojb.odmg.AllTests FAILED [junit] Running org.apache.ojb.soda.AllTests [junit] [BOOT] INFO: OJB.properties: file:/home/atx/ws/tools/ojb/target/test/ojb/OJB.properties [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 9.559 sec
does not look like a real improvement to me...
IMO It's no required to pass all regression tests. You just have to know which does not properly work with Oracle and if conflicts with what you are trying to do.
AFAIK you will have some trouble with large BLOBs but everything else should work pretty smooth.
In short, more errors and more failures. I haven't yet begun to dig into the logs for these. Would someone give me some hints as to what this workaround is about?
I did not work on the Oracle stuff myself, so I'm not a big help here...
I am sure the source comments were intended to be illuminating, but for some reason I am just not grokking it this Monday. I am hoping Oracle may expose some API knobs to turn on intended functionality. If this really is a bug, I can report thru our support channels. Who knows, it may even get fixed.
I have done a ton of work with proxies, but so far I am only able to resolve the interfaces the proxy implements. Any attempt to look at fields yields me a nice fat stacktrace. If anyone could point to me some clues that allow me to get at the underlying fields, I would be grateful.
I will continue to pore over the logs on my end in the hopes of making life easier for some other 9i user in the future. As always, thanks for all help.
I really appreciate your help!
Regards, Al
P.S. Can someone point me to the Turbine or OJB file that controls the Oracle personality? I would like to change the LONG RAW mapping I wrote about earlier to use BLOBs. Many Thanks!
src/schema/ojbcore-schema.xml contains the turbine "DDL" for the OJB core tables. It's not Oracle specific, but meant to be cross-platform. you can just patch it.
the file profile/oracle.profile contains all Oracle specific switches and is activated by the profile=oracle switch in build.properties.
cheers, Thomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
