Details

      Description

      The following stack trace appearead when sonar was collecting blame information for a git project in our hudson machine:

      [ERROR] skip ParseException: Unparseable date: "" during parsing date  with pattern yyyy-MM-dd HH:mm:ss Z with Locale en
      java.text.ParseException: Unparseable date: ""
      	at java.text.DateFormat.parse(DateFormat.java:335)
      	at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:112)
      	at org.apache.maven.scm.util.AbstractConsumer.parseDate(AbstractConsumer.java:68)
      	at org.apache.maven.scm.provider.git.gitexe.command.blame.GitBlameConsumer.consumeLine(GitBlameConsumer.java:51)
      	at org.sonar.plugins.scmactivity.plexus.util.cli.StreamPumper.consumeLine(StreamPumper.java:195)
      	at org.sonar.plugins.scmactivity.plexus.util.cli.StreamPumper.run(StreamPumper.java:144)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Can not execute Sonar
      
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
      	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
      	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:592)
      	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: Can not execute Sonar
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
      	at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
      	at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
      	... 16 more
      Caused by: java.lang.NullPointerException
      	at java.util.Calendar.setTime(Calendar.java:1037)
      	at java.text.SimpleDateFormat.format(SimpleDateFormat.java:803)
      	at java.text.SimpleDateFormat.format(SimpleDateFormat.java:796)
      	at java.text.DateFormat.format(DateFormat.java:314)
      	at org.sonar.plugins.scmactivity.BlameSensor.formatLastActivity(BlameSensor.java:112)
      	at org.sonar.plugins.scmactivity.BlameSensor.analyseBlame(BlameSensor.java:83)
      	at org.sonar.plugins.scmactivity.BlameSensor.analyse(BlameSensor.java:56)
      	at org.sonar.plugins.scmactivity.ScmActivitySensor.analyse(ScmActivitySensor.java:77)
      	at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:58)
      	at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
      	at org.sonar.batch.Batch.analyzeProject(Batch.java:112)
      	at org.sonar.batch.Batch.analyzeProject(Batch.java:109)
      	at org.sonar.batch.Batch.analyzeProject(Batch.java:109)
      	at org.sonar.batch.Batch.analyzeProjects(Batch.java:81)
      	at org.sonar.batch.Batch.execute(Batch.java:57)
      	at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:142)
      	at org.sonar.maven.SonarMojo.execute(SonarMojo.java:133)
      	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
      	at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
      	... 20 more
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 minutes 57 seconds
      [INFO] Finished at: Thu Dec 09 16:25:55 BRST 2010
      [INFO] Final Memory: 110M/526M
      [INFO] ------------------------------------------------------------------------
      Finished: FAILURE
      
      1. git-blame.out
        6 kB
        Rodrigo Vieira Couto
      2. hudson.log
        11 kB
        Rodrigo Vieira Couto

        Activity

        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Hi,

        Unfortunately it's impossible to investigate your problem without additional information.
        I believe that you able to see name of file (which caused this error) just before this trace in log. If so, then could you please try to execute command "git blame -c <filename>" and provide output?

        Show
        godin OLD - Evgeny Mandrikov added a comment - Hi, Unfortunately it's impossible to investigate your problem without additional information. I believe that you able to see name of file (which caused this error) just before this trace in log. If so, then could you please try to execute command "git blame -c <filename>" and provide output?
        Hide
        rcouto Rodrigo Vieira Couto added a comment -

        Full hudson log.

        Show
        rcouto Rodrigo Vieira Couto added a comment - Full hudson log.
        Hide
        rcouto Rodrigo Vieira Couto added a comment -

        Output of the command "git blame -c VerisUserAuthenticationException.java"

        Show
        rcouto Rodrigo Vieira Couto added a comment - Output of the command "git blame -c VerisUserAuthenticationException.java"
        Hide
        rcouto Rodrigo Vieira Couto added a comment -

        My git version is:

        ambdev@hudson:~$ git --version
        git version 1.6.0.4
        
        Show
        rcouto Rodrigo Vieira Couto added a comment - My git version is: ambdev@hudson:~$ git --version git version 1.6.0.4
        Hide
        godin OLD - Evgeny Mandrikov added a comment - - edited

        I didn't checked this, but maybe problem relate to the spaces in user name?

        Show
        godin OLD - Evgeny Mandrikov added a comment - - edited I didn't checked this, but maybe problem relate to the spaces in user name?
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Ok, I do confirm that there is a bug when parsing lines like :

        8748a722\t(Tiago Bello Torres\t2010-06-03 17:59:00 -0300\t35)\tpublic VerisUserAuthenticationException(String message) {
        

        Problem comes from last closing brace.

        Show
        godin OLD - Evgeny Mandrikov added a comment - Ok, I do confirm that there is a bug when parsing lines like : 8748a722\t(Tiago Bello Torres\t2010-06-03 17:59:00 -0300\t35)\tpublic VerisUserAuthenticationException(String message) { Problem comes from last closing brace.
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Fixed in r2895, but actually fix should be applied on Maven SCM side.

        Show
        godin OLD - Evgeny Mandrikov added a comment - Fixed in r2895 , but actually fix should be applied on Maven SCM side.
        Hide
        godin OLD - Evgeny Mandrikov added a comment -

        Here is an issue for Maven SCM : SCM-592

        Show
        godin OLD - Evgeny Mandrikov added a comment - Here is an issue for Maven SCM : SCM-592

          People

          • Assignee:
            godin OLD - Evgeny Mandrikov
            Reporter:
            rcouto Rodrigo Vieira Couto
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: