Hi Isomorphic,
as it turns out the bug described in this thread is triggered even more easy, also without setAllowMultiUpdate(true).
Not having setAllowMultiUpdate(true) means the PK is available. It is only necessary that no value is provided for the criteriaField.
See this testcase (v10.1p_2016-03-27):
BuiltInDS.java:
employees.ds.xml:
Employees.java:
Bad log (w/o timestamps to compare it):
Search for "115" and "cmadigan@server.com" in the log!
Good log (w/o timestamps to compare it):
I can again work around this, but this is triggered way easier and is also easy to fix I guess.
Best regards
Blama
as it turns out the bug described in this thread is triggered even more easy, also without setAllowMultiUpdate(true).
Not having setAllowMultiUpdate(true) means the PK is available. It is only necessary that no value is provided for the criteriaField.
See this testcase (v10.1p_2016-03-27):
BuiltInDS.java:
Code:
package com.smartgwt.sample.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.core.KeyIdentifier; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.Record; import com.smartgwt.client.util.Page; import com.smartgwt.client.util.PageKeyHandler; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.layout.VLayout; public class BuiltInDS implements EntryPoint { public void onModuleLoad() { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new PageKeyHandler() { public void execute(String keyName) { SC.showConsole(); } }); VLayout mainLayout = new VLayout(20); mainLayout.setWidth100(); mainLayout.setHeight100(); { IButton renameBadBtn = new IButton("Rename Ralph Brogan (Bad)"); renameBadBtn.setWidth(200); renameBadBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doRenameEmployeeBad(); } }); mainLayout.addMember(renameBadBtn); } { IButton renameGoodBtn = new IButton("Rename Ralph Brogan (Good)"); renameGoodBtn.setWidth(200); renameGoodBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { doRenameEmployeeGood(); } }); mainLayout.addMember(renameGoodBtn); } { IButton resetViaPKBtn = new IButton("Reset Ralph Brogan via PK"); resetViaPKBtn.setWidth(200); resetViaPKBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { resetViaPK(); } }); mainLayout.addMember(resetViaPKBtn); } mainLayout.draw(); } private void doRenameEmployeeBad() { DataSource.get("employees").performCustomOperation("doRenameEmployeeBad"); } private void doRenameEmployeeGood() { DataSource.get("employees").performCustomOperation("doRenameEmployeeGood"); } private void resetViaPK() { DataSource.get("employees").updateData(new Record() { { setAttribute("EmployeeId", 192); setAttribute("Name", "Ralph Brogan"); setAttribute("Email", "rbrogan@server.com"); } }); } }
Code:
<DataSource ID="employees" serverType="sql" tableName="employeeTable" recordName="employee" testFileName="/examples/shared/ds/test_data/employees.data.xml" titleField="Name" > <fields> <field name="userOrder" title="userOrder" type="integer" canEdit="false" hidden="true"/> <field name="Name" title="Name" type="text" length="128"> <validators> <validator serverOnly="true" type="isUnique" criteriaFields="Email"/> </validators> </field> <field name="EmployeeId" title="Employee ID" type="integer" primaryKey="true" required="true"/> <field name="ReportsTo" title="Manager" type="integer" required="true" foreignKey="employees.EmployeeId" rootValue="1" detail="true"/> <field name="Job" title="Title" type="text" length="128"/> <field name="Email" title="Email" type="text" length="128"/> <field name="EmployeeType" title="Employee Type" type="text" length="40"/> <field name="EmployeeStatus" title="Status" type="text" length="40"/> <field name="Salary" title="Salary" type="float"/> <field name="OrgUnit" title="Org Unit" type="text" length="128"/> <field name="Gender" title="Gender" type="text" length="7"> <valueMap> <value>male</value> <value>female</value> </valueMap> </field> <field name="MaritalStatus" title="Marital Status" type="text" length="10"> <valueMap> <value>married</value> <value>single</value> </valueMap> </field> </fields> <serverObject lookupStyle="new" className="com.smartgwt.sample.server.listener.Employees" /> <operationBindings> <operationBinding operationType="custom" operationId="doRenameEmployeeBad" serverMethod="doRenameEmployeeBad" /> <operationBinding operationType="custom" operationId="doRenameEmployeeGood" serverMethod="doRenameEmployeeGood" /> </operationBindings> </DataSource>
Code:
package com.smartgwt.sample.server.listener; import java.util.LinkedHashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.isomorphic.criteria.DefaultOperators; import com.isomorphic.criteria.criterion.SimpleCriterion; import com.isomorphic.datasource.DSRequest; import com.isomorphic.datasource.DSResponse; import com.isomorphic.datasource.DataSource; public class Employees { public DSResponse doRenameEmployeeBad(DSRequest request, HttpServletRequest servletRequest) throws Exception { DSRequest updateRequest = new DSRequest("employees", DataSource.OP_UPDATE, request.getRPCManager()); updateRequest.addToCriteria(new SimpleCriterion("EmployeeId", DefaultOperators.Equals, 192)); Map<String, Object> values = new LinkedHashMap<String, Object>(); values.put("Name", "foobar"); // values.put("Email", "foobar"); // This is needed! updateRequest.setValues(values); DSResponse updateResponse = updateRequest.execute(); return updateResponse; } public DSResponse doRenameEmployeeGood(DSRequest request, HttpServletRequest servletRequest) throws Exception { DSRequest updateRequest = new DSRequest("employees", DataSource.OP_UPDATE, request.getRPCManager()); updateRequest.addToCriteria(new SimpleCriterion("EmployeeId", DefaultOperators.Equals, 192)); Map<String, Object> values = new LinkedHashMap<String, Object>(); values.put("Name", "foobar"); values.put("Email", "foobar"); // This is needed! updateRequest.setValues(values); DSResponse updateResponse = updateRequest.execute(); return updateResponse; } }
Code:
INFO RequestContext - URL: '/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0': Moz (Gecko) with Accept-Encoding header DEBUG IDACall - Header Name:Value pair: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 DEBUG IDACall - Header Name:Value pair: Connection:keep-alive DEBUG IDACall - Header Name:Value pair: DNT:1 DEBUG IDACall - Header Name:Value pair: Referer:http://127.0.0.1:8888/BuiltInDS.html?gwt.codesvr=127.0.0.1:9997 DEBUG IDACall - Header Name:Value pair: Pragma:no-cache DEBUG IDACall - Header Name:Value pair: Accept-Encoding:gzip, deflate DEBUG IDACall - Header Name:Value pair: Cache-Control:no-cache DEBUG IDACall - Header Name:Value pair: User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 DEBUG IDACall - Header Name:Value pair: Content-Type:application/x-www-form-urlencoded; charset=UTF-8 DEBUG IDACall - Header Name:Value pair: Accept-Language:de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 DEBUG IDACall - Header Name:Value pair: Content-Length:828 DEBUG IDACall - Header Name:Value pair: Cookie:isc_cState=ready; JSESSIONID=4cnwgsekws9617xgv4r3a0vgq; GLog=%7B%0A%20%20%20%20trackRPC%3Atrue%2C%20%0A%20%20%20%20isc_pageURL%3A%22http%3A//127.0.0.1%3A8888/BuiltInDS.html%3Fgwt.codesvr%3D127.0.0.1%3A9997%22%2C%20%0A%20%20%20%20isc_pageGUID%3A%2245C1F5C0-A193-481A-9145-F6D2BEBEDFAC%22%2C%20%0A%20%20%20%20priorityDefaults%3A%7B%0A%20%20%20%20%20%20%20%20sgwtInternal%3A1%2C%20%0A%20%20%20%20%20%20%20%20Log%3A4%0A%20%20%20%20%7D%2C%20%0A%20%20%20%20defaultPriority%3A3%2C%20%0A%20%20%20%20left%3A2068%2C%20%0A%20%20%20%20top%3A131%2C%20%0A%20%20%20%20width%3A903%2C%20%0A%20%20%20%20height%3A771%0A%7D DEBUG IDACall - Header Name:Value pair: Host:127.0.0.1:8888 DEBUG IDACall - session exists: 4cnwgsekws9617xgv4r3a0vgq DEBUG IDACall - remote user: null DEBUG XML - Parsed XML from (in memory stream): 1ms DEBUG ISCKeyedObjectPool - Borrowing object for 'transaction' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'transaction' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'transaction' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'Object' DEBUG PoolableDataSourceFactory - Created DataSource 35 of type 'Object' and assigned it to thread qtp767393855-48 DEBUG PoolableDataSourceFactory - Created DataSource 35 of type 'Object' in the pooling flow DEBUG PoolableDataSourceFactory - Activated DataSource 35 of type 'Object' DEBUG ISCKeyedObjectPool - Borrowing object for 'List' DEBUG PoolableDataSourceFactory - Created DataSource 36 of type 'List' and assigned it to thread qtp767393855-48 DEBUG PoolableDataSourceFactory - Created DataSource 36 of type 'List' in the pooling flow DEBUG PoolableDataSourceFactory - Activated DataSource 36 of type 'List' DEBUG ISCKeyedObjectPool - Borrowing object for 'elem' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'elem' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'elem' in the pooling flow DEBUG RPCManager - Processing 1 requests. INFO Download - Returning 304: Not modified on conditional get of: C:\Users\ST\workspace\lib\smartgwtpower-5.1p\samples\built-in-ds\war\builtinds\sc\skins\Simplicity\images\blank.gif DEBUG ISCKeyedObjectPool - Borrowing object for 'employees' DEBUG PoolableDataSourceFactory - Activated DataSource 23 of type 'employees' DEBUG DSRequest - Caching instance 23 of DS 'employees' from DSRequest.getDataSource() DEBUG DSRequest - Caching instance 23 of DS employees DEBUG RPCManager - Request #1 (DSRequest) payload: { values:null, operationConfig:{ dataSource:"employees", repo:null, operationType:"custom", textMatchStyle:"exact" }, appID:"builtinApplication", operation:"doRenameEmployeeBad", oldValues:null, criteria:{ } } INFO IDACall - Performing 1 operation(s) DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - DataSource employees is not in the pre-checked list, processing... [WARN] Server class 'org.apache.commons.lang.StringUtils' could not be found in the web app, but was found on the system classpath [WARN] Adding classpath entry 'file:/C:/Users/ST/workspace/lib/smartgwtpower-5.1p/lib/commons-lang-2.6.jar' to the web app classpath for this session For additional info see: file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_0.0.0.201601131605/gwt-2.7.0/doc/helpInfo/webAppClassPath.html DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - Request is not a client request, ignoring security checks. DEBUG ISCKeyedObjectPool - Borrowing object for 'employees' DEBUG SQLDataSource - DataSource 37 acquired SQLDriver instance 830386641 during initialization DEBUG PoolableDataSourceFactory - Created DataSource 37 of type 'employees' and assigned it to thread qtp767393855-48 DEBUG PoolableDataSourceFactory - Created DataSource 37 of type 'employees' in the pooling flow DEBUG PoolableDataSourceFactory - Activated DataSource 37 of type 'employees' DEBUG DSRequest - Caching instance 37 of DS 'employees' from DSRequest.getDataSource() DEBUG DSRequest - Caching instance 37 of DS employees DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - Request is not a client request, ignoring security checks. DEBUG ServerObject - Couldn't find a public method named: fetch on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - DataSourceDMI: no public method name: fetch available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with criteria: {} values: {} INFO SQLWhereClause - [builtinApplication.null] empty condition INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause INFO Velocity - [builtinApplication.null] Velocity Tools not available - using standard Velocity Contexts. DEBUG Velocity - [builtinApplication.null] Velocity config: { } INFO SQLDataSource - [builtinApplication.null] 37: Executing SQL query on 'HSQLDB': SELECT employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE ('1'='1') [WARN] Server class 'com.isomorphic.hibernate.HibernateDataSource' could not be found in the web app, but was found on the system classpath [WARN] Adding classpath entry 'file:/C:/Users/ST/workspace/lib/smartgwtpower-5.1p/lib/isomorphic_hibernate.jar' to the web app classpath for this session For additional info see: file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_0.0.0.201601131605/gwt-2.7.0/doc/helpInfo/webAppClassPath.html INFO PoolManager - [builtinApplication.null] SmartClient pooling disabled for 'HSQLDB' objects DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Initializing SQL config for 'HSQLDB' from system config - using DriverManager: org.hsqldb.jdbcDriver DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] org.hsqldb.jdbcDriver lookup successful DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing JDBC URL only to getConnection INFO Download - Returning 304: Not modified on conditional get of: C:\Users\ST\workspace\lib\smartgwtpower-5.1p\samples\built-in-ds\war\builtinds\sc\skins\Enterprise\images\DynamicForm\unchecked_Disabled.png INFO Download - Returning 304: Not modified on conditional get of: C:\Users\ST\workspace\lib\smartgwtpower-5.1p\samples\built-in-ds\war\builtinds\sc\system\reference\skin\images\server_client_exchange.png DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] makeObject() created an unpooled Connection '586268982' DEBUG SQLConnectionManager - [builtinApplication.null] Borrowed connection '586268982' [B]INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB' using connection '586268982': SELECT employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE ('1'='1') INFO DSResponse - DSResponse: List with 115 items[/B] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource employees DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDriver - Freeing SQLDriver dbConnection 586268982 for SQLDriver instance 830386641 DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "586268982" [WARN] Server class 'org.apache.commons.dbcp.PoolableConnection' could not be found in the web app, but was found on the system classpath [WARN] Adding classpath entry 'file:/C:/Users/ST/workspace/lib/smartgwtpower-5.1p/lib/commons-dbcp-1.3.jar' to the web app classpath for this session For additional info see: file:/C:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_0.0.0.201601131605/gwt-2.7.0/doc/helpInfo/webAppClassPath.html DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 37 of type 'employees' DEBUG ISCKeyedObjectPool - Borrowing object for 'integer' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'integer' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'integer' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'integer' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'integer' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'integer' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'integer' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'integer' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'integer' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'float' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'float' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'float' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'text' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'text' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'text' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'employees' DEBUG PoolableDataSourceFactory - Activated DataSource 37 of type 'employees' DEBUG DSRequest - Caching instance 37 of DS 'employees' from DSRequest.getDataSource() DEBUG DSRequest - Caching instance 37 of DS employees DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - Request is not a client request, ignoring security checks. DEBUG ServerObject - Couldn't find a public method named: fetch on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - DataSourceDMI: no public method name: fetch available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with outputs: [EmployeeId, Name] criteria: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"Email",value:"cmadigan@server.com",operator:"iEquals"},{fieldName:"Name",value:"foobar",operator:"iEquals"},{criteria:[{fieldName:"EmployeeId",value:null,operator:"notEqual"}],operator:"or"}],operator:"and"} values: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"Email",value:"cmadigan@server.com",operator:"iEquals"},{fieldName:"Name",value:"foobar",operator:"iEquals"},{criteria:[{fieldName:"EmployeeId",value:null,operator:"notEqual"}],operator:"or"}],operator:"and"} INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause INFO SQLDataSource - [builtinApplication.null] 37: Executing SQL query on 'HSQLDB': SELECT employeeTable.Name, employeeTable.EmployeeId FROM employeeTable WHERE ((LOWER(employeeTable.Email) = LOWER('cmadigan@server.com') AND employeeTable.Email IS NOT NULL) AND (LOWER(employeeTable.Name) = LOWER('foobar') AND employeeTable.Name IS NOT NULL) AND ((employeeTable.EmployeeId IS NOT NULL))) DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing JDBC URL only to getConnection DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] makeObject() created an unpooled Connection '1227861310' DEBUG SQLConnectionManager - [builtinApplication.null] Borrowed connection '1227861310' [B]INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB' using connection '1227861310': SELECT employeeTable.Name, employeeTable.EmployeeId FROM employeeTable WHERE ((LOWER(employeeTable.Email) = LOWER('[U][I]cmadigan@server.com[/I][/U]') AND employeeTable.Email IS NOT NULL) AND (LOWER(employeeTable.Name) = LOWER('foobar') AND employeeTable.Name IS NOT NULL) AND ((employeeTable.EmployeeId IS NOT NULL))) INFO DSResponse - DSResponse: List with 0 items[/B] DEBUG DSRequest - About to free up resources for request of type fetch on DataSource employees DEBUG ServerObject - Couldn't find a public method named: update on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - DataSourceDMI: no public method name: update available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null] Performing update operation with criteria: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"EmployeeId",value:192,operator:"equals"}],operator:"and"} values: {Name:"foobar"} DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing JDBC URL only to getConnection DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] makeObject() created an unpooled Connection '434543373' DEBUG SQLConnectionManager - [builtinApplication.null] Borrowed connection '434543373' DEBUG SQLTransaction - [builtinApplication.null] Started new HSQLDB transaction "434543373" DEBUG SQLDataSource - [builtinApplication.null] Setting DSRequest as being part of a transaction INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB' using connection '434543373': UPDATE employeeTable SET Name='foobar' WHERE ((employeeTable.EmployeeId = 192 AND employeeTable.EmployeeId IS NOT NULL)) DEBUG SQLDataSource - [builtinApplication.null] update operation affected 1 rows INFO SQLDataSource - [builtinApplication.null] primaryKeys: {EmployeeId=192} DEBUG DeclarativeSecurity - [builtinApplication.null] Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - [builtinApplication.null] Request is not a client request, ignoring security checks. DEBUG ServerObject - [builtinApplication.null] Couldn't find a public method named: fetch on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - [builtinApplication.null] DataSourceDMI: no public method name: fetch available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] Performing fetch operation with criteria: {EmployeeId:192} values: {EmployeeId:192} INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Using SQL Limit query DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT LIMIT 0 1 employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE (employeeTable.EmployeeId=192) DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT LIMIT 0 1 employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE (employeeTable.EmployeeId=192) DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Setting DSRequest as being part of a transaction INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items DEBUG DSRequest - [builtinApplication.null] freeOnExecute is false for request of type fetch on DataSource employees - not freeing resources! INFO DSResponse - DSResponse: List with 1 items DEBUG DSRequest - freeOnExecute is false for request of type update on DataSource employees - not freeing resources! INFO DSResponse - DSResponse: List with 1 items DEBUG DSRequest - About to free up resources for request of type custom on DataSource employees DEBUG DSRequest - Ignoring freeResources call because this is not a primary request! DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8 DEBUG SQLTransaction - Committing HSQLDB transaction "434543373" DEBUG SQLTransaction - Committing HSQLDB transaction "434543373" DEBUG SQLTransaction - Committing HSQLDB transaction "434543373" DEBUG SQLTransaction - Committing HSQLDB transaction "434543373" DEBUG RPCManager - DMI response, dropExtraFields: false DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request! DEBUG SQLTransaction - getConnection() looked for transactional connection for HSQLDB: hashcode "434543373" DEBUG SQLTransaction - Ending HSQLDB transaction "434543373" DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "434543373" DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 23 of type 'employees' DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDriver - Freeing SQLDriver dbConnection 1227861310 for SQLDriver instance 830386641 DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "1227861310" DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 37 of type 'employees' DEBUG DSRequest - Ignoring freeResources call because this is not a primary request! DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request! DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed INFO Compression - /builtinds/sc/IDACall: 391 -> 286 bytes
Good log (w/o timestamps to compare it):
Code:
INFO RequestContext - URL: '/builtinds/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0': Moz (Gecko) with Accept-Encoding header DEBUG IDACall - Header Name:Value pair: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 DEBUG IDACall - Header Name:Value pair: Connection:keep-alive DEBUG IDACall - Header Name:Value pair: DNT:1 DEBUG IDACall - Header Name:Value pair: Referer:http://127.0.0.1:8888/BuiltInDS.html?gwt.codesvr=127.0.0.1:9997 DEBUG IDACall - Header Name:Value pair: Pragma:no-cache DEBUG IDACall - Header Name:Value pair: Accept-Encoding:gzip, deflate DEBUG IDACall - Header Name:Value pair: Cache-Control:no-cache DEBUG IDACall - Header Name:Value pair: User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0 DEBUG IDACall - Header Name:Value pair: Content-Type:application/x-www-form-urlencoded; charset=UTF-8 DEBUG IDACall - Header Name:Value pair: Accept-Language:de-de,de;q=0.8,en-us;q=0.5,en;q=0.3 DEBUG IDACall - Header Name:Value pair: Content-Length:829 DEBUG IDACall - Header Name:Value pair: Cookie:isc_cState=ready; JSESSIONID=4cnwgsekws9617xgv4r3a0vgq; GLog=%7B%0A%20%20%20%20trackRPC%3Atrue%2C%20%0A%20%20%20%20isc_pageURL%3A%22http%3A//127.0.0.1%3A8888/BuiltInDS.html%3Fgwt.codesvr%3D127.0.0.1%3A9997%22%2C%20%0A%20%20%20%20isc_pageGUID%3A%2245C1F5C0-A193-481A-9145-F6D2BEBEDFAC%22%2C%20%0A%20%20%20%20priorityDefaults%3A%7B%0A%20%20%20%20%20%20%20%20sgwtInternal%3A1%2C%20%0A%20%20%20%20%20%20%20%20Log%3A4%0A%20%20%20%20%7D%2C%20%0A%20%20%20%20defaultPriority%3A3%2C%20%0A%20%20%20%20left%3A2068%2C%20%0A%20%20%20%20top%3A131%2C%20%0A%20%20%20%20width%3A903%2C%20%0A%20%20%20%20height%3A771%0A%7D DEBUG IDACall - Header Name:Value pair: Host:127.0.0.1:8888 DEBUG IDACall - session exists: 4cnwgsekws9617xgv4r3a0vgq DEBUG IDACall - remote user: null DEBUG XML - Parsed XML from (in memory stream): 2ms DEBUG ISCKeyedObjectPool - Borrowing object for 'transaction' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'transaction' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'transaction' in the pooling flow DEBUG ISCKeyedObjectPool - Borrowing object for 'Object' DEBUG PoolableDataSourceFactory - Created DataSource 38 of type 'Object' and assigned it to thread qtp767393855-35 DEBUG PoolableDataSourceFactory - Created DataSource 38 of type 'Object' in the pooling flow DEBUG PoolableDataSourceFactory - Activated DataSource 38 of type 'Object' DEBUG ISCKeyedObjectPool - Borrowing object for 'List' DEBUG PoolableDataSourceFactory - Created DataSource 39 of type 'List' and assigned it to thread qtp767393855-35 DEBUG PoolableDataSourceFactory - Created DataSource 39 of type 'List' in the pooling flow DEBUG PoolableDataSourceFactory - Activated DataSource 39 of type 'List' DEBUG ISCKeyedObjectPool - Borrowing object for 'elem' DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'elem' but null was returned DEBUG PoolableDataSourceFactory - Created DataSource null of type 'elem' in the pooling flow DEBUG RPCManager - Processing 1 requests. DEBUG ISCKeyedObjectPool - Borrowing object for 'employees' DEBUG PoolableDataSourceFactory - Activated DataSource 37 of type 'employees' DEBUG DSRequest - Caching instance 37 of DS 'employees' from DSRequest.getDataSource() DEBUG DSRequest - Caching instance 37 of DS employees DEBUG RPCManager - Request #1 (DSRequest) payload: { values:null, operationConfig:{ dataSource:"employees", repo:null, operationType:"custom", textMatchStyle:"exact" }, appID:"builtinApplication", operation:"doRenameEmployeeGood", oldValues:null, criteria:{ } } INFO IDACall - Performing 1 operation(s) DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - DataSource employees is not in the pre-checked list, processing... DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - Request is not a client request, ignoring security checks. DEBUG ISCKeyedObjectPool - Borrowing object for 'employees' DEBUG PoolableDataSourceFactory - Activated DataSource 23 of type 'employees' DEBUG DSRequest - Caching instance 23 of DS 'employees' from DSRequest.getDataSource() DEBUG DSRequest - Caching instance 23 of DS employees DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - Request is not a client request, ignoring security checks. DEBUG ServerObject - Couldn't find a public method named: fetch on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - DataSourceDMI: no public method name: fetch available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null] Performing fetch operation with outputs: [EmployeeId, Name] criteria: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"Email",value:"foobar",operator:"iEquals"},{fieldName:"Name",value:"foobar",operator:"iEquals"},{criteria:[{fieldName:"EmployeeId",value:null,operator:"notEqual"}],operator:"or"}],operator:"and"} values: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"Email",value:"foobar",operator:"iEquals"},{fieldName:"Name",value:"foobar",operator:"iEquals"},{criteria:[{fieldName:"EmployeeId",value:null,operator:"notEqual"}],operator:"or"}],operator:"and"} INFO SQLDataSource - [builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause INFO SQLDataSource - [builtinApplication.null] 23: Executing SQL query on 'HSQLDB': SELECT employeeTable.Name, employeeTable.EmployeeId FROM employeeTable WHERE ((LOWER(employeeTable.Email) = LOWER('foobar') AND employeeTable.Email IS NOT NULL) AND (LOWER(employeeTable.Name) = LOWER('foobar') AND employeeTable.Name IS NOT NULL) AND ((employeeTable.EmployeeId IS NOT NULL))) DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing JDBC URL only to getConnection DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] makeObject() created an unpooled Connection '563762654' DEBUG SQLConnectionManager - [builtinApplication.null] Borrowed connection '563762654' INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB' using connection '563762654': SELECT employeeTable.Name, employeeTable.EmployeeId FROM employeeTable WHERE ((LOWER(employeeTable.Email) = LOWER('foobar') AND employeeTable.Email IS NOT NULL) AND (LOWER(employeeTable.Name) = LOWER('foobar') AND employeeTable.Name IS NOT NULL) AND ((employeeTable.EmployeeId IS NOT NULL))) INFO DSResponse - DSResponse: List with 0 items DEBUG DSRequest - About to free up resources for request of type fetch on DataSource employees DEBUG ServerObject - Couldn't find a public method named: update on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - DataSourceDMI: no public method name: update available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null] Performing update operation with criteria: {_constructor:"AdvancedCriteria",criteria:[{fieldName:"EmployeeId",value:192,operator:"equals"}],operator:"and"} values: {Name:"foobar",Email:"foobar"} DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] DriverManager fetching connection for HSQLDB via jdbc url jdbc:hsqldb:hsql://localhost/isomorphic DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] Passing JDBC URL only to getConnection DEBUG PoolableSQLConnectionFactory - [builtinApplication.null] makeObject() created an unpooled Connection '1821811431' DEBUG SQLConnectionManager - [builtinApplication.null] Borrowed connection '1821811431' DEBUG SQLTransaction - [builtinApplication.null] Started new HSQLDB transaction "1821811431" DEBUG SQLDataSource - [builtinApplication.null] Setting DSRequest as being part of a transaction INFO SQLDriver - [builtinApplication.null] Executing SQL query on 'HSQLDB' using connection '1821811431': UPDATE employeeTable SET Email='foobar', Name='foobar' WHERE ((employeeTable.EmployeeId = 192 AND employeeTable.EmployeeId IS NOT NULL)) DEBUG SQLDataSource - [builtinApplication.null] update operation affected 1 rows INFO SQLDataSource - [builtinApplication.null] primaryKeys: {EmployeeId=192} DEBUG DeclarativeSecurity - [builtinApplication.null] Processing security checks for DataSource null, field null DEBUG DeclarativeSecurity - [builtinApplication.null] Request is not a client request, ignoring security checks. DEBUG ServerObject - [builtinApplication.null] Couldn't find a public method named: fetch on class: com.smartgwt.sample.server.listener.Employees DEBUG DataSourceDMI - [builtinApplication.null] DataSourceDMI: no public method name: fetch available on class: com.smartgwt.sample.server.listener.Employees - defaulting to builtin operations. DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application DEBUG AppBase - [builtinApplication.null, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] Performing fetch operation with criteria: {EmployeeId:192} values: {EmployeeId:192} INFO SQLDataSource - [builtinApplication.null, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Using SQL Limit query DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT LIMIT 0 1 employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE (employeeTable.EmployeeId=192) DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] SQL windowed select rows 0->-1, result size 1. Query: SELECT LIMIT 0 1 employeeTable.userOrder, employeeTable.Name, employeeTable.EmployeeId, employeeTable.ReportsTo, employeeTable.Job, employeeTable.Email, employeeTable.EmployeeType, employeeTable.EmployeeStatus, employeeTable.Salary, employeeTable.OrgUnit, employeeTable.Gender, employeeTable.MaritalStatus FROM employeeTable WHERE (employeeTable.EmployeeId=192) DEBUG SQLDataSource - [builtinApplication.null, builtinApplication.null] Setting DSRequest as being part of a transaction INFO DSResponse - [builtinApplication.null] DSResponse: List with 1 items DEBUG DSRequest - [builtinApplication.null] freeOnExecute is false for request of type fetch on DataSource employees - not freeing resources! INFO DSResponse - DSResponse: List with 1 items DEBUG DSRequest - freeOnExecute is false for request of type update on DataSource employees - not freeing resources! INFO DSResponse - DSResponse: List with 1 items DEBUG DSRequest - About to free up resources for request of type custom on DataSource employees DEBUG DSRequest - Ignoring freeResources call because this is not a primary request! DEBUG RPCManager - Content type for RPC transaction: text/plain; charset=UTF-8 DEBUG SQLTransaction - Committing HSQLDB transaction "1821811431" DEBUG SQLTransaction - Committing HSQLDB transaction "1821811431" DEBUG SQLTransaction - Committing HSQLDB transaction "1821811431" DEBUG SQLTransaction - Committing HSQLDB transaction "1821811431" DEBUG RPCManager - DMI response, dropExtraFields: false DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request! DEBUG SQLTransaction - getConnection() looked for transactional connection for HSQLDB: hashcode "1821811431" DEBUG SQLTransaction - Ending HSQLDB transaction "1821811431" DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "1821811431" DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 37 DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 37 of type 'employees' DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG SQLDriver - Freeing SQLDriver dbConnection 563762654 for SQLDriver instance 658543590 DEBUG SQLConnectionManager - About to close JDBCConnection with hashcode "563762654" DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG SQLDataSource - About to clear SQLDriver state for DS instance 23 DEBUG PoolableDataSourceFactory - Cleared and passivated DataSource 23 of type 'employees' DEBUG DSRequest - Ignoring freeResources call because this is not a primary request! DEBUG DSRequest - Ignoring freeQueueResources call because this is not a primary request! DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed DEBUG DSRequest - Ignoring freeResources call because they have already been freed DEBUG DSRequest - Ignoring freeQueueResources call because they have already been freed INFO Compression - /builtinds/sc/IDACall: 380 -> 278 bytes
Best regards
Blama
Comment