You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <th...@xtramind.com> on 2006/03/23 21:22:36 UTC

[m2] Exceptions when executing the surefire-report-maven-plugin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello list,

when executing "mvn site" using the snapshot version of the
surefire-report-maven-plugin, I get two exceptions on my console
window:

<reporting>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>surefire-report-maven-plugin</artifactId>
      <version>2.0-beta-2-SNAPSHOT</version>
    </plugin>
    (...)
  </plugins>
</reporting>



[INFO] Generate "JDepend" report.
[INFO] Generate "JavaNCSS Report" report.
[DEBUG] Calling NCSSExecuter with src    : c:\devel\base-maven\src\main\java
[DEBUG] Calling NCSSExecuter with output : c:\devel\base-maven\target\site\javancss-raw-report.xml
[INFO] Generate "Maven Surefire Report" report.java.lang.Exception: Failure to parse file at:
c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.config.test.DefaultConfigManagerTest.xml
        at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
        at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
        at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
        at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
        at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
        at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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.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.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
        at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
        ... 24 more
java.lang.Exception: Failure to parse file at: c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.resource.test.DefaultResourceManagerTest.xml
        at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
        at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
        at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
        at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
        at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
        at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
        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.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.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
        at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
        ... 24 more
[INFO] Generate "Tag List" report.
[INFO] Generate an index file for the English version.

Unfortunately that's all I see, even with "mvn -e -X".

The two test classes mentioned in the stack trace don't actually work on
my machine; some methods in these classes fail and throw an exception.
It seems to me that the invalid character is a tab character that is
automatically printed in the exception stack trace, i.e. in the
TEST-...xml file there's something like the following:

  <testcase time="0,656" name="testInit">
    <error type="java.lang.ExceptionInInitializerError">java.lang.ExceptionInInitializerError
	at com.xtramind.common.util.ejb.HomeFactory.lookupHome(HomeFactory.java:90)
	at com.xtramind.common.config.EjbRegistry.lookupManager(EjbRegistry.java:210)
	at com.xtramind.common.config.EjbRegistry.lookup(EjbRegistry.java:137)
...


Interestingly there are actually more than these two classes above that
don't pass unit testing. So now I wonder:

1) What is causing the two exceptions? I only see these two.
2) When Maven has finished it seems that the surefire report was created
   successfully despite these exceptions. Is there a reason for this?


BTW:

Is the report plugin configurable in any way? I haven't seen any
information about it (or I haven't found it yet ;-))
I'm asking because the source tree I'm compiling is quite huge, and the
entries under "Package List" on the report page are listed in a random
order, i.e. not sorted for example alphabetically.


Regards and thanks for any hint

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIwOMQvObkgCcDe0RAoh5AKCUrbp0D9Tkb4oJEwpoFb2NSvTvMwCeJraZ
pEc9BUHf6oP4840JOED5Kt8=
=ZqML
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Exceptions when executing the surefire-report-maven-plugin

Posted by Boris Lenzinger <bo...@gmail.com>.
Hi Thorsten,

I understood it was the plugin that was generating the file that could 
not be parsed. But may be it can be interesting to check where the 
characters are. It can be strings extracted from your code. For instance 
you get a method name with this char or a classname with this char in 
the xml file, then you can consider to check the source file. If it is 
somewhere else, I have no idea (may be developpers of the plugin will 
have some ;) ).

Since I'm not a surefire developer, it is possible that what I say is 
not right but it sounds very strange to me that the plugins introduces 
forbidden characters.

And a last remark: are your files created under windows ? I see that you 
have windows path but if file is created under linux, may be you could 
encounter problems with some characters (I had such a problem with 
termination character a long time ago...).

Hope this will help you to understand what your problem can be.

Boris

