Hi.
Is anybody able to write/read any non-latin1 documents in xwiki?
I'm trying with XWiki Version 0.9.793 and a new default database. I'v
changed default values to UTF-8 in:
WEB-INF/xwiki.cfg: xwiki.encoding
WEB-INF/web.xml: init param 'encoding' in 'Set Character Encoding'
filter
XWiki.Preferences -> Presentation: http-equiv meta header
Tomcat 4.1.30 is using JDK 1.4.2, running in locale en_US.
The behaviour is as follows:
1. I'm creating a new document, entering some non-latin1 chars.
2. I can preview, save and edit this document - all works fine
3. I'm restarting tomcat serving xwiki
4. I cannot display the created document - an exception occurs:
$msg.get("problemoccured")
$msg.get("detailedinformation"):
Error number 3202 in 3: Exception while reading document Sandbox.TestTopic1
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
Sandbox.TestTopic1
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)
[...]
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)
[...]
Caused by: net.sf.cglib.beans.BulkBeanException: Lexical error at line 36, column 10.
Encountered: "\u0142" (322), after :
"(a)\n\n\nSandbox\nTestTopic1\n\nen\n0\nSandbox.WebHome\nXWiki.Admin\n1120562792127\n1120562808542\n1.2\n"
at com.xpn.xwiki.doc.XWikiDocument$$BulkBeanByCGLIB$$9e5f0943.setPropertyValues()
at
org.hibernate.tuple.PojoTuplizer.setPropertyValuesWithOptimizer(PojoTuplizer.java:200)
... 63 more
Caused by: org.apache.commons.jrcs.rcs.TokenMgrError: Lexical error at line 36, column 10.
Encountered: "\u0142" (322), after :
"(a)\n\n\nSandbox\nTestTopic1\n\nen\n0\nSandbox.WebHome\nXWiki.Admin\n1120562792127\n1120562808542\n1.2\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)
... 65 more
When I was using previous version of xwiki (probably with different settings)
all non-latin1 characters were converted into html-entities; If I copy-paste
such a document into this new installation - it looks like it should look, but
newly entered characters appear in database as proper utf-8 characters (which in
my opinion is fine - database is set to utf-8), and probably cannot be properly
read by rendering module.
Does anybody have an idea if I can reconfigure something to make it work?
TIA,
Richard.
--
"First they ignore you. Then they laugh at you. Then they
fight you. Then you win." - Mohandas Gandhi.