Full stack trace of my above error:
2008-03-07 16:11:20,031 [
http://localhost:8080/xwiki/bin/view/Nga/ImportCorpus]
[http-8080-Processor22] WARN util.JDBCExceptionReporter - SQL Error:
1366, SQLState: HY000
2008-03-07 16:11:20,031 [
http://localhost:8080/xwiki/bin/view/Nga/ImportCorpus]
[http-8080-Processor22] ERROR util.JDBCExceptionReporter - Incorrect
string value: '\xEF\xBB\xBFJE_...' for column 'XWL_VALUE' at row 1
2008-03-07 16:11:20,031 [
http://localhost:8080/xwiki/bin/view/Nga/ImportCorpus]
[http-8080-Processor22] ERROR .AbstractFlushingEventListener - Could not
synchronize database state with session
org.hibernate.exception.GenericJDBCException: could not insert: [
com.xpn.xwiki.objects.LargeStringProperty]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException
(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(
SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(
JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(
AbstractEntityPersister.java:2267)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(
AbstractEntityPersister.java:2660)
at org.hibernate.action.EntityInsertAction.execute(
EntityInsertAction.java:56)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(
AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(
DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:106)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(
XWikiHibernateBaseStore.java:778)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(
XWikiHibernateBaseStore.java:749)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(
XWikiHibernateStore.java:447)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:97)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1077)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1050)
at com.xpn.xwiki.api.Document.saveDocument(Document.java:1520)
at com.xpn.xwiki.api.Document.save(Document.java:1487)
at com.xpn.xwiki.api.Document.save(Document.java:1481)
at gjdk.com.xpn.xwiki.api.Document_GroovyReflector.invoke(Unknown
Source)
at groovy.lang.MetaMethod.invoke(MetaMethod.java:111)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(
MetaClassHelper.java:657)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:363)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:146)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(
InvokerHelper.java:104)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod(
ScriptBytecodeAdapter.java:85)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNoArgumentsMethod(
ScriptBytecodeAdapter.java:175)
at Script1.run(Script1.groovy:47)
at com.xpn.xwiki.render.groovy.GroovyTemplateEngine$1.writeTo(
GroovyTemplateEngine.java:266)
at com.xpn.xwiki.render.groovy.GroovyTemplateEngine$1.toString(
GroovyTemplateEngine.java:280)
at com.xpn.xwiki.render.groovy.XWikiGroovyRenderer.evaluate(
XWikiGroovyRenderer.java:175)
at com.xpn.xwiki.render.groovy.XWikiGroovyRenderer.render(
XWikiGroovyRenderer.java:219)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(
DefaultXWikiRenderingEngine.java:252)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(
DefaultXWikiRenderingEngine.java:176)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(
DefaultXWikiRenderingEngine.java:145)
at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(
DefaultXWikiRenderingEngine.java:134)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java
:418)
at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
at sun.reflect.GeneratedMethodAccessor404.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(
UberspectImpl.java:295)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(
ASTMethod.java:245)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(
ASTReference.java:203)
at org.apache.velocity.runtime.parser.node.ASTReference.render(
ASTReference.java:294)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(
XWikiVelocityRenderer.java:241)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(
XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1414)
at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:598)
at sun.reflect.GeneratedMethodAccessor311.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(
UberspectImpl.java:295)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(
ASTMethod.java:245)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(
ASTReference.java:203)
at org.apache.velocity.runtime.parser.node.ASTReference.render(
ASTReference.java:294)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:318)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(
VelocimacroProxy.java:194)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(
ASTDirective.java:170)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:74)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(
ASTIfStatement.java:88)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java
:74)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:318)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(
ASTIfStatement.java:107)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(
SimpleNode.java:318)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(
XWikiVelocityRenderer.java:241)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(
XWikiVelocityRenderer.java:155)
at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1414)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:108)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:199)
at org.apache.struts.action.RequestProcessor.processActionPerform(
RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(
RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java
:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
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:117)
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
:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
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(Unknown Source)
Caused by: java.sql.SQLException: Incorrect string value:
'\xEF\xBB\xBFJE_...' for column 'XWL_VALUE' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(
ServerPreparedStatement.java:1160)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(
ServerPreparedStatement.java:685)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1397)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1311)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java
:1296)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(
DelegatingPreparedStatement.java:101)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(
DelegatingPreparedStatement.java:101)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(
AbstractEntityPersister.java:2250)
... 95 more
I have a document which read all MyClass instance and print their content in
the screen. I manual edit an instance of MyClass and replace content with a
Japanese line in my file and click "Save And View". The following error
occurs, but when I refresh the page, the Japanese line is displayed properly
in the screen.
Detailed information:
Error number 3201 in 3: Exception while saving document Nga.BTEC1
Wrapped Exception: could not update:
[com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{name=content,
id=2081820828}]
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while
saving document Nga.BTEC1
Wrapped Exception: could not update:
[com.xpn.xwiki.objects.LargeStringProperty#component[id,name]{name=content,
id=2081820828}]
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:457)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1077)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:120)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:129)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:188)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
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:117)
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:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
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(Unknown Source)
Wrapped Exception:
java.sql.SQLException: Incorrect string value:
'\xE3\x82\xBA\xE3\x82\xAD...' for column 'XWL_VALUE' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at
com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1160)
at
com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:685)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1397)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1311)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1296)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2407)
at
org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
at
org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:778)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:749)
at com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateStore.java:447)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:97)
at com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1077)
at com.xpn.xwiki.web.SaveAction.save(SaveAction.java:120)
at com.xpn.xwiki.web.SaveAction.action(SaveAction.java:129)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:188)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
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:117)
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:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
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(Unknown Source)
I follow all encoding guide for XWiki, HTML, HIbernate, MySQL, System
config, but meet some problem with Tomcat configuration.
I have already modified conf/server.xml,
but there is a section I don't know.
"Check the following parameters for your Tomcat UTF-8 encoding (under
Linux, check catalina.sh)
...
Instead of config system variable LANG you can use JVM properties
...
in server startup script."
I use Windows XP, I don't know where my Tomcat UTF-8 encoding is ?