At work I am using OJB with MySQL version 4.1.10a-Max on a Redhat
Enterprise 3 box. Now I am trying to replicate my work environment at
home
on my Ubuntu Linux box. The MySQL version at home is
4.1.12-Debian_1ubuntu3, which while not exactly the same as at work does
seem reasonably close. I am running MySQL with the exact same config
as at
work (using InnoDB and UTF-8).
It looks like OJB can read from the database just fine, but whenever
I try
to update or insert data, it fails with an error message (see below).
I have tried everything I could think of, such as swapping the OJB 1.0.2
JAR we are still using for the latest 1.0.3 JAR (and updating the config
files appropriately), swapping the MySQL connector from 3.1.7 to
3.1.11 (I
even tried the 3.2 alpha), etc. No luck...
I also tried to google the error message "Incorrect arguments to
mysql_stmt_execute", but I wasn't able to turn up anything useful.
Does anybody have any ideas what could be causing this?
-Mirko
[junit] [EntityPersistence.java:590] Updating entity:
ApplicationEntity[shortName: 'DC Sample', fullName: 'DC Sample',
reportsScores: '1', applicationKey: 'sampleapp', active: 'false',
subscriptionApp: 'false', id: '4', ]
[junit] [org.apache.ojb.broker.accesslayer.JdbcAccessImpl] ERROR:
SQLException during the execution of the update (for a
com.dchoc.common.entity.ApplicationEntity): Incorrect arguments to
mysql_stmt_execute
[junit] Incorrect arguments to mysql_stmt_execute
[junit] java.sql.SQLException: Incorrect arguments to
mysql_stmt_execute
[junit] at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
[junit] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
[junit] at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1347)
[junit] at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:958)
[junit] at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1957)
[junit] at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1880)
[junit] at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
[junit] at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
[junit] at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
[junit] at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(Unknown
Source)
[junit] at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown
Source)
[junit] at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
[junit] at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown Source)
[junit] at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
[junit] at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown
Source)
[junit] at
com.dchoc.common.entity.EntityPersistence.update(EntityPersistence.java:597)
[junit] at
com.dchoc.common.entity.EntityPersistence.update(EntityPersistence.java:550)
[junit] at
com.dchoc.common.home.AbstractHome.update(AbstractHome.java:66)
[junit] at
com.dchoc.common.home.ApplicationHome.update(ApplicationHome.java:251)
[junit] at
com.dchoc.common.home.TestApplicationHome.testUpdate(TestApplicationHome.java:72)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[junit] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:324)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at
junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at
junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]