The bug is still present in 2.0b6.
Creating a new table in MySQL from dataprovider window, Servoy crashes when you close the window and return to designer mode.
OSX.2.8, Servoy 1.2 and 2.0b6
The bug is still present in 2.0b6.
Creating a new table in MySQL from dataprovider window, Servoy crashes when you close the window and return to designer mode.
OSX.2.8, Servoy 1.2 and 2.0b6
i did test it on WinXP with B6:
opened a solution
go to design
open dataprovider dialog
select a server with a mysq connection.
pressed new table
inserted the name
made one extra dataprovider (name, text)
pressed OK
No crash so i have to test it on the mac.
Today I installed MySQL on my mac, created a new server and tried to create a new table.
I was able to create the table but the very first field gives an error message and won’t allow me to continue…
So, I created the tables ‘by hand’ with CocoaMySQL.
The table usage was defined with usageid as unique key with no sequence from the db and the rest of the fields like they should be…
I then took out the ‘old’ firebird database and changed it to the mysql database.
I opened the solution and reseived an error message like the one on the right of the attached screenprint.
Ofcourse, while trying to import some data I reseived an error that showed me the db was out of sync with servoy. I then tried to correct this and that gave me the error on the left.
Servoy v2.0b6
Mac OS X 10.3.2
MySQL 4.0.15
IT2BE:
So, I created the tables ‘by hand’ with CocoaMySQL.The table usage was defined with usageid as unique key with no sequence from the db and the rest of the fields like they should be…
I always leave the “auto-increment” option active, in CocoaMySQL.
This was, my tables work fine in Servoy.
Maybe it’s worth of a try…
Nope, this doesn’t solve the issue. Not even when I start to make a new solution!
if you start with
java -DSTACKTRACE=TRUE -jar servoy_developer.jar
what kind of sql statement is generated when you see that error?
and what do you mean iwth usageid as a unique key? Does the table have a primairy key?
Johan,
I meant primary key ofcourse. Sorry for that!
The errormessage you see below goes from the moment I select the solution until after the first error message…
size of SelectSolutionDialog java.awt.Point[x=581,y=355]
repository_server: Got connection, thread=TaskExecuter[1]
repository_server: Closed connection, thread=TaskExecuter[1]
repository_server: Got connection, thread=TaskExecuter[1]
repository_server: Got connection, thread=TaskExecuter[1]
repository_server: Closed connection, thread=TaskExecuter[1]
Solution ‘IT2Connect’ read only connection requested by thread TaskExecuter[1]
it2connect: Got connection, thread=TaskExecuter[1]
Column name usageid type 4is_nullable NO
Column name locationnumber type 12is_nullable YES
Column name locationid type 12is_nullable YES
Column name name type 12is_nullable YES
Column name dialer type 12is_nullable YES
Column name timeout type 93is_nullable YES
Column name timein type 93is_nullable YES
Column name seconds type 4is_nullable YES
Column name price type 6is_nullable YES
Column name dialtype type 12is_nullable YES
Column name usagetype type 12is_nullable YES
Column name diallocation type 12is_nullable YES
Column name duration type 12is_nullable YES
Column name totalduration type 12is_nullable YES
Column name cost type 6is_nullable YES
it2connect: Closed connection, thread=TaskExecuter[1]
Loading column metainfo for table usage
repository_server: Got connection, thread=TaskExecuter[1]
repository_server: Closed connection, thread=TaskExecuter[1]
Solution ‘IT2Connect’ connection closed by thread TaskExecuter[1]
repository_server: Closed connection, thread=TaskExecuter[1]
mode change 0 → 1
java.net.UnknownHostException: downloads.servoy.com
java.net.UnknownHostException: downloads.servoy.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:153)
at java.net.Socket.connect(Socket.java:426)
at java.net.Socket.connect(Socket.java:376)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:386)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:602)
at sun.net.www.http.HttpClient.(HttpClient.java:303)
at sun.net.www.http.HttpClient.(HttpClient.java:264)
at sun.net.www.http.HttpClient.New(HttpClient.java:336)
at sun.net.www.http.HttpClient.New(HttpClient.java:317)
at sun.net.www.http.HttpClient.New(HttpClient.java:312)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:481)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:472)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:574)
at java.net.URL.openStream(URL.java:960)
at com.servoy.j2db.develop.d.aw$2.run(Unknown Source)
at com.servoy.j2db.util.aq.run(Unknown Source)
at java.lang.Thread.run(Thread.java:554)
java.net.UnknownHostException: downloads.servoy.com
handleDependentDataProviders locationid
handleDependentDataProviders locationnumber
handleDependentDataProviders dialtype
handleDependentDataProviders dialer
handleDependentDataProviders usagetype
–>DisplaysAdapter locationid with 1 displays, hash 2057590
–>DisplaysAdapter locationnumber with 1 displays, hash 4073495
–>DisplaysAdapter dialtype with 1 displays, hash 12194600
–>DisplaysAdapter dialer with 1 displays, hash 4177810
–>DisplaysAdapter usagetype with 1 displays, hash 3816479
R->SpecialTabPanel, hash 10624096
R->SpecialTabPanel, hash 10454159
handleDependentDataProviders totalduration
found dependend_provider totalseconds
handleDependentDataProviders totalseconds
found dependend_provider seconds
handleDependentDataProviders seconds
handleDependentDataProviders numberofcalls
found dependend_provider cost
handleDependentDataProviders cost
handleDependentDataProviders totalcost
found dependend_provider cost
–>DisplaysAdapter totalduration with 1 displays, hash 9200654
–>DisplaysAdapter numberofcalls with 1 displays, hash 16164707
–>DisplaysAdapter totalcost with 1 displays, hash 5000051
–>DisplaysAdapter totalseconds with 1 displays, hash 16582587
–>DataAdapter seconds, hash 4394162
–>DataAdapter cost, hash 6775270
handleDependentDataProviders duration
handleDependentDataProviders price
handleDependentDataProviders seconds
handleDependentDataProviders timein
handleDependentDataProviders name
handleDependentDataProviders diallocation
handleDependentDataProviders cost
handleDependentDataProviders timeout
–>DisplaysAdapter duration with 1 displays, hash 12848250
–>DisplaysAdapter price with 1 displays, hash 1002006
–>DisplaysAdapter seconds with 1 displays, hash 13179938
–>DisplaysAdapter timein with 1 displays, hash 5641786
–>DisplaysAdapter name with 1 displays, hash 13456164
–>DisplaysAdapter diallocation with 1 displays, hash 878086
–>DisplaysAdapter cost with 1 displays, hash 10824584
–>DisplaysAdapter timeout with 1 displays, hash 13445122
it2connect: Got connection, thread=TaskExecuter[1]
used sql select usage.usageid from usage order by usage.usageid
java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1628)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:886)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:945)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1809)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1448)
at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.servoy.j2db.persistence.datasource.n.invoke(Unknown Source)
at $Proxy0.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:179)
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.new(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.browseAll(Unknown Source)
at com.servoy.j2db.FormPanel.q(Unknown Source)
at com.servoy.j2db.FormPanel.showAllRecords(Unknown Source)
at com.servoy.j2db.cmd.ad.doIt(Unknown Source)
at com.servoy.j2db.FormManager$6.run(Unknown Source)
at com.servoy.j2db.util.aq.run(Unknown Source)
at java.lang.Thread.run(Thread.java:554)
java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
it2connect: Closed connection, thread=TaskExecuter[1]
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1” Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1” Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
at com.servoy.j2db.dataprocessing.SQLEngine.a(Unknown Source)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.new(Unknown Source)
at com.servoy.j2db.dataprocessing.FoundSet.browseAll(Unknown Source)
at com.servoy.j2db.FormPanel.q(Unknown Source)
at com.servoy.j2db.FormPanel.showAllRecords(Unknown Source)
at com.servoy.j2db.cmd.ad.doIt(Unknown Source)
at com.servoy.j2db.FormManager$6.run(Unknown Source)
at com.servoy.j2db.util.aq.run(Unknown Source)
at java.lang.Thread.run(Thread.java:554)
com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1” Syntax error or access violation, message from server: “You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘usage order by usage.usageid’ at line 1”
size of dialog0 java.awt.Point[x=414,y=323]
size of dialog0 java.awt.Point[x=414,y=323]
ok now it is clear
usage is a reserved keyword.. you can’t use that as a table name in mysql..
Grumble … This was no issue with Firebird… Sorry for taking up you time.
Problem solved!
How did you create that usage table?
For the Firebird db I created it in Servoy. For MySQL I created it with CocoaMySQL (without any issue)…
very strange i couldn’t create that table with the control center of mysql (if i just type the create table statement)
But you shouldn’t be able to create that table in the first place (firebird or mysql) this is fixed now (b7)