Hi,
As you know I have a sgwt application running in production for some time and I am currently developing its mobile counterpart in SGWT.mobile. The two use the same mySQL DB and SGWT server part (including ds definition). UTF-8 is used everywhere (DB, sgwt, sgwt.mobile).
Bullet character • is permitted in UTF-8 and some users have entered such kind of characters in some text fields, which was possible using the desktop UI. When I open these records (with a Bullet character) in SGWT.mobile the is no problem to load and visualize it. However when I try to update the data using SGWT.mobile I get the following error:
The exact same operation using SGWT UI works fine, here is the log:
Please note that I had encoding problems before (see post http://forums.smartclient.com/showthread.php?t=25105) but this is not the same problem now, there is no issue saving special characters like "ç" which was my problem before. Problems come with "even more special" character like •
Whatever character that is accepted by the SGWT should be accepted by SGWT.mobile as well otherwise it becomes impossible to have the two living together.
Thanks for your help, Ben.
As you know I have a sgwt application running in production for some time and I am currently developing its mobile counterpart in SGWT.mobile. The two use the same mySQL DB and SGWT server part (including ds definition). UTF-8 is used everywhere (DB, sgwt, sgwt.mobile).
Bullet character • is permitted in UTF-8 and some users have entered such kind of characters in some text fields, which was possible using the desktop UI. When I open these records (with a Bullet character) in SGWT.mobile the is no problem to load and visualize it. However when I try to update the data using SGWT.mobile I get the following error:
Code:
=== 2013-03-14 23:03:11,656 [l0-5] INFO RequestContext - URL: '/isomorphic/RESTHandler', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.160 Safari/537.22': Safari with Accept-Encoding header === 2013-03-14 23:03:11,657 [l0-5] DEBUG RestRequestParser - Parsing json object: '{"transactionNum":29,"dataSource":"ui_form_actions","operationType":"update","requestId":"29","showPrompt":null,"data":{"id":61,"companyName_short":"0001","id_type":1,"description":"•","id_prospect_contact":null,"name":"Test","id_prospect":341,"id_person_owners":"[3],[3]","sneak":"id:61","id_person_contributors":"[3]"},"oldValues":{"id":61,"companyName_short":"0001","id_type":2,"id_prospect_contact":null,"description":"•","name":"Test","id_prospect":341,"id_person_owners":"[3],[3]","sneak":"id:61","id_person_contributors":"[3]"}}' === 2013-03-14 23:03:11,662 [l0-5] ERROR RESTHandler - Top-level servlet error: com.isomorphic.js.parser.TokenMgrError: Lexical error at line 1, column 183. Encountered: "\u2022" (8226), after : "\"" at com.isomorphic.js.parser.JSParserTokenManager.getNextToken(JSParserTokenManager.java:1444) at com.isomorphic.js.parser.JSParser.jj_ntk(JSParser.java:735) at com.isomorphic.js.parser.JSParser.JSDataStructure(JSParser.java:120) at com.isomorphic.js.parser.JSParser.HashLine(JSParser.java:264) at com.isomorphic.js.parser.JSParser.HashLiteral(JSParser.java:219) at com.isomorphic.js.parser.JSParser.JSDataStructure(JSParser.java:122) at com.isomorphic.js.parser.JSParser.HashLine(JSParser.java:264) at com.isomorphic.js.parser.JSParser.HashLiteral(JSParser.java:219) at com.isomorphic.js.parser.JSParser.JSDataStructure(JSParser.java:122) at com.isomorphic.js.parser.JSParser.parseDataStruct(JSParser.java:105) at com.isomorphic.js.parser.JSParser.parseDataStruct(JSParser.java:44) at com.isomorphic.js.JSTranslater.fromJS(JSTranslater.java:1589) at com.isomorphic.js.JSTranslater.fromJS(JSTranslater.java:1578) at com.isomorphic.rpc.RestRequestParser.parseRequest(RestRequestParser.java:200) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:286) at com.isomorphic.servlet.RESTHandler.processRequest(RESTHandler.java:307) at com.isomorphic.servlet.RESTHandler.doPost(RESTHandler.java:259) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) === 2013-03-14 23:03:11,665 [l0-5] INFO Compression - /isomorphic/RESTHandler: 3150 -> 776 bytes
Code:
=== 2013-03-14 22:59:23,053 [l0-9] INFO RequestContext - URL: '/moon_desktop/sc/IDACall', User-Agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0': Moz (Gecko) with Accept-Encoding header === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Host:127.0.0.1:8888 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:19.0) Gecko/20100101 Firefox/19.0 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Accept-Language:en-US,en;q=0.5 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Accept-Encoding:gzip, deflate === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Content-Type:application/x-www-form-urlencoded; charset=UTF-8 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Referer:http://127.0.0.1:8888/MOON_DESKTOP.html?gwt.codesvr=127.0.0.1:9997 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Content-Length:1925 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Cookie:com.nside.moon.client_desktop.MoonDesktop.uiversion=2.1.0.d; com.nside.moon.client_desktop.screens.ScreenMoonitor.selectedId=4; com.nside.moon.client_desktop.screens.ScreenCompanies.explorerWidth=700; com.nside.moon.client_desktop.screens.ScreenCompanies.selectedId=165; com.nside.moon.client_desktop.screens.ScreenOrders.explorerWidth=650; com.nside.moon.client_desktop.screens.ScreenOrders.selectedId=76; com.nside.moon.client_desktop.screens.ScreenDashboard.selectedId=5; com.nside.moon.client_desktop.screens.ScreenActions.explorerWidth=800; com.nside.moon.client_desktop.screens.ScreenActions.selectedId=39; com.nside.moon.client_desktop.screens.ScreenEntries.explorerWidth=750; com.nside.moon.client_desktop.screens.ScreenEntries.selectedId=0; com.nside.moon.client_desktop.screens.ScreenAccounting.selectedId=4; com.nside.moon.client_desktop.security.LoginWindow.username=bda; isc_cState=ready; JSESSIONID=1noikfr5tsuga; com.nside.moon.client_desktop.screens.ScreenProspects.explorerWidth=700; com.nside.moon.client_desktop.screens.ScreenProspects.selectedId=341 === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Connection:keep-alive === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Pragma:no-cache === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - Header Name:Value pair: Cache-Control:no-cache === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - session exists: 1noikfr5tsuga === 2013-03-14 22:59:23,053 [l0-9] DEBUG IDACall - remote user: null === 2013-03-14 22:59:23,060 [l0-9] DEBUG XML - Parsed XML from (in memory stream): 6ms === 2013-03-14 22:59:23,061 [l0-9] DEBUG RPCManager - Processing 1 requests. === 2013-03-14 22:59:23,062 [l0-9] DEBUG RPCManager - Request #1 (DSRequest) payload: { criteria:{ id:61 }, values:{ id:61, companyName_short:"0001", id_type:2, description:"•", name:"Test", id_prospect:341, id_person_owners:"[3],[3]", sneak:"id:61", id_person_contributors:"[3]" }, operationConfig:{ dataSource:"ui_form_actions", operationType:"update" }, componentId:"isc_ValuesManager_10", appID:"builtinApplication", operation:"ui_form_actions_update", oldValues:{ id:61, companyName_short:"0001", id_type:1, description:"•", name:"Test", id_prospect:341, id_person_owners:"[3],[3]", sneak:"id:61", id_person_contributors:"[3]" } } === 2013-03-14 22:59:23,062 [l0-9] INFO IDACall - Performing 1 operation(s) === 2013-03-14 22:59:23,062 [l0-9] DEBUG DeclarativeSecurity - Processing security checks for DataSource null, field null === 2013-03-14 22:59:23,062 [l0-9] DEBUG DeclarativeSecurity - DataSource ui_form_actions is not in the pre-checked list, processing... === 2013-03-14 22:59:23,062 [l0-9] DEBUG AppBase - [builtinApplication.ui_form_actions_update] No userTypes defined, allowing anyone access to all operations for this application === 2013-03-14 22:59:23,062 [l0-9] DEBUG AppBase - [builtinApplication.ui_form_actions_update] No public zero-argument method named '_ui_form_actions_update' found, performing generic datasource operation === 2013-03-14 22:59:23,063 [l0-9] INFO SQLDataSource - [builtinApplication.ui_form_actions_update] Performing update operation with criteria: {id:61} values: {id:61,companyName_short:"0001",id_type:2,description:"•",name:"Test",id_prospect:341,id_person_owners:"[3],[3]",sneak:"id:61",id_person_contributors:"[3]"} === 2013-03-14 22:59:23,063 [l0-9] INFO SQLValuesClause - [builtinApplication.ui_form_actions_update] Ignored data for non-existent or included columns: [companyName_short, id_person_owners, sneak, id_person_contributors] === 2013-03-14 22:59:23,063 [l0-9] DEBUG PoolableSQLConnectionFactory - [builtinApplication.ui_form_actions_update] Executing pingTest 'select 1 from dual' on connection 484260854 === 2013-03-14 22:59:23,064 [l0-9] DEBUG SQLConnectionManager - [builtinApplication.ui_form_actions_update] Returning borrowed connection '484260854' === 2013-03-14 22:59:23,064 [l0-9] DEBUG SQLTransaction - [builtinApplication.ui_form_actions_update] Started new Mysql transaction "484260854" === 2013-03-14 22:59:23,064 [l0-9] DEBUG SQLDriver - [builtinApplication.ui_form_actions_update] About to execute SQL update in 'Mysql' using connection'484260854' === 2013-03-14 22:59:23,064 [l0-9] INFO SQLDriver - [builtinApplication.ui_form_actions_update] Executing SQL update on 'Mysql': UPDATE ui_form_actions SET description='•', id_prospect=341, id_type=2, name='Test' WHERE (ui_form_actions.id=61) === 2013-03-14 22:59:23,064 [l0-9] DEBUG SQLDataSource - [builtinApplication.ui_form_actions_update] update operation affected 1 rows === 2013-03-14 22:59:23,065 [l0-9] INFO SQLDataSource - [builtinApplication.ui_form_actions_update] primaryKeys: {id=61} === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] Processing security checks for DataSource null, field null === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] DataSource ui_form_actions is not in the pre-checked list, processing... === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] Processing security checks for DataSource ui_form_actions_, field sneak === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] DataSource ui_form_actions_ is not in the pre-checked list, processing... === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] Processing security checks for DataSource ui_form_actions_, field companyName_short === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] Processing security checks for DataSource ui_form_actions_, field id_person_owners === 2013-03-14 22:59:23,065 [l0-9] DEBUG DeclarativeSecurity - [builtinApplication.ui_form_actions_update] Processing security checks for DataSource ui_form_actions_, field id_person_contributors === 2013-03-14 22:59:23,065 [l0-9] DEBUG AppBase - [builtinApplication.ui_form_actions_update, builtinApplication.null] No userTypes defined, allowing anyone access to all operations for this application === 2013-03-14 22:59:23,065 [l0-9] DEBUG AppBase - [builtinApplication.ui_form_actions_update, builtinApplication.null] No public zero-argument method named '_null' found, performing generic datasource operation
Whatever character that is accepted by the SGWT should be accepted by SGWT.mobile as well otherwise it becomes impossible to have the two living together.
Thanks for your help, Ben.
Comment