[ojb-users] bindSelect() Error in setObject() call...
Brought to you by:
thma
From: Corey K. <Co...@kl...> - 2002-04-17 16:42:17
|
I'm getting the following error when I try to write a new object to the database: [DEFAULT] ERROR: bindSelect failed for: com.klaasmeyer.forefront.om.ec.EcMeterReading{CMK,04172002,1725}, PK: 0, value: CMK Job setObject failed Driver not capable. at ojb.broker.accesslayer.JdbcAccess.materializeObject(Unknown Source) at ojb.broker.singlevm.PersistenceBrokerImpl.store(Unknown Source) at com.klaasmeyer.forefront.om.test.TestEquipmentCost.<init>(TestEquipmentCost. java:67) at com.klaasmeyer.forefront.om.test.TestEquipmentCost.main(TestEquipmentCost.ja va:95) Process terminated with exit code 0 Is this a driver issue? Any clues would be appreciated. Corey -----Original Message----- From: Corey Klaasmeyer [mailto:Co...@kl...] Sent: Wednesday, April 17, 2002 8:51 AM To: 'Obj...@li...' Subject: [ojb-users] Modifications to Work Around Lame ODBC Drivers... Since I am working with a legacy ODBC driver from Simba, I have had to work around exceptions which propogate up from that level. It would be great if I could get some feedback on the implications of these changes -- all in accesslayer. 1.) In ConnectionFactoryDefaultImpl, I commented out conn.setAutoCommit(!broker.isInTransaction()). I'm assuming autocommit can remain in its default state of true if transactions are not being used. 2.) In StatementsForClass I commented out result.setEscapeProcessing(ESCAPEPROCESSING); It doesn't look like this should have any effect. This is the javadoc for setEscapeProcessing(): Sets escape processing on or off. If escape scanning is on (the default), the driver will do escape substitution before sending the SQL statement to the database. Note: Since prepared statements have usually been parsed prior to making this call, disabling escape processing for PreparedStatements objects will have no effect. Finally, these are obviously not general solutions. I think you will need to catch exceptions and react in some rational way. This may be a better mail for the developers list... With these changes, OJB is now reading some simple records from our lumbering accounting system. Corey _______________________________________________ Objectbridge-users mailing list Obj...@li... https://lists.sourceforge.net/lists/listinfo/objectbridge-users |