Thorsten Heit a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Boris,
>
>   
>> Some tracks may be about your problem:
>> * Do you an IDE to edit your files ? If not, Eclipse detects "unusual"
>> characters and may be it could be helpful here. I know that I sometimes
>> generated special characters with a key combination that I've never
>> understood and eclipse was detecting them at once.
>>     
>
> Yes, but the XML files the plugin complains about are generated by
> surefire itself, not by me..
>
>   
>> * I guess you use local as en_US since I see this: Generate an index
>> file for the English version ?
>> * Do you have a special local set when writing your files ?
>>     
>
> I'm using "-Xmx256m -Duser.language=en -Duser.country=US" in MAVEN_OPTS,
> that's all.
>
>
>   
>> * If you make a checkout of the code, do you have special options when
>> checking out ?
>> * If you still have the faulty files (xml ones I mean) may be you can
>> launch under cygwin (you are under windows from what I see): cat -A file
>> which will show you all characters in the file and may be you can detect
>> some undesired characters...
>>     
>
> See above: The files are generated by surefire itself, not by me..
>
>   
>> * you say that some files "do not work". Tests are failing ? they were
>> running fine on another machine ? if yes, how were they ran ? manually ?
>> from an ide ?
>>     
>
> Oh, no, that's unfortunately normal: Some of our developers should be
> beaten because their unit tests don't work anymore for some unknown
> reason...
>
>
> Regards
>
> Thorsten
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (MingW32)
>
> iD8DBQFELAaTQvObkgCcDe0RAqwTAKCwb2ZPBEus38aW24d+uNJhpJf+dgCg6yLn
> EnctxC5Vdg1MGTGBD5Pwoc8=
> =WZoO
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Exceptions when executing the surefire-report-maven-plugin

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Boris,

> Some tracks may be about your problem:
> * Do you an IDE to edit your files ? If not, Eclipse detects "unusual"
> characters and may be it could be helpful here. I know that I sometimes
> generated special characters with a key combination that I've never
> understood and eclipse was detecting them at once.

Yes, but the XML files the plugin complains about are generated by
surefire itself, not by me..

> * I guess you use local as en_US since I see this: Generate an index
> file for the English version ?
> * Do you have a special local set when writing your files ?

I'm using "-Xmx256m -Duser.language=en -Duser.country=US" in MAVEN_OPTS,
that's all.


> * If you make a checkout of the code, do you have special options when
> checking out ?
> * If you still have the faulty files (xml ones I mean) may be you can
> launch under cygwin (you are under windows from what I see): cat -A file
> which will show you all characters in the file and may be you can detect
> some undesired characters...

See above: The files are generated by surefire itself, not by me..

> * you say that some files "do not work". Tests are failing ? they were
> running fine on another machine ? if yes, how were they ran ? manually ?
> from an ide ?

Oh, no, that's unfortunately normal: Some of our developers should be
beaten because their unit tests don't work anymore for some unknown
reason...


Regards

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFELAaTQvObkgCcDe0RAqwTAKCwb2ZPBEus38aW24d+uNJhpJf+dgCg6yLn
EnctxC5Vdg1MGTGBD5Pwoc8=
=WZoO
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Exceptions when executing the surefire-report-maven-plugin

Posted by Boris Lenzinger <bo...@gmail.com>.
Some tracks may be about your problem:
 * Do you an IDE to edit your files ? If not, Eclipse detects "unusual" 
characters and may be it could be helpful here. I know that I sometimes 
generated special characters with a key combination that I've never 
understood and eclipse was detecting them at once.
 * I guess you use local as en_US since I see this: Generate an index 
file for the English version ?
 * Do you have a special local set when writing your files ?
 * If you make a checkout of the code, do you have special options when 
checking out ?
 * If you still have the faulty files (xml ones I mean) may be you can 
launch under cygwin (you are under windows from what I see): cat -A file 
which will show you all characters in the file and may be you can detect 
some undesired characters...
 * you say that some files "do not work". Tests are failing ? they were 
running fine on another machine ? if yes, how were they ran ? manually ? 
from an ide ?

About the plugin, I use it "as it is" so I can't help you about 
configuration.
 From what I've seen (I'm not an experienced user !) I understand that 
running unit tests consist in executing each test one by one and 
successful build for the plugin means that it can reach the end of the 
run, not that there is no failure...

Hope that one of the items can help.

Boris

