This morning while checking a production server I noticed these errors in the log:
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug 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 '= d.element_id and b.content_id = 15 and c.content_id = 24 and d.content_id = 28' at line 1
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug select b.property_value, c.property_value, b.element_id, d.property_value from servoy_elements a, servoy_element_properties b, servoy_element_properties c, servoy_element_properties d where a.object_type_id = 4 and a.element_id = b.element_id and a.element_id = c.element_id and a.element_id *= d.element_id and b.content_id = 15 and c.content_id = 24 and d.content_id = 28 and a.solution_id is null and a.parent_element_id is null and b.property_value NOT LIKE ? order by d.property_value, b.element_id
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug Unknown column 'solution_id' in 'where clause'
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug select a.element_id, a.property_value from servoy_element_properties a where a.content_id = 37 and a.revision = (select revision from servoy_releases where solution_id is null and release_number = ? and element_id = a.element_id) and a.property_value = ? order by a.property_value
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug Table 'servoy31_repository.servoy_solutions' doesn't exist
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug select solution_id from servoy_solutions where solution_name = ?
I’ve not received any complaints from the client so I supposed they didn’t notice any problem.
Looks like there are some problems with servoy repository, anyone have an idea of what is happening?
Server Information
Servoy version 3.1.6-build 410, repository version 29
Current time: Thu Jun 21 13:02:30 CEST 2007
Uptime: 1 day 17 hours 15 minutes 46 seconds
JDK Information
java.vm.name=Java HotSpot(TM) Server VM
java.vm.version=1.5.0_11-b03
java.vm.info=mixed mode
java.vm.vendor=Sun Microsystems Inc.
Operating System Information
os.name=Linux
os.version=2.6.15-1.2054_FC5smp
os.arch=i386
System Information
runtime.allocatedMemory=85184K
runtime.usedMemory=52906K
IT2Be:
Yep, I noticed but are your errors also from that period or more recent.
Did you change anything?
It happened this morning and I never seen this before.
I didn’t change anything.
Servoy 3.1 was clean installed, the repository DB was created from scratch (you can notice the name servoy31_repository), servoy was painfully updated from 3.1.4 to 3.1.6 via intermediate builds and I never touched the repository directly.
Looks really weird, maybe it’s worth a Case in the Support System.
I think this looks like a case for support yes.
From what you describe this is really weird.
It could be some (harmless) legacy code in Servoy that should be removed.
Harmless in case the user doesn’t see any issue…
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug 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 ‘= d.element_id and b.content_id = 15 and c.content_id = 24 and d.content_id = 28’ at line 1
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug select b.property_value, c.property_value, b.element_id, d.property_value from servoy_elements a, servoy_element_properties b, servoy_element_properties c, servoy_element_properties d where a.object_type_id = 4 and a.element_id = b.element_id and a.element_id = c.element_id and a.element_id *= d.element_id and b.content_id = 15 and c.content_id = 24 and d.content_id = 28 and a.solution_id is null and a.parent_element_id is null and b.property_value NOT LIKE ? order by d.property_value, b.element_id
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug Unknown column ‘solution_id’ in ‘where clause’
2007-06-21 10:02 RMI TCP Connection(1960)-10.10.15.73 ERROR com.servoy.j2db.util.Debug select a.element_id, a.property_value from servoy_element_properties a where a.content_id = 37 and a.revision = (select revision from servoy_releases where solution_id is null and release_number = ? and element_id = a.element_id) and a.property_value = ? order by a.property_value
The sql contains an outer-join clause, something we do not use in Servoy 3.1.
Is it possible that this is from a custom-query that selects repository-data?
Do you have an own-defined db server (servoy31_repository) that logs into the repository?
This looks like a message from an own-defined db server that logs into the repository database and is still expecting tables from version 2.2.
rgansevles:
Is it possible that this is from a custom-query that selects repository-data?
Bingo!
I already checked my solution twice for something like that but didn’t find anything, now on the third check I’ve found the culprit: an old method in a small module used for data exports (and if I remember well taken from a forum post):
//pass in the form name
var formName = arguments[0]
//get solution ID
//Get a dataset based on query
var maxReturnedRows = 1
var query = "select solution_id from servoy_solutions where solution_name = ?"
var args = new Array();
args[0] = application.getSolutionName()
var dataset = databaseManager.getDataSetByQuery('repository_server', query, args, maxReturnedRows);
var solutionID = dataset.getValue(1,1)
var releaseNum = application.getSolutionRelease()
//get form ID
maxReturnedRows = 1000
query = 'select a.element_id, a.property_value ' +
'from servoy_element_properties a ' +
'where a.content_id = 37 ' +
'and a.revision = (select revision from servoy_releases where solution_id = ? and release_number = ? ' +
'and element_id = a.element_id) and a.property_value = ? ' +
'order by a.property_value'
args = new Array();
args[0] = solutionID
args[1] = releaseNum
args[2] = formName
dataset = databaseManager.getDataSetByQuery('repository_server', query, args, maxReturnedRows);
var formID = dataset.getValue(1,1)
//get all the dataproviders for the current form (with or without a name)
query = 'select b.property_value, c.property_value, b.element_id, d.property_value ' +
'from servoy_elements a, servoy_element_properties b, servoy_element_properties c, servoy_element_properties d ' +
'where a.object_type_id = 4 ' +
' and a.element_id = b.element_id ' +
' and a.element_id = c.element_id ' +
' and a.element_id *= d.element_id ' +
' and b.content_id = 15 ' +
' and c.content_id = 24 ' +
' and d.content_id = 28 ' +
' and a.solution_id = ? ' +
' and a.parent_element_id = ? ' +
' and b.property_value NOT LIKE ? ' +
'order by d.property_value, b.element_id'
args = new Array();
args[0] = solutionID
args[1] = formID
args[2] = 'globals.%'
dataset = databaseManager.getDataSetByQuery('repository_server', query, args, maxReturnedRows);
var colNames = new Array()
if(dataset.getMaxRowIndex() > 0)
{
colNames = dataset.getColumnAsArray(1)
}
return colNames
Thanks Rob!
I’m going to warn others that the method is not 3.1 compatible if I manage to find the old post in the forum.
Note that queries on the repository may break with every major upgrade, the repository is an internal interface only.
The 3.5 repo is incompatible with 3.1 and for release 4 we are even planning to move large parts of the repository to a version control system.
Thanks Rob, I know that.
The method was already deprecated in my solution, I just have to check how some user managed to trigger it and then remove it.
I also found where the method comes from: it’s part of Bob Cusick “ExcelMaker”, I checked the forum thread and there’s an update already posted to have the method work in 3.1.