javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'utf-8' do not match.

freecol | fca00000 | 10 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Colonies with non-ASCII names provoke bad savegame.

    freecol | 10 years ago | fca00000
    javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'utf-8' do not match.
  2. 0

    not able to save games

    freecol | 9 years ago | djalan
    javax.xml.stream.XMLStreamException: Underlying stream encoding 'ASCII' and input paramter for writeStartDocument() method 'UTF-8' do not match.
  3. 0

    StAX - Setting the version and encoding using XMLStreamWriter

    Stack Overflow | 7 years ago | Anurag
    javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Karaf test container throws an IOException when creating the dependencies feature file: {noformat} java.lang.RuntimeException: Error writing feature Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match. at org.ops4j.pax.exam.karaf.container.internal.DependenciesDeployer.writeDependenciesFeature(DependenciesDeployer.java:174) at org.ops4j.pax.exam.karaf.container.internal.DependenciesDeployer.getDependenciesFeature(DependenciesDeployer.java:126) at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:145) at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.setUp(EagerSingleStagedReactor.java:86) at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.beforeClass(EagerSingleStagedReactor.java:136) at org.ops4j.pax.exam.spi.reactors.ReactorManager.beforeClass(ReactorManager.java:452) at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:111) at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: javax.xml.stream.XMLStreamException: Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match. at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(XMLStreamWriterImpl.java:1180) at org.ops4j.pax.exam.karaf.container.internal.DependenciesDeployer.writeDependenciesFeature(DependenciesDeployer.java:150) at org.ops4j.pax.exam.karaf.container.internal.DependenciesDeployer.getDependenciesFeature(DependenciesDeployer.java:126) at org.ops4j.pax.exam.karaf.container.internal.KarafTestContainer.start(KarafTestContainer.java:145) at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.setUp(EagerSingleStagedReactor.java:86) at org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactor.beforeClass(EagerSingleStagedReactor.java:136) at org.ops4j.pax.exam.spi.reactors.ReactorManager.beforeClass(ReactorManager.java:452) at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:111){noformat} The current code only works on platforms with UTF-8 being the default file.encoding like linux/mac osx. It fails on windows. *Workaround* Start vm with {{-Dfile.encoding=UTF-8}}

    JIRA | 3 years ago | Timo Naroska
    java.lang.RuntimeException: Error writing feature Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'UTF-8' do not match.

    1 unregistered visitors

    Root Cause Analysis

    1. javax.xml.stream.XMLStreamException

      Underlying stream encoding 'Cp1252' and input paramter for writeStartDocument() method 'utf-8' do not match.

      at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument()
    2. Java RT
      XMLStreamWriterImpl.writeStartDocument
      1. com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeStartDocument(XMLStreamWriterImpl.java:1182)
      1 frame
    3. net.sf.freecol
      InGameController$1.run
      1. net.sf.freecol.server.FreeColServer.saveGame(FreeColServer.java:483)
      2. net.sf.freecol.client.control.InGameController$1.run(InGameController.java:130)
      2 frames