Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: charset #95

Closed
GerardPaligot opened this issue Feb 18, 2016 · 7 comments
Closed

Build error: charset #95

GerardPaligot opened this issue Feb 18, 2016 · 7 comments
Labels
Milestone

Comments

@GerardPaligot
Copy link

Hi,

I don't know why because I don't change something but since yesterday, the report upload doesn't work in my Travis builds with this error:

Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.2.1:report (default-cli) on project spoon-core: Build error: charset

And yesterday, I had some 500 HTTP code errors.

Any idea if the problem comes from me or you?

@GerardPaligot
Copy link
Author

For information, project.build.sourceEncoding is specified.

  <properties>
    <java.src.version>1.6</java.src.version>
    <java.test.version>1.8</java.test.version>
    <runtime.log>target/velocity.log</runtime.log>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

@longtimeago
Copy link
Contributor

Have the same issue

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.1.0:report (default) on project xockets-hadoop-transport: Build error: charset -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:4.1.0:report (default) on project xockets-hadoop-transport: Build error
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Build error
    at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:251)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
Caused by: java.lang.NullPointerException: charset
    at java.io.InputStreamReader.<init>(InputStreamReader.java:115)
    at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.parseResponse(CoverallsClient.java:101)
    at org.eluder.coveralls.maven.plugin.httpclient.CoverallsClient.submit(CoverallsClient.java:90)
    at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.submitData(CoverallsReportMojo.java:380)
    at org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:244)
    ... 21 more

Came from this line
https://github.com/trautonen/coveralls-maven-plugin/blob/master/src/main/java/org/eluder/coveralls/maven/plugin/httpclient/CoverallsClient.java#L101
probably because contentType.getCharset() returns null

So, either entity is null, or Content-Type header is not found for the response

@trautonen
Copy link
Owner

@longtimeago thanks for the debugging. It seems that something hairy going on with Coveralls API. There's also reports in their Github issues for similar problem (lemurheavy/coveralls-public#723) and status page (http://status.coveralls.io/) still shows degraded mode.

I think we should wait until the service is properly running again and see if there are still issues with the Content-Type. I will also improve the error message in later versions of the plugin.

@longtimeago
Copy link
Contributor

@trautonen thank you for the clarification. Obviously, the root cause is on server side.
It would be nice to have some more meaningful exception.
Also, we could add response tracing in such cases (on debug level)

longtimeago added a commit to longtimeago/coveralls-maven-plugin that referenced this issue Feb 18, 2016
@longtimeago
Copy link
Contributor

@trautonen here is a hotfix #96

trautonen added a commit that referenced this issue Feb 23, 2016
#95: Fix for NPE if Content-Type is null.
@trautonen
Copy link
Owner

This issue will be fixed in 4.2.0 with a better error message. The problem is server side (Coveralls API broken) but the plugin is unable to show a good error message.

I will not backport the fix to 3.x unless someone does it. The issue is basically just about misleading error message.

@trautonen trautonen added this to the v4.2.0 milestone Feb 23, 2016
dgroup pushed a commit to AlexeyZhulyov/nc_edu_web-container that referenced this issue Mar 9, 2016
@javadev
Copy link

javadev commented Feb 19, 2019

I see the same error:

[ERROR] Failed to execute goal org.eluder.coveralls:coveralls-maven-plugin:3.2.1:report (default-cli) on project underscore: Processing of input or output data failed: Report submission to Coveralls API failed with HTTP status 422: Unprocessable Entity (Couldn't find a repository matching this job.) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "mvn clean install jacoco:report coveralls:report" exited with 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants