Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-4273

Caught exception evaluating: module.unusedDependenciesCount > 0 or module.undeclaredDependenciesCount > 0. Reason: java.lang.reflect.InvocationTargetException (caused by NPE in ModuleResult.getUnusedDependencies)

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      OS: Mac OS X

      Java:
      java version "1.6.0_13"
      Java(TM) SE Runtime Environment (build 1.6.0_13-b03-211)
      Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02-83, mixed mode)

      Hudson: 1.320
      Dependency-Analyzer-Plugin: 0.2

      Maven-Version: Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
      Maven-Goals: clean dependency:analyze install
      Maven-Opts: -Dmaven.test.failure.ignore=true -Xmx512m

      I have two Maven2 Jobs (not Freestyle) configured, one without problems:

      [INFO] [dependency:analyze

      {execution: default-cli}

      ]
      [INFO] No dependency problems found

      and another (multi-module) one with some problems:

      [INFO] [dependency:analyze

      {execution: default-cli}

      ]
      [WARNING] Unused declared dependencies found:
      [WARNING] org.slf4j:slf4j-jdk14:jar:1.5.5:compile
      [WARNING] junit:junit:jar:4.5:test

      [INFO] [dependency:analyze

      {execution: default-cli}

      ]
      [WARNING] Unused declared dependencies found:
      [WARNING] org.slf4j:slf4j-jdk14:jar:1.5.5:test

      In both jobs no information is shown on the dependency analyzer page, instead I see tracebacks.
      I am running hudson with the winstone container and without special options.

      19.08.2009 23:09:46 hudson.ExpressionFactory2$JexlExpression evaluate
      WARNING: Caught exception evaluating: module.unusedDependenciesCount > 0 or
      module.undeclaredDependenciesCount > 0. Reason: java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException
      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:597)
      at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
      at
      org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:31
      4)
      at org.apache.commons.jexl.parser.ASTArrayAccess.evaluateExpr(ASTArrayAccess.java:185)
      at org.apache.commons.jexl.parser.ASTIdentifier.execute(ASTIdentifier.java:75)
      at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
      at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
      at org.apache.commons.jexl.parser.ASTGTNode.value(ASTGTNode.java:62)
      at org.apache.commons.jexl.parser.ASTOrNode.value(ASTOrNode.java:55)
      at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:54)
      at
      org.apache.commons.jexl.parser.ASTExpressionExpression.value(ASTExpressionExpression.java:56)
      at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
      at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:71)
      at
      org.apache.commons.jelly.expression.ExpressionSupport.evaluateRecurse(ExpressionSupport.java:61)
      at
      org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsBoolean(ExpressionSupport.java:71
      )
      at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:41)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at
      org.kohsuke.stapler.jelly.CustomTagLibrary$StaplerDynamicTag$1.run(CustomTagLibrary.java:147)
      at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.tags.core.IfTag.doTag(IfTag.java:42)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:81)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at
      org.kohsuke.stapler.jelly.CustomTagLibrary$StaplerDynamicTag$1.run(CustomTagLibrary.java:147)
      at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:112)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:112)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:112)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:112)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.impl.StaticTag.doTag(StaticTag.java:65)
      at org.apache.commons.jelly.impl.StaticTagScript.run(StaticTagScript.java:112)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.DynamicTag.doTag(DynamicTag.java:81)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
      at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
      at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
      at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:29)
      at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:43)
      at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:80)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:475)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
      at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:309)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:179)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:486)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:404)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:117)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      at org.jvnet.hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:38)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:35)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:155)
      at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.NullPointerException
      at
      hudson.plugins.dependencyanalyzer.result.ModuleResult.getUnusedDependencies(ModuleResult.java:5
      3)
      at
      hudson.plugins.dependencyanalyzer.result.ModuleResult.getUnusedDependenciesCount(ModuleResult.j
      ava:41)
      ... 112 more

        Attachments

          Activity

          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          I maybe found the error: from Maven 2.1 on, the execution-id is included in the goal header, so:

          [INFO] [dependency:analyze]

          now is:

          [INFO] [dependency:analyze

          {execution: default-cli}

          ]

          I attach a patch against revision 20361 with tests.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - I maybe found the error: from Maven 2.1 on, the execution-id is included in the goal header, so: [INFO] [dependency:analyze] now is: [INFO] [dependency:analyze {execution: default-cli} ] I attach a patch against revision 20361 with tests.
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          Created an attachment (id=862)
          Patch for Maven newer than 2.1 should work with older versions as well.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - Created an attachment (id=862) Patch for Maven newer than 2.1 should work with older versions as well.
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          Patch is attached so change status to patch.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - Patch is attached so change status to patch.
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          The excpetion is propably be thrown on every platform supported by maven, as long as the version of
          maven is >= 2.1

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - The excpetion is propably be thrown on every platform supported by maven, as long as the version of maven is >= 2.1
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          Supplied bitbucket-URL.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - Supplied bitbucket-URL.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : vsellier
          Path:
          trunk/hudson/plugins/dependency-analyzer/src/main/java/hudson/plugins/dependencyanalyzer/parser/BuildLogFileParser.java
          trunk/hudson/plugins/dependency-analyzer/src/test/java/hudson/plugins/dependencyanalyzer/parser/BuildLogFileParserTest.java
          trunk/hudson/plugins/dependency-analyzer/src/test/resources/log_build_with_dependency_analyze_with_execution_id
          trunk/hudson/plugins/dependency-analyzer/src/test/resources/log_build_with_empty_dependency_analyze_with_execution_id
          http://fisheye4.cenqua.com/changelog/hudson/?cs=21692
          Log:
          [FIXED JENKINS-4273] apply patch provided by mfriedenhagen

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : vsellier Path: trunk/hudson/plugins/dependency-analyzer/src/main/java/hudson/plugins/dependencyanalyzer/parser/BuildLogFileParser.java trunk/hudson/plugins/dependency-analyzer/src/test/java/hudson/plugins/dependencyanalyzer/parser/BuildLogFileParserTest.java trunk/hudson/plugins/dependency-analyzer/src/test/resources/log_build_with_dependency_analyze_with_execution_id trunk/hudson/plugins/dependency-analyzer/src/test/resources/log_build_with_empty_dependency_analyze_with_execution_id http://fisheye4.cenqua.com/changelog/hudson/?cs=21692 Log: [FIXED JENKINS-4273] apply patch provided by mfriedenhagen
          Hide
          mfriedenhagen Mirko Friedenhagen added a comment -

          Works.

          Show
          mfriedenhagen Mirko Friedenhagen added a comment - Works.
          Hide
          maimonoded Oded Maimon added a comment -

          Same issue with version 0.6 and Jenkins 1.451 with maven 3 project.

          WARNING: Caught exception evaluating: module.unusedDependenciesCount > 0 or module.undeclaredDependenciesCount > 0. Reason: java.lang.reflect.InvocationTargetException
          java.lang.reflect.InvocationTargetException
          at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125)
          at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314)
          ...
          ...
          ...

          Show
          maimonoded Oded Maimon added a comment - Same issue with version 0.6 and Jenkins 1.451 with maven 3 project. WARNING: Caught exception evaluating: module.unusedDependenciesCount > 0 or module.undeclaredDependenciesCount > 0. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.commons.jexl.util.PropertyExecutor.execute(PropertyExecutor.java:125) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:314) ... ... ...

            People

            • Assignee:
              vsellier vsellier
              Reporter:
              mfriedenhagen Mirko Friedenhagen
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: