Maven Changelog Plugin
  1. Maven Changelog Plugin
  2. MCHANGELOG-86

Error with outputEncoding parameter set to UTF-8

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Labels:
      None
    • Environment:
      Windows XP Pro SP2, Maven 2.0.9, Java SE 1.5.0 Update 15, Subversion 1.4.6
    • Number of attachments :
      1

      Description

      When using UTF-8 as setting for the parameter outputEncoding, we've got this error:

      [INFO] Generating "Change Log" report.
      [INFO] Generating changed sets xml to: D:\devs\projects\Test\workspace\TestWebapp\target\changelog.xml
      [INFO] Executing: svn --non-interactive log -v -r "

      {2008-05-05 11:45:19 +0000}

      :

      { 2008-06-05 11:45:19 +0000}

      " https://mysubversionsrv/svndev/test/trunk/TestWebapp
      [INFO] Working directory: D:\devs\projects\Test\workspace\TestWebapp
      [INFO] Generating "Developer Activity" report.
      [INFO] Using existing changelog.xml...
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Error during page generation

      Embedded error: Error rendering Maven report: An error occurred while parsing D:
      \devs\projects\Test\workspace\TestWebapp\target\changelog.xml
      Invalid byte 1 of 1-byte UTF-8 sequence.
      [INFO] ------------------------------------------------------------------------
      [INFO] For more information, run Maven with the -e switch
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 39 seconds
      [INFO] Finished at: Wed Jun 04 13:45:23 CEST 2008
      [INFO] Final Memory: 41M/63M
      [INFO] ------------------------------------------------------------------------

      The file changelog.xml contains the good header line (<?xml version="1.0" encoding="UTF-8"?>), but the file is encoded with ANSI UNIX charset

        Activity

        Hide
        JoŽl Royer added a comment - - edited

        Here an extract of my pom.xml:

         <?xml version="1.0" encoding="UTF-8"?>
        <project xmlns="http://maven.apache.org/POM/4.0.0"
        	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        	<modelVersion>4.0.0</modelVersion>
        ...
        	<reporting>
        		<plugins>
        ...
        			<plugin>
        				<groupId>org.apache.maven.plugins</groupId>
        				<artifactId>maven-changelog-plugin</artifactId>
        				<configuration>
        					<outputEncoding>UTF-8</outputEncoding>
        				</configuration>
        			</plugin>
        ...
        		</plugins>
        	</reporting>
        </project>
        Show
        JoŽl Royer added a comment - - edited Here an extract of my pom.xml: <?xml version= "1.0" encoding= "UTF-8" ?> <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" > <modelVersion> 4.0.0 </modelVersion> ... <reporting> <plugins> ... <plugin> <groupId> org.apache.maven.plugins </groupId> <artifactId> maven-changelog-plugin </artifactId> <configuration> <outputEncoding> UTF-8 </outputEncoding> </configuration> </plugin> ... </plugins> </reporting> </project>
        Hide
        JoŽl Royer added a comment -

        Is anybody work on this issue?

        Show
        JoŽl Royer added a comment - Is anybody work on this issue?
        Hide
        Olivier Lamy added a comment -

        could you attach the generated changelog.xml and a log with running mvn with -e ?

        Show
        Olivier Lamy added a comment - could you attach the generated changelog.xml and a log with running mvn with -e ?
        Hide
        Olivier Lamy added a comment -

        fix apply in rev 769578.
        Can you test with trunk or last SNAPSHOT ?

        Show
        Olivier Lamy added a comment - fix apply in rev 769578. Can you test with trunk or last SNAPSHOT ?
        Hide
        JoŽl Royer added a comment - - edited

        The problem is still here with version 2.2-SNAPSHOT.
        I'm now using Maven 2.1.0.

        Here is the stacktrace generated with command "mvn -e ":

        [INFO] Generating "Change Log" report.
        [INFO] Using existing changelog.xml...
        [INFO] ------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Error during page generation
        
        Embedded error: Error rendering Maven report: An error occurred while parsing C:
        \devs\projects\Test\workspace\TestWebapp\changelog.xml
        Invalid byte 2 of 3-byte UTF-8 sequence.
        [INFO] ------------------------------------------------------------------------
        [INFO] Trace
        org.apache.maven.lifecycle.LifecycleExecutionException: Error during page genera
        tion
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
        ultLifecycleExecutor.java:703)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
        fecycle(DefaultLifecycleExecutor.java:540)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
        ltLifecycleExecutor.java:519)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
        dleFailures(DefaultLifecycleExecutor.java:371)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
        ts(DefaultLifecycleExecutor.java:332)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
        fecycleExecutor.java:181)
                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
        java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        sorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        
                at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page gen
        eration
                at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:105)
                at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
        nManager.java:483)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
        ultLifecycleExecutor.java:678)
                ... 16 more
        Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error renderin
        g Maven report: An error occurred while parsing F:\Devs\temp\diarytools-api-1.0\
        target\changelog.xml
                at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(R
        eportDocumentRenderer.java:149)
                at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(
        DefaultSiteRenderer.java:269)
                at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(Defaul
        tSiteRenderer.java:101)
                at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133
        )
                at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100)
                ... 18 more
        Caused by: org.apache.maven.reporting.MavenReportException: An error occurred wh
        ile parsing C:\devs\projects\Test\workspace\TestWebapp\changelog.xml
                at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(Chan
        geLogReport.java:374)
                at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(Chang
        eLogReport.java:336)
                at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMaven
        Report.java:98)
                at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(R
        eportDocumentRenderer.java:139)
                ... 22 more
        Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceExcep
        tion: Invalid byte 2 of 3-byte UTF-8 sequence.
                at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF
        8Reader.java:674)
                at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader
        .java:398)
                at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEnti
        tyScanner.java:1742)
                at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XML
        EntityScanner.java:1242)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
        l.scanCDATASection(XMLDocumentFragmentScannerImpl.java:1646)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
        l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2977)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X
        MLDocumentScannerImpl.java:648)
                at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
        l.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
        ML11Configuration.java:807)
                at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
        ML11Configuration.java:737)
                at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
        java:107)
                at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
        stractSAXParser.java:1205)
                at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p
        arse(SAXParserImpl.java:522)
                at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
                at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
                at org.apache.maven.plugin.changelog.ChangeLog.loadChangedSets(ChangeLog
        .java:65)
                at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(Chan
        geLogReport.java:366)
                ... 25 more
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 47 seconds
        [INFO] Finished at: Wed Apr 29 15:22:04 CEST 2009
        [INFO] Final Memory: 53M/63M
        [INFO] ------------------------------------------------------------------------
        
        Show
        JoŽl Royer added a comment - - edited The problem is still here with version 2.2-SNAPSHOT. I'm now using Maven 2.1.0. Here is the stacktrace generated with command "mvn -e ": [INFO] Generating "Change Log" report. [INFO] Using existing changelog.xml... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error during page generation Embedded error: Error rendering Maven report: An error occurred while parsing C: \devs\projects\Test\workspace\TestWebapp\changelog.xml Invalid byte 2 of 3-byte UTF-8 sequence. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle.LifecycleExecutionException: Error during page genera tion at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:703) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Error during page gen eration at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:105) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:678) ... 16 more Caused by: org.apache.maven.doxia.siterenderer.RendererException: Error renderin g Maven report: An error occurred while parsing F:\Devs\temp\diarytools-api-1.0\ target\changelog.xml at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(R eportDocumentRenderer.java:149) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule( DefaultSiteRenderer.java:269) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(Defaul tSiteRenderer.java:101) at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:133 ) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:100) ... 18 more Caused by: org.apache.maven.reporting.MavenReportException: An error occurred wh ile parsing C:\devs\projects\Test\workspace\TestWebapp\changelog.xml at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(Chan geLogReport.java:374) at org.apache.maven.plugin.changelog.ChangeLogReport.executeReport(Chang eLogReport.java:336) at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMaven Report.java:98) at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(R eportDocumentRenderer.java:139) ... 22 more Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceExcep tion: Invalid byte 2 of 3-byte UTF-8 sequence. at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF 8Reader.java:674) at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader .java:398) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEnti tyScanner.java:1742) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.scanData(XML EntityScanner.java:1242) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l.scanCDATASection(XMLDocumentFragmentScannerImpl.java:1646) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2977) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(X MLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp l.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X ML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser. java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab stractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.p arse(SAXParserImpl.java:522) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at javax.xml.parsers.SAXParser.parse(SAXParser.java:198) at org.apache.maven.plugin.changelog.ChangeLog.loadChangedSets(ChangeLog .java:65) at org.apache.maven.plugin.changelog.ChangeLogReport.getChangedSets(Chan geLogReport.java:366) ... 25 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 47 seconds [INFO] Finished at: Wed Apr 29 15:22:04 CEST 2009 [INFO] Final Memory: 53M/63M [INFO] ------------------------------------------------------------------------
        Hide
        Olivier Lamy added a comment -

        Just adding a new way to read the changelog.xml.
        Can you try with last SNAPSHOT ?

        Show
        Olivier Lamy added a comment - Just adding a new way to read the changelog.xml. Can you try with last SNAPSHOT ?
        Hide
        JoŽl Royer added a comment -

        It works. Great job!

        Show
        JoŽl Royer added a comment - It works. Great job!
        Hide
        Olivier Lamy added a comment -

        looks to be fixed.
        Thanks for your testing time.

        Show
        Olivier Lamy added a comment - looks to be fixed. Thanks for your testing time.

          People

          • Assignee:
            Olivier Lamy
            Reporter:
            JoŽl Royer
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: