bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.

Atlassian JIRA | Knut Wannheden | 1 decade ago
  1. 0

    The encoding of confluence.cfg.xml is UTF-8. If the site welcome message (corresponding to property "property.sitewelcomemessage" in the file) contains non UTF-8 characters (e.g. "ä", "ö", or "ü") these are not UTF-8 escaped when written to confluence.cfg.xml. This in turn causes Confluence at restart of the application server to overwrite the file with the default configuration and enter the Confluence setup sequence. IOW the old configuration file is lost! The following is printed to the server log: 2004-09-24 11:42:09,700 ERROR [atlassian.confluence.setup.ConfluenceSetup] Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:74) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:313) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:126) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:70) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:29) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at org.dom4j.io.SAXReader.read(SAXReader.java:358) at org.dom4j.io.SAXReader.read(SAXReader.java:261) at bucket.config.xml.AbstractDom4jXmlConfiguration.loadDocument(AbstractDom4jXmlConfiguration.java:67) at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:66) ... 17 more

    Atlassian JIRA | 1 decade ago | Knut Wannheden
    bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.
  2. 0

    The encoding of confluence.cfg.xml is UTF-8. If the site welcome message (corresponding to property "property.sitewelcomemessage" in the file) contains non UTF-8 characters (e.g. "ä", "ö", or "ü") these are not UTF-8 escaped when written to confluence.cfg.xml. This in turn causes Confluence at restart of the application server to overwrite the file with the default configuration and enter the Confluence setup sequence. IOW the old configuration file is lost! The following is printed to the server log: 2004-09-24 11:42:09,700 ERROR [atlassian.confluence.setup.ConfluenceSetup] Error while trying to copy the default shortcuts to ConfluenceHome! java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:828) at bucket.util.FileUtils.copyFile(FileUtils.java:74) at com.atlassian.confluence.setup.ConfluenceSetup.copyDefaultShortcuts(ConfluenceSetup.java:313) at com.atlassian.confluence.setup.ConfluenceSetup.getInstance(ConfluenceSetup.java:126) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:24) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:70) at com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:29) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3599) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardHost.start(StandardHost.java:738) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347) at org.apache.catalina.core.StandardService.start(StandardService.java:497) at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190) at org.apache.catalina.startup.Catalina.start(Catalina.java:512) at org.apache.catalina.startup.Catalina.execute(Catalina.java:400) at org.apache.catalina.startup.Catalina.process(Catalina.java:180) 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:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203) Caused by: org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence. at org.dom4j.io.SAXReader.read(SAXReader.java:358) at org.dom4j.io.SAXReader.read(SAXReader.java:261) at bucket.config.xml.AbstractDom4jXmlConfiguration.loadDocument(AbstractDom4jXmlConfiguration.java:67) at com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:66) ... 17 more

    Atlassian JIRA | 1 decade ago | Knut Wannheden
    bucket.config.ConfigurationException: Failed to parse config file: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.
  3. 0

    GitHub comment 49971#195000808

    GitHub | 9 months ago | apjanke
    org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 49971#194974137

    GitHub | 9 months ago | apjanke
    org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.
  6. 0

    Jenkins runs fail on invalid XML: "Invalid byte 2 of 4-byte UTF-8 sequence"

    GitHub | 8 months ago | apjanke
    org.dom4j.DocumentException: Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.

    41 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.dom4j.DocumentException

      Invalid byte 2 of 4-byte UTF-8 sequence. Nested exception: Invalid byte 2 of 4-byte UTF-8 sequence.

      at org.dom4j.io.SAXReader.read()
    2. dom4j
      SAXReader.read
      1. org.dom4j.io.SAXReader.read(SAXReader.java:358)
      2. org.dom4j.io.SAXReader.read(SAXReader.java:261)
      2 frames
    3. bucket.config.xml
      AbstractDom4jXmlConfiguration.loadDocument
      1. bucket.config.xml.AbstractDom4jXmlConfiguration.loadDocument(AbstractDom4jXmlConfiguration.java:67)
      1 frame
    4. com.atlassian.confluence
      ConfluenceConfigurationListener.contextInitialized
      1. com.atlassian.confluence.setup.ConfluenceConfiguration.load(ConfluenceConfiguration.java:66)
      2. com.atlassian.confluence.setup.ConfluenceConfigurationListener.contextInitialized(ConfluenceConfigurationListener.java:29)
      2 frames
    5. Glassfish Core
      Catalina.process
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3270)
      2. org.apache.catalina.core.StandardContext.start(StandardContext.java:3599)
      3. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      4. org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
      5. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
      6. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
      7. org.apache.catalina.core.StandardService.start(StandardService.java:497)
      8. org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
      9. org.apache.catalina.startup.Catalina.start(Catalina.java:512)
      10. org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
      11. org.apache.catalina.startup.Catalina.process(Catalina.java:180)
      11 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:324)
      4 frames
    7. Glassfish Core
      Bootstrap.main
      1. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
      1 frame