No in fact it doesn't work :-(
If I just create database with utf8 character set, I still have ????????
instead of chinese character when I restart Tomcat.
When I start mysql with the option : mysqld --default-character-set=utf8, I
have a different problem (even with an empty database). When I start xWiki,
it works fine. But when I put some chinese characters and I restart tomcat, I
have the error message below.
It looks there is encoding error. Can someone help me ?
$msg.get("problemoccured")
$msg.get("detailedinformation"):
Error number 3202 in 3: Exception while reading document Main.WebHome
Wrapped Exception: exception setting property value with CGLIB (set
hibernate.cglib.use_reflection_optimizer=false for more info) setter of
com.xpn.xwiki.doc.XWikiDocument.setArchive
com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading
document Main.WebHome
Wrapped Exception: exception setting property value with CGLIB (set
hibernate.cglib.use_reflection_optimizer=false for more info) setter of
com.xpn.xwiki.doc.XWikiDocument.setArchive
at
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:638)
at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:123)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:566)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:600)
at com.xpn.xwiki.XWiki.getDocumentFromPath(XWiki.java:639)
at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:2388)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:133)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
org.hibernate.PropertyAccessException: exception setting property value with
CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info)
setter of com.xpn.xwiki.doc.XWikiDocument.setArchive
at
org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:203)
at org.hibernate.tuple.PojoTuplizer.setPropertyValues(PojoTuplizer.java:173)
at
org.hibernate.persister.entity.BasicEntityPersister.setPropertyValues(BasicEntityPersister.java:2900)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
at
org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:510)
at org.hibernate.loader.Loader.doQuery(Loader.java:419)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:210)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1312)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:116)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:101)
at
org.hibernate.persister.entity.BasicEntityPersister.load(BasicEntityPersister.java:2461)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:350)
at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:331)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:113)
at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:167)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:79)
at org.hibernate.impl.SessionImpl.load(SessionImpl.java:588)
at
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:567)
at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:123)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:566)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:600)
at com.xpn.xwiki.XWiki.getDocumentFromPath(XWiki.java:639)
at com.xpn.xwiki.XWiki.prepareDocuments(XWiki.java:2388)
at com.xpn.xwiki.web.ViewEditAction.execute(ViewEditAction.java:133)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:127)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: net.sf.cglib.beans.BulkBeanException: Lexical error at line 77,
column 1. Encountered: "\u5728" (22312), after :
"(a)\n\n\nMain\nWebHome\n\nen\n0\n\nXWiki.Admin\n1107712018000\n1117130049720\n1.10\n1
Welcome to your Wiki\n\n"
at
com.xpn.xwiki.doc.XWikiDocument$$BulkBeanByCGLIB$$9e5f0943.setPropertyValues()
at
org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:200)
... 46 more
Caused by: org.apache.commons.jrcs.rcs.TokenMgrError: Lexical error at line
77, column 1. Encountered: "\u5728" (22312), after :
"(a)\n\n\nMain\nWebHome\n\nen\n0\n\nXWiki.Admin\n1107712018000\n1117130049720\n1.10\n1
Welcome to your Wiki\n\n"
at
org.apache.commons.jrcs.rcs.ArchiveParserTokenManager.getNextToken(ArchiveParserTokenManager.java:800)
at
org.apache.commons.jrcs.rcs.ArchiveParser.jj_consume_token(ArchiveParser.java:558)
at org.apache.commons.jrcs.rcs.ArchiveParser.text(ArchiveParser.java:429)
at org.apache.commons.jrcs.rcs.ArchiveParser.archive(ArchiveParser.java:102)
at org.apache.commons.jrcs.rcs.ArchiveParser.load(ArchiveParser.java:55)
at org.apache.commons.jrcs.rcs.Archive.(Archive.java:230)
at com.xpn.xwiki.doc.XWikiDocument.setArchive(XWikiDocument.java:475)
... 48 more
${doc.fullName} ($tdoc.getRealLanguage())