3 Replies Latest reply on Oct 30, 2007 3:48 PM by Nicklas Karlsson

    DocumentException, Invalid byte 3 of 3-byte UTF-8 sequence

    Shigeaki Wakizaka Newbie

      Hi.
      I 'm using seam 2.0b.
      When I put CJK character message in the in the pages.xml like this.

      <?xml version="1.0" encoding="UTF-8"?>
      <pages xmlns="http://jboss.com/products/seam/pages"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
      
      .....
      
       <exception class="jp.jbug.example.seam.BlogEntryException">
       <redirect view-id="/error2.xhtml">
       <message>some CJK character here!!</message>
       </redirect>
       </exception>
      
      ......
      
      


      I got an DocumentException and error messages

      java.lang.RuntimeException: org.dom4j.DocumentException: Error on line 47 of document : Invalid byte 3 of 3-byte UTF-8 sequence. Nested exception: Invalid byte 3 of 3-byte UTF-8 sequence.
       at org.jboss.seam.navigation.Pages.getDocumentRoot(Pages.java:924)
       at org.jboss.seam.navigation.Pages.parse(Pages.java:882)
       at org.jboss.seam.navigation.Pages.initialize(Pages.java:108)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
       at org.jboss.seam.Component.callComponentMethod(Component.java:2015)
       at org.jboss.seam.Component.callCreateMethod(Component.java:1938)
       at org.jboss.seam.Component.newInstance(Component.java:1917)
       at org.jboss.seam.Component.getInstance(Component.java:1814)
       at org.jboss.seam.Component.getInstance(Component.java:1793)
       at org.jboss.seam.Component.getInstance(Component.java:1770)
       at org.jboss.seam.Component.getInstance(Component.java:1765)
       at org.jboss.seam.navigation.Pages.instance(Pages.java:582)
       at org.jboss.seam.core.ConversationPropagation.restoreNaturalConversationId(ConversationPropagation.java:94)
       at org.jboss.seam.core.ConversationPropagation.restoreConversationId(ConversationPropagation.java:47)
       at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:371)
       at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:211)
       at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.dom4j.DocumentException: Error on line 47 of document : Invalid byte 3 of 3-byte UTF-8 sequence. Nested exception: Invalid byte 3 of 3-byte UTF-8 sequence.
       at org.dom4j.io.SAXReader.read(SAXReader.java:482)
       at org.dom4j.io.SAXReader.read(SAXReader.java:343)
       at org.jboss.seam.util.XML.getRootElement(XML.java:21)
       at org.jboss.seam.navigation.Pages.getDocumentRoot(Pages.java:920)
      


      any missing configuration?

      Shige