java.lang.NullPointerException

Jenkins JIRA | Bert Geens | 3 years ago
  1. 0

    {code} Jan 21, 2014 4:55:55 PM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: it.getVersion(job) in /view/WIP/. Reason: java.lang.NullPointerException java.lang.NullPointerException at jenkins.plugins.maveninfo.columns.LastVersionColumn.getModulePattern(LastVersionColumn.java:101) at jenkins.plugins.maveninfo.columns.LastVersionColumn.getVersion(LastVersionColumn.java:113) at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) 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.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) {code} The exception seems to be caused by the fact that the Jenkins Job name is different from the actual POM's artifactId and it tries to use the former to get the version of the latter. Attached patch fixes the issue for me but I'm unsure if this is the correct way to go about it. It does seem to fix the issue for us though for both single and multi-module Maven projects. If this is the/a correct fix I can send a pull request if you prefer.

    Jenkins JIRA | 3 years ago | Bert Geens
    java.lang.NullPointerException
  2. 0

    {code} Jan 21, 2014 4:55:55 PM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: it.getVersion(job) in /view/WIP/. Reason: java.lang.NullPointerException java.lang.NullPointerException at jenkins.plugins.maveninfo.columns.LastVersionColumn.getModulePattern(LastVersionColumn.java:101) at jenkins.plugins.maveninfo.columns.LastVersionColumn.getVersion(LastVersionColumn.java:113) at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) 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.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81) at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) {code} The exception seems to be caused by the fact that the Jenkins Job name is different from the actual POM's artifactId and it tries to use the former to get the version of the latter. Attached patch fixes the issue for me but I'm unsure if this is the correct way to go about it. It does seem to fix the issue for us though for both single and multi-module Maven projects. If this is the/a correct fix I can send a pull request if you prefer.

    Jenkins JIRA | 3 years ago | Bert Geens
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at jenkins.plugins.maveninfo.columns.LastVersionColumn.getModulePattern()
    2. jenkins.plugins.maveninfo
      LastVersionColumn.getVersion
      1. jenkins.plugins.maveninfo.columns.LastVersionColumn.getModulePattern(LastVersionColumn.java:101)
      2. jenkins.plugins.maveninfo.columns.LastVersionColumn.getVersion(LastVersionColumn.java:113)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. Commons JEXL
      ExpressionImpl.evaluate
      1. org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
      2. org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
      3. org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
      4. org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
      5. org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
      6. org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
      6 frames
    5. Hudson
      ExpressionFactory2$JexlExpression.evaluate
      1. hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:74)
      1 frame
    6. Stapler Jelly
      CallTagLibScript.run
      1. org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:58)
      1 frame
    7. commons-jelly
      ScriptBlock.run
      1. org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      1 frame
    8. Stapler Jelly
      ReallyStaticTagLibrary$1.run
      1. org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
      1 frame
    9. commons-jelly
      CoreTagLibrary$2.run
      1. org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
      1 frame
    10. Stapler Jelly
      IncludeTag.doTag
      1. org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
      2. org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:147)
      2 frames
    11. commons-jelly
      ScriptBlock.run
      1. org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      2. org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
      3. org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
      4. org.apache.commons.jelly.impl.TagScript.run(TagScript.java:269)
      5. org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
      5 frames