Thorsten Heit a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello list,
>
> when executing "mvn site" using the snapshot version of the
> surefire-report-maven-plugin, I get two exceptions on my console
> window:
>
> <reporting>
>   <plugins>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>surefire-report-maven-plugin</artifactId>
>       <version>2.0-beta-2-SNAPSHOT</version>
>     </plugin>
>     (...)
>   </plugins>
> </reporting>
>
>
>
> [INFO] Generate "JDepend" report.
> [INFO] Generate "JavaNCSS Report" report.
> [DEBUG] Calling NCSSExecuter with src    : c:\devel\base-maven\src\main\java
> [DEBUG] Calling NCSSExecuter with output : c:\devel\base-maven\target\site\javancss-raw-report.xml
> [INFO] Generate "Maven Surefire Report" report.java.lang.Exception: Failure to parse file at:
> c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.config.test.DefaultConfigManagerTest.xml
>         at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
>         at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
>         at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
>         at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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.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.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document.
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
>         at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
>         ... 24 more
> java.lang.Exception: Failure to parse file at: c:\devel\base-maven\target\surefire-reports\TEST-com.xtramind.common.resource.test.DefaultResourceManagerTest.xml
>         at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:66)
>         at org.codehaus.mojo.surefire.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:49)
>         at org.codehaus.mojo.surefire.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:44)
>         at org.codehaus.mojo.surefire.SurefireReportMojo.executeReport(SurefireReportMojo.java:77)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
>         at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(SiteMojo.java:802)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:301)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         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.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.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document.
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1672)
>         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:311)
>         at org.codehaus.mojo.surefire.ReportTestSuite.<init>(ReportTestSuite.java:62)
>         ... 24 more
> [INFO] Generate "Tag List" report.
> [INFO] Generate an index file for the English version.
>
> Unfortunately that's all I see, even with "mvn -e -X".
>
> The two test classes mentioned in the stack trace don't actually work on
> my machine; some methods in these classes fail and throw an exception.
> It seems to me that the invalid character is a tab character that is
> automatically printed in the exception stack trace, i.e. in the
> TEST-...xml file there's something like the following:
>
>   <testcase time="0,656" name="testInit">
>     <error type="java.lang.ExceptionInInitializerError">java.lang.ExceptionInInitializerError
> 	at com.xtramind.common.util.ejb.HomeFactory.lookupHome(HomeFactory.java:90)
> 	at com.xtramind.common.config.EjbRegistry.lookupManager(EjbRegistry.java:210)
> 	at com.xtramind.common.config.EjbRegistry.lookup(EjbRegistry.java:137)
> ...
>
>
> Interestingly there are actually more than these two classes above that
> don't pass unit testing. So now I wonder:
>
> 1) What is causing the two exceptions? I only see these two.
> 2) When Maven has finished it seems that the surefire report was created
>    successfully despite these exceptions. Is there a reason for this?
>
>
> BTW:
>
> Is the report plugin configurable in any way? I haven't seen any
> information about it (or I haven't found it yet ;-))
> I'm asking because the source tree I'm compiling is quite huge, and the
> entries under "Package List" on the report page are listed in a random
> order, i.e. not sorted for example alphabetically.
>
>
> Regards and thanks for any hint
>
> Thorsten
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (MingW32)
>
> iD8DBQFEIwOMQvObkgCcDe0RAoh5AKCUrbp0D9Tkb4oJEwpoFb2NSvTvMwCeJraZ
> pEc9BUHf6oP4840JOED5Kt8=
> =ZqML
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Exceptions when executing the surefire-report-maven-plugin

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Gunther,

> 0x8 is a control character (Backspace?) and not allowed in XML files.
> The only exception to this are tab (0x9), CR and LF.
> 
> Check the XML file using a hex editor or XML Spy for the exact location
> of the invalid character.

These files are created during the execution of the surefire plugin so I
don't have any control over them...

Do you have any other ideas what can cause this strange phenomenom?


Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFELBLSQvObkgCcDe0RAgklAKDIdbSjdIZ0jRjKjrGKRx1eEcn8NQCg0P5j
aCq+YnEo39waCzu9ISM3woc=
=DDpr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] Exceptions when executing the surefire-report-maven-plugin

Posted by Gunther Popp <Gu...@web.de>.
Hi Thorsten!

0x8 is a control character (Backspace?) and not allowed in XML files. 
The only exception to this are tab (0x9), CR and LF.

Check the XML file using a hex editor or XML Spy for the exact location 
of the invalid character.

CU,

Gunther

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org