{"action":"created","issue":{"url":"https://api.github.com/repos/jdbi/jdbi/issues/350","repository_url":"https://api.github.com/repos/jdbi/jdbi","labels_url":"https://api.github.com/repos/jdbi/jdbi/issues/350/labels{/name}","comments_url":"https://api.github.com/repos/jdbi/jdbi/issues/350/comments","events_url":"https://api.github.com/repos/jdbi/jdbi/issues/350/events","html_url":"https://github.com/jdbi/jdbi/issues/350","id":153599341,"number":350,"title":" Exception parsing for named parameter replacement","user":{"login":"liniu","id":11866304,"avatar_url":"https://avatars.githubusercontent.com/u/11866304?v=3","gravatar_id":"","url":"https://api.github.com/users/liniu","html_url":"https://github.com/liniu","followers_url":"https://api.github.com/users/liniu/followers","following_url":"https://api.github.com/users/liniu/following{/other_user}","gists_url":"https://api.github.com/users/liniu/gists{/gist_id}","starred_url":"https://api.github.com/users/liniu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liniu/subscriptions","organizations_url":"https://api.github.com/users/liniu/orgs","repos_url":"https://api.github.com/users/liniu/repos","events_url":"https://api.github.com/users/liniu/events{/privacy}","received_events_url":"https://api.github.com/users/liniu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jdbi/jdbi/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-07T15:08:37Z","updated_at":"2016-05-09T16:57:08Z","closed_at":null,"body":"org.skife.jdbi.v2.exceptions.CallbackFailedException: org.skife.jdbi.v2.exceptions.UnableToCreateStatementException: Exception parsing for named parameter replacement [statement:\"INSERT INTO 营业日数据(餐厅编号,餐厅名称,业务日期,节假日,时段,一级报表项目,二级报表项目,是否末级,金额,标识)  VALUES('0101','福建厦门松柏餐厅','2016-04-29',null,'休闲','DI',null,'是',768.5,'0101-2016.4')\", located:\"INSERT INTO 营业日数据(餐厅编号,餐厅名称,业务日期,节假日,时段,一级报表项目,二级报表项目,是否末级,金额,标识)  VALUES('0101','福建厦门松柏餐厅','2016-04-29',null,'休闲','DI',null,'是',768.5,'0101-2016.4')\", rewritten:\"null\", arguments:{ positional:{}, named:{}, finder:[]}]\r\n\tat org.skife.jdbi.v2.DBI.withHandle(DBI.java:301)\r\n\tat com.ei.db.dao.DefaultDao.executeUpdate(DefaultDao.java:584)\r\n\tat hkl.fbi.service.YyrsjService.yyrsj2(YyrsjService.java:34)\r\n\tat hkl.fbi.service.YyrsjService.yyrsj(YyrsjService.java:104)\r\n\tat hkl.fbi.service.YyrsjService.main(YyrsjService.java:116)\r\nCaused by: org.skife.jdbi.v2.exceptions.UnableToCreateStatementException: Exception parsing for named parameter replacement [statement:\"INSERT INTO 营业日数据(餐厅编号,餐厅名称,业务日期,节假日,时段,一级报表项目,二级报表项目,是否末级,金额,标识)  VALUES('0101','福建厦门松柏餐厅','2016-04-29',null,'休闲','DI',null,'是',768.5,'0101-2016.4')\", located:\"INSERT INTO 营业日数据(餐厅编号,餐厅名称,业务日期,节假日,时段,一级报表项目,二级报表项目,是否末级,金额,标识)  VALUES('0101','福建厦门松柏餐厅','2016-04-29',null,'休闲','DI',null,'是',768.5,'0101-2016.4')\", rewritten:\"null\", arguments:{ positional:{}, named:{}, finder:[]}]\r\n\tat org.skife.jdbi.v2.ColonPrefixNamedParamStatementRewriter.rewrite(ColonPrefixNamedParamStatementRewriter.java:69)\r\n\tat org.skife.jdbi.v2.SQLStatement.internalExecute(SQLStatement.java:1296)\r\n\tat org.skife.jdbi.v2.Update.execute(Update.java:56)\r\n\tat org.skife.jdbi.v2.BasicHandle.update(BasicHandle.java:297)\r\n\tat com.ei.db.dao.DefaultDao.lambda$5(DefaultDao.java:585)\r\n\tat org.skife.jdbi.v2.DBI.withHandle(DBI.java:298)\r\n\t... 4 more\r\nCaused by: java.lang.IllegalArgumentException: NoViableAltException('营'@[])\r\n\tat org.skife.jdbi.rewriter.colon.ColonStatementLexer.reportError(ColonStatementLexer.java:26)\r\n\tat org.skife.jdbi.org.antlr.runtime.Lexer.nextToken(Lexer.java:107)\r\n\tat org.skife.jdbi.v2.ColonPrefixNamedParamStatementRewriter.parseString(ColonPrefixNamedParamStatementRewriter.java:106)\r\n\tat org.skife.jdbi.v2.ColonPrefixNamedParamStatementRewriter.rewrite(ColonPrefixNamedParamStatementRewriter.java:65)\r\n\t... 9 more\r\nCaused by: NoViableAltException('营'@[])\r\n\tat org.skife.jdbi.rewriter.colon.ColonStatementLexer.mTokens(ColonStatementLexer.java:872)\r\n\tat org.skife.jdbi.org.antlr.runtime.Lexer.nextToken(Lexer.java:89)\r\n\t... 11 more"},"comment":{"url":"https://api.github.com/repos/jdbi/jdbi/issues/comments/217923066","html_url":"https://github.com/jdbi/jdbi/issues/350#issuecomment-217923066","issue_url":"https://api.github.com/repos/jdbi/jdbi/issues/350","id":217923066,"user":{"login":"qualidafial","id":38629,"avatar_url":"https://avatars.githubusercontent.com/u/38629?v=3","gravatar_id":"","url":"https://api.github.com/users/qualidafial","html_url":"https://github.com/qualidafial","followers_url":"https://api.github.com/users/qualidafial/followers","following_url":"https://api.github.com/users/qualidafial/following{/other_user}","gists_url":"https://api.github.com/users/qualidafial/gists{/gist_id}","starred_url":"https://api.github.com/users/qualidafial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qualidafial/subscriptions","organizations_url":"https://api.github.com/users/qualidafial/orgs","repos_url":"https://api.github.com/users/qualidafial/repos","events_url":"https://api.github.com/users/qualidafial/events{/privacy}","received_events_url":"https://api.github.com/users/qualidafial/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T16:57:08Z","updated_at":"2016-05-09T16:57:08Z","body":"JDBI's SQL parser grammar isn't currently equipped to handle non-ASCII characters as identifiers. However, JDBI ignores everything in double quotes. Depending on your database vendor, enquoting your table and column names might be a viable workaround. e.g.\r\n\r\n    INSERT INTO \"营业日数据\"(\r\n      \"餐厅编号\",\r\n      \"餐厅名称\",\r\n      \"业务日期\",\r\n      \"节假日\",\r\n      \"时段\",\r\n      \"一级报表项目\",\r\n      \"二级报表项目\",\r\n      \"是否末级\",\r\n      \"金额,标识\") \r\n    VALUES(\r\n      '0101',\r\n      '福建厦门松柏餐厅',\r\n      '2016-04-29',\r\n      null,\r\n      '休闲',\r\n      'DI',\r\n      null,\r\n      '是',\r\n      768.5,\r\n      '0101-2016.4')"}}