[JIRA] (JENKINS-57844) NullPointerException in NodeJSBuildWrapper.java:166

2019-06-04 Thread soundcrac...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Estermann commented on  JENKINS-57844  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: NullPointerException in NodeJSBuildWrapper.java:166   
 

  
 
 
 
 

 
 Created PR https://github.com/jenkinsci/nodejs-plugin/pull/26  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199802.155965939.21197.1559665320135%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-57844) NullPointerException in NodeJSBuildWrapper.java:166

2019-06-04 Thread soundcrac...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Estermann edited a comment on  JENKINS-57844  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: NullPointerException in NodeJSBuildWrapper.java:166   
 

  
 
 
 
 

 
 What I've learned from the [documentation|https://wiki.jenkins.io/display/JENKINS/Hint+on+retaining+backward+compatibility] is that you need `readResolve()` method, when introducing a new field  to retain backward compatibility .  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199802.155965939.21145.1559661484921%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-57844) NullPointerException in NodeJSBuildWrapper.java:166

2019-06-04 Thread soundcrac...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Estermann commented on  JENKINS-57844  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: NullPointerException in NodeJSBuildWrapper.java:166   
 

  
 
 
 
 

 
 What I've learned from the documentation is that you need `readResolve()` method, when introducing a new field.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-issues/JIRA.199802.155965939.21142.1559661484838%40Atlassian.JIRA.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-57844) NullPointerException in NodeJSBuildWrapper.java:166

2019-06-04 Thread soundcrac...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Estermann updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-57844  
 
 
  NullPointerException in NodeJSBuildWrapper.java:166   
 

  
 
 
 
 

 
Change By: 
 Daniel Estermann  
 

  
 
 
 
 

 
 After update of nodejs-plugin from 1.2.9 to 1.3.0 the jobs, which use it, started to fail with the following stacktrace: {noformat}java.lang.NullPointerException  at jenkins.plugins.nodejs.NodeJSBuildWrapper.setUp(NodeJSBuildWrapper.java:166)  at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:146)  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:667)  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)  at hudson.model.Run.execute(Run.java:1818)  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)  at hudson.model.ResourceController.execute(ResourceController.java:97)  at hudson.model.Executor.run(Executor.java:429){noformat}After some research and debugging I figured out the root of this issue. The plugin introduced cache locator strategy in commit [32039bd|https://github.com/jenkinsci/nodejs-plugin/commit/32039bdd59a30361ca420c5e3e8c909d073060d3]. It also guarantees that cache locator strategy cannot be null both after calling the [constructor|https://github.com/jenkinsci/nodejs-plugin/blob/master/src/main/java/jenkins/plugins/nodejs/NodeJSBuildWrapper.java#L102] and calling the appropriate [setter method|https://github.com/jenkinsci/nodejs-plugin/blob/master/src/main/java/jenkins/plugins/nodejs/NodeJSBuildWrapper.java#L133]. But that applies only if we create a new job or change the configuration for nodejs for an existing job, using nodejs-plugin 1.3.0. The config.xml of the job looks like that then: {noformat}  NodeJS_9_latest  {noformat}But if you have an existing job, which was created before nodejs-plugin 1.3.0, it is missing the configuration for cache locator strategy. Here is an example config.xml: {noformat}  NodeJS_9_latest{noformat}And apparently the instance of NodeJSBuildWrapper isn't built via constructor but  probably  via  some reflection magic (unfortunately I cannot explain how exactly)  straight object deserialization and the field is missing .Anway the fact is: all my nodejs jobs became broken after that update. Would it be possible to have a global fix for that?    
 

  
 
 
 
 

 
 
 

 
 
  

[JIRA] (JENKINS-57844) NullPointerException in NodeJSBuildWrapper.java:166

2019-06-04 Thread soundcrac...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Daniel Estermann created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-57844  
 
 
  NullPointerException in NodeJSBuildWrapper.java:166   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Nikolas Falco  
 
 
Components: 
 nodejs-plugin  
 
 
Created: 
 2019-06-04 14:43  
 
 
Environment: 
 nodejs-plugin 1.3.0  
 
 
Priority: 
  Major  
 
 
Reporter: 
 Daniel Estermann  
 

  
 
 
 
 

 
 After update of nodejs-plugin from 1.2.9 to 1.3.0 the jobs, which use it, started to fail with the following stacktrace:   

 
java.lang.NullPointerException
  at jenkins.plugins.nodejs.NodeJSBuildWrapper.setUp(NodeJSBuildWrapper.java:166)
  at jenkins.tasks.SimpleBuildWrapper.setUp(SimpleBuildWrapper.java:146)
  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:667)
  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
  at hudson.model.Run.execute(Run.java:1818)
  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
  at hudson.model.ResourceController.execute(ResourceController.java:97)
  at hudson.model.Executor.run(Executor.java:429) 

 After some research and debugging I figured out the root of this issue. The plugin introduced cache locator strategy in commit 32039bd. It also guarantees that cache locator strategy cannot be null both after calling the constructor and calling the appropriate setter method. But that applies only if we create a new job or change the configuration for nodejs for an existing job, using nodejs-plugin 1.3.0. The config.xml of the job looks like that then: