bilig****@gmail*****
bilig****@gmail*****
2014年 9月 18日 (木) 17:16:58 JST
バトジャルガルです。 MySQL tableのcollationをutf8_unicode_ciにじたら日本語の検索キーワードが文字分けにならなかった。 ----------------- ALTER TABLE SEARCH_LOG CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci; ----------------- On Tue, Sep 16, 2014 at 12:00 PM, <fess-****@lists*****> wrote: > Fess-user メーリングリストへの投稿は以下のアドレスに送ってください. > fess-****@lists***** > > Webブラウザを使って入退会するには以下のURLにどうぞ. > http://lists.sourceforge.jp/mailman/listinfo/fess-user > メールを使う場合,件名(Subject:)または本文に help と書いて以下の > アドレスに送信してください. > fess-****@lists***** > > メーリングリストの管理者への連絡は,以下のアドレスにお願いします. > fess-****@lists***** > > 返信する場合,件名を書き直して内容がわかるようにしてください. > そのままだと,以下のようになってしまいます. "Re: Fess-user > まとめ読み, XX 巻 XX 号" > > > 本日の話題: > > 1. [fess-user 899] Re: Fess-user まとめ読み, 55 巻, 3 号 > (bilig****@gmail*****) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 16 Sep 2014 10:16:58 +0900 > From: "bilig****@gmail*****" <bilig****@gmail*****> > Subject: [fess-user 899] Re: Fess-user まとめ読み, 55 巻, 3 号 > To: fess-****@lists***** > Message-ID: > <CAJuGamB5QqWTyKR9YExDpn_nezAb****@mail*****> > Content-Type: text/plain; charset="utf-8" > > バトジャルガルです。 すべてUTF8ですが、まだうまくいきない。 > > どうしたらいいですか。 > > > mysql> SHOW VARIABLES LIKE '%character%'; > +--------------------------+----------------------------+ > | Variable_name | Value | > +--------------------------+----------------------------+ > | character_set_client | utf8 | > | character_set_connection | utf8 | > | character_set_database | utf8 | > | character_set_filesystem | binary | > | character_set_results | utf8 | > | character_set_server | utf8 | > | character_set_system | utf8 | > | character_sets_dir | /usr/share/mysql/charsets/ | > +--------------------------+----------------------------+ > 8 rows in set (0.00 sec) > > > 2014-09-02 21:24 GMT+09:00 <fess-****@lists*****>: >> Date: Tue, 2 Sep 2014 21:24:32 +0900 >> From: Shinsuke Sugaya <shins****@yahoo*****> >> Subject: [fess-user 880] Re: Fess-user まとめ読み, 54 巻, 4 号 >> To: fess-****@lists***** >> Message-ID: >> <CA+0WS37rin-YSh7H5vPdxZ9bHAYtS6TfwfFYdUWZbAA0Bk_sdA****@mail*****> >> Content-Type: text/plain; charset=UTF-8 >> >> 菅谷です。 >> >> /etc/my.cnf等で以下のようなエンコーディング設定は >> ありますでしょうか? >> >> [mysqld] >> character-set-server = utf8 >> >> shinsuke >> >> 2014年9月2日 18:18 bilig****@gmail***** <bilig****@gmail*****>: >>> 30-Aug-2014 22:54のfess-server-mysql-9.3.0-SNAPSHOTをtestしていますが、なぜか日本語の検索キーワードが文字分けになってしまいました。 >>> >>> どうしたらいいですか。 >>> >>> 2014-09-02 17:55:00,089 [JobScheduler_Worker-4] ERROR >>> jp.sf.fess.job.MinutelyJob - Failed to store a search log. >>> org.seasar.dbflute.exception.SQLFailureException: Look! Read the message below. >>> /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * >>> Failed to execute the SQL for insert. >>> >>> [Advice] >>> Read the SQLException message. >>> >>> [SQLState] >>> HY000 >>> >>> [ErrorCode] >>> 1366 >>> >>> [SQLException] >>> org.seasar.framework.exception.SSQLException >>> [ESSR0072]SQLException(SQL=[insert into SEARCH_LOG (SEARCH_WORD, >>> REQUESTED_TIME, RESPONSE_TIME, HIT_COUNT, QUERY_OFFSET, >>> QUERY_PAGE_SIZE, USER_AGENT, REFERER, CLIENT_IP, USER_SESSION_ID, >>> ACCESS_TYPE, USER_ID) >>> values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)], Message=[1366], >>> ErrorCode=HY000, SQLState={3}) occurred >>> >>> [NextException] >>> java.sql.SQLException >>> Incorrect string value: '\xE8\x92\x94\xE7\x94\xB0' for column >>> 'SEARCH_WORD' at row 1 >>> >>> [Behavior] >>> SearchLogService.store():489 -> SearchLogBhv.insert() >>> >>> [Display SQL] >>> insert into SEARCH_LOG (SEARCH_WORD, REQUESTED_TIME, RESPONSE_TIME, >>> HIT_COUNT, QUERY_OFFSET, QUERY_PAGE_SIZE, USER_AGENT, REFERER, >>> CLIENT_IP, USER_SESSION_ID, ACCESS_TYPE, USER_ID) >>> values ('蒔田', '2014-09-02 17:54:44.689', 79, 0, 0, 20, 'Mozilla/5.0 >>> (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) >>> Chrome/37.0.2062.94 Safari/537.36', >>> 'http://localhost:8080/fess/index/', 'localhost', >>> '240e0e5266e14cf89cd7117cf3f46548', 'W', 1) >>> * * * * * * * * * */ >>> at org.seasar.dbflute.exception.handler.SQLExceptionHandler.throwSQLFailureException(SQLExceptionHandler.java:106) >>> at org.seasar.dbflute.exception.handler.SQLExceptionHandler.handleSQLException(SQLExceptionHandler.java:63) >>> at org.seasar.dbflute.s2dao.sqlhandler.TnAbstractBasicSqlHandler.handleSQLException(TnAbstractBasicSqlHandler.java:373) >>> at org.seasar.dbflute.s2dao.sqlhandler.TnAbstractBasicSqlHandler.executeUpdate(TnAbstractBasicSqlHandler.java:521) >>> at org.seasar.dbflute.s2dao.sqlhandler.TnAbstractEntityHandler.execute(TnAbstractEntityHandler.java:97) >>> at org.seasar.dbflute.s2dao.sqlhandler.TnAbstractEntityHandler.execute(TnAbstractEntityHandler.java:82) >>> at org.seasar.dbflute.s2dao.sqlcommand.TnInsertEntityDynamicCommand.doExecute(TnInsertEntityDynamicCommand.java:84) >>> at org.seasar.dbflute.s2dao.sqlcommand.TnInsertEntityDynamicCommand.execute(TnInsertEntityDynamicCommand.java:60) >>> at org.seasar.dbflute.bhv.core.BehaviorCommandInvoker.executeSql(BehaviorCommandInvoker.java:418) >>> at org.seasar.dbflute.bhv.core.BehaviorCommandInvoker.dispatchInvoking(BehaviorCommandInvoker.java:237) >>> at org.seasar.dbflute.bhv.core.BehaviorCommandInvoker.invoke(BehaviorCommandInvoker.java:163) >>> at org.seasar.dbflute.bhv.AbstractBehaviorReadable.invoke(AbstractBehaviorReadable.java:1323) >>> at org.seasar.dbflute.bhv.AbstractBehaviorWritable.delegateInsert(AbstractBehaviorWritable.java:861) >>> at jp.sf.fess.db.bsbhv.BsSearchLogBhv.doInsert(BsSearchLogBhv.java:698) >>> at jp.sf.fess.db.bsbhv.BsSearchLogBhv.insert(BsSearchLogBhv.java:694) >>> at jp.sf.fess.service.SearchLogService.store(SearchLogService.java:489) >>> at jp.sf.fess.service.SearchLogService$EnhancedByS2AOP$33566c23.$store$invokeSuperMethod$(SearchLogService$EnhancedByS2AOP$33566c23.java) >>> at jp.sf.fess.service.SearchLogService$EnhancedByS2AOP$33566c23$MethodInvocation$store8.proceed(MethodInvocationClassGenerator.java) >>> at org.seasar.extension.tx.DefaultTransactionCallback.execute(DefaultTransactionCallback.java:58) >>> at org.seasar.extension.tx.adapter.JTATransactionManagerAdapter.required(JTATransactionManagerAdapter.java:65) >>> at org.seasar.extension.tx.RequiredInterceptor.invoke(RequiredInterceptor.java:50) >>> at jp.sf.fess.service.SearchLogService$EnhancedByS2AOP$33566c23$MethodInvocation$store8.proceed(MethodInvocationClassGenerator.java) >>> at org.seasar.framework.aop.interceptors.TraceInterceptor.invoke(TraceInterceptor.java:56) >>> at jp.sf.fess.service.SearchLogService$EnhancedByS2AOP$33566c23$MethodInvocation$store8.proceed(MethodInvocationClassGenerator.java) >>> at jp.sf.fess.service.SearchLogService$EnhancedByS2AOP$33566c23.store(SearchLogService$EnhancedByS2AOP$33566c23.java) >>> at jp.sf.fess.helper.impl.SearchLogHelperImpl.processSearchLogQueue(SearchLogHelperImpl.java:139) >>> at jp.sf.fess.helper.SearchLogHelper.storeSearchLog(SearchLogHelper.java:74) >>> at jp.sf.fess.job.MinutelyJob.execute(MinutelyJob.java:37) >>> at jp.sf.fess.job.MinutelyJob$execute.call(Unknown Source) >>> at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) >>> at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) >>> at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) >>> at Script1.run(Script1.groovy:1) >>> at groovy.lang.GroovyShell.evaluate(GroovyShell.java:570) >>> at groovy.lang.GroovyShell.evaluate(GroovyShell.java:608) >>> at groovy.lang.GroovyShell.evaluate(GroovyShell.java:579) >>> at jp.sf.fess.job.impl.GroovyExecutor.execute(GroovyExecutor.java:35) >>> at jp.sf.fess.job.TriggeredJob.execute(TriggeredJob.java:85) >>> at jp.sf.fess.job.TriggeredJob.execute(TriggeredJob.java:48) >>> at org.quartz.core.JobRunShell.run(JobRunShell.java:202) >>> at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) >>> Caused by: org.seasar.framework.exception.SSQLException: >>> [ESSR0072]SQLException(SQL=[insert into SEARCH_LOG (SEARCH_WORD, >>> REQUESTED_TIME, RESPONSE_TIME, HIT_COUNT, QUERY_OFFSET, >>> QUERY_PAGE_SIZE, USER_AGENT, REFERER, CLIENT_IP, USER_SESSION_ID, >>> ACCESS_TYPE, USER_ID) >>> values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)], Message=[1366], >>> ErrorCode=HY000, SQLState={3}) occurred >>> at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.wrapException(PreparedStatementWrapper.java:72) >>> at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.wrapException(PreparedStatementWrapper.java:67) >>> at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:91) >>> at org.seasar.dbflute.s2dao.sqlhandler.TnAbstractBasicSqlHandler.executeUpdate(TnAbstractBasicSqlHandler.java:510) >>> ... 37 more >>> Caused by: java.sql.SQLException: Incorrect string value: >>> '\xE8\x92\x94\xE7\x94\xB0' for column 'SEARCH_WORD' at row 1 >>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1094) >>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208) >>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140) >>> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597) >>> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758) >>> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2826) >>> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082) >>> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2334) >>> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2262) >>> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2246) >>> at org.seasar.extension.jdbc.impl.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:89) >>> ... 38 more > -------------- next part -------------- > mysql> SHOW VARIABLES LIKE '%character%'; > +--------------------------+----------------------------+ > | Variable_name | Value | > +--------------------------+----------------------------+ > | character_set_client | utf8 | > | character_set_connection | utf8 | > | character_set_database | utf8 | > | character_set_filesystem | binary | > | character_set_results | utf8 | > | character_set_server | utf8 | > | character_set_system | utf8 | > | character_sets_dir | /usr/share/mysql/charsets/ | > +--------------------------+----------------------------+ > 8 rows in set (0.00 sec) > -------------- next part -------------- > テキスト形式以外の添付ファイルを保管しました... > ファイル名: Search log error.rtf > 型: application/rtf > サイズ: 7510 バイト > 説明: 無し > Descargar > > ------------------------------ > > _______________________________________________ > Fess-user mailing list > Fess-****@lists***** > http://lists.sourceforge.jp/mailman/listinfo/fess-user > > > 以上: Fess-user まとめ読み, 55 巻, 12 号 > ****************************************