I18N and MySQL don't play well together?

I was trying to set up i18n for use with my solution and ran into an apparent bug. With Servoy 2.1 (Build 310) on Windows 2K and MySQL 4.0.18nt (on same box), I get the following stack trace in log.txt (below)
I am currently running with ISAM, not InnoDB, so it is possible that this is a transaction problem, but there is nothing to clearly indicated so. I have not had any other issues with using MySQL as my data store. The Servoy repository is still in ASA and I ended up making my i18n table in a new db there as a workaround.

Starting Servoy from G:\Program Files\Servoy Servoy R2 2.1 build-310 on Windows 2000 using Java 1.4.2_04
Loading servoy.properties from G:\Program Files\Servoy_Beta\servoy.properties
Loading - Done
java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000.java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000.
at org.gjt.mm.mysql.Statement.setMaxRows(Statement.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.persistence.datasource.p.invoke(Unknown Source)
at $Proxy1.setMaxRows(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.a(Unknown Source)
at com.servoy.j2db.Messages.refresh(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.aK(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
at Servoy.main(Servoy.java:27)
Couldn’t get the default messagescom.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000. setMaxRows() out of range. 2147483647 > 50000000.com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000. setMaxRows() out of range. 2147483647 > 50000000.
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.a(Unknown Source)
at com.servoy.j2db.Messages.refresh(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.aK(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
at Servoy.main(Servoy.java:27)
Using RMI registry on port 1099java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000.java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000.
at org.gjt.mm.mysql.Statement.setMaxRows(Statement.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.servoy.j2db.persistence.datasource.p.invoke(Unknown Source)
at $Proxy1.setMaxRows(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setMaxRows(DelegatingPreparedStatement.java:186)
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.a(Unknown Source)
at com.servoy.j2db.Messages.setSolution(Unknown Source)
at com.servoy.j2db.J2DBClient.loadSolution(Unknown Source)
at com.servoy.j2db.J2DBClient$10.run(Unknown Source)
at com.servoy.j2db.util.aq.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Couldn’t get the default messagescom.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000. setMaxRows() out of range. 2147483647 > 50000000.com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: setMaxRows() out of range. 2147483647 > 50000000. setMaxRows() out of range. 2147483647 > 50000000.
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.loadMessagedFromDatabase(Unknown Source)
at com.servoy.j2db.Messages.a(Unknown Source)
at com.servoy.j2db.Messages.setSolution(Unknown Source)
at com.servoy.j2db.J2DBClient.loadSolution(Unknown Source)
at com.servoy.j2db.J2DBClient$10.run(Unknown Source)
at com.servoy.j2db.util.aq.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Destroy error java.lang.NullPointerException

this is fixed in 2.1.1

I am running into a persistent problem while trying to set up i18n strings; I have seen this in 2.1 and 2.1.1 final (just upgraded to see if it would resolve it).

I first tried setting up my i18n store in MySQL 4.0.18-nt without success (see above trace). I then punted on that and decided to keep the i18n data in Sybase ASA while my client data remained in MySQL. I set up a new connection (int_data) pointing to a new database of the same name in ASA. I told Servoy to create the messages table, which it did and then I restarted Servoy. At first the table was not seen by Servoy, but when I tried to create it again I got an error and trace in .log.txt. After dropping the database and recreating it (and the connection in Servoy) all finally ended up working… for a while. I was able to create ~10 keys and strings (all in english) without problems, then one of my labels wouldn’t show the i18n text, only an error string (!grants.board_person.last_name!) which is most of the key name (minus the i18n). At this point the others were still working, but no new strings could be entered.
After I upgraded to 2.1.1 and recreated the db_servers for my client data and i18n, I can’t get Servoy to recognize that there is a messages table (I get an empty drop down), but I get an error when I tell it to create a new one:
com.servoy.j2db.persistence.RepositoryException: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -110: Item ‘messages’ already existscom.servoy.j2db.persistence.RepositoryException: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -110: Item ‘messages’ already exists
at com.servoy.j2db.persistence.Server.a(Unknown Source)
at com.servoy.j2db.persistence.Server.syncTableObjWithDB(Unknown Source)
at com.servoy.j2db.develop.d.a$3.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at com.servoy.j2db.util.b.setVisible(Unknown Source)
at com.servoy.j2db.develop.c.ac.doIt(Unknown Source)
at com.servoy.j2db.cmd.c$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I renamed the ghost table and tried again, it created a new one, but when I came back into Servoy after the requisite restart, the drop down was empty again.. Any body else seen this or have a work around?
BTW: Putting messages into the defaultMessagesTable= entry in servoy.properties doesn’t fix it either :cry:

Windows 2000, Java 1.4.2_04 Servoy 2.1.1 Build 313.

I just tested this with the latest stable builds of mysql:

the db: mysql-4.1.7
the driver: mysql-connector-java-3.0.15-ga-bin.jar

I made a solution opened the solution settings dialog and pointed to the mysql server and created the messages table.
(then i reopened the solution once to make sure that the messages table was there)

I made a form with 2 labels and on those 2 labels i created 2 message keys. Those where displaying fine.
Then i restarted servoy. And the labels where still displaying fine.

If you don’t see the message table after you created. Do you see that table in the dataprovider dialog when you select the server?
If so how does that table look like? What columns? What order?

You really shouldn’t see that setMaxRows() error in 2.1.1 Because we really don’t send the MaxInt value anymore but a smaller size beneath the 50M.

Johan,
I was able to get this working with an upgraded repository (from 2.0->2.1.1), it appears that the problem (with ASA) may have been
related to the way I did the upgrade from 2.1->2.1.1. If I have the
chance, I will dig into the AWOL messages table some more, but having
it working is the most important thing for me..

I can tell you that the dispappearing table did show up in Sybase Central
and was “properly formed” with the correct colums (and data!).

Thanks again..

i am not interessted if the table did appear in SC, because of the error you got i believe you.
But did it also appear in the Dataprovider Dialog of servoy itself?

jcompagner:
i am not interessted if the table did appear in SC, because of the error you got i believe you.
But did it also appear in the Dataprovider Dialog of servoy itself?

I will have to check into this when I can… it may be a few days since I have a big deadline looming