[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-06 Thread imakow...@gmail.com (JIRA)














































Ireneusz Makowski
 commented on  JENKINS-16499


NPE when new job by copy from existing one















when it will be available in latest release?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-05 Thread aherit...@apache.org (JIRA)














































Arnaud Héritier
 commented on  JENKINS-16499


NPE when new job by copy from existing one















@vlad here : https://ci.jenkins-ci.org/job/jenkins_main_trunk/2238/



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread nickithew...@gmail.com (JIRA)














































nickithewatt
 updated  JENKINS-16499


NPE when new job by copy from existing one
















Change By:


nickithewatt
(02/Feb/13 8:41 AM)




Priority:


Major
Critical



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread nickithew...@gmail.com (JIRA)














































nickithewatt
 commented on  JENKINS-16499


NPE when new job by copy from existing one















I confirm that this appears to be a problem regardless of which plugins are installed. The core needs fixing.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread ku...@gmx.de (JIRA)















































kutzi
 assigned  JENKINS-16499 to kutzi



NPE when new job by copy from existing one
















Change By:


kutzi
(02/Feb/13 9:18 AM)




Assignee:


kutzi



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread ku...@gmx.de (JIRA)














































kutzi
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Using the steps mentioned in the 1st comment results in a different stack trace, but still a NPE:


javax.servlet.ServletException: java.lang.NullPointerException
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:615)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:487)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:164)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1367)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1338)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:499)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:350)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
	at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:620)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:1021)
	at hudson.maven.AbstractMavenProject.createTransientActions(AbstractMavenProject.java:184)
	at hudson.maven.MavenModuleSet.createTransientActions(MavenModuleSet.java:448)
	at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:688)
	at 

[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread ku...@gmx.de (JIRA)















































kutzi
 assigned  JENKINS-16499 to Kohsuke Kawaguchi



NPE when new job by copy from existing one
















AbstractProject#onLoad calls super#onLoad which in turn calls AbstractProject#save which (in the maven case) tries to access the not-yet-initialized 'builds' RunMap.
This pattern of doing stuff on incompletely initialized objects is IMO highly fragile and bound to create all sort of problems.
However, I've got no clue how to fix that now, so assigning to Kohsuke.





Change By:


kutzi
(02/Feb/13 10:07 AM)




Assignee:


kutzi
KohsukeKawaguchi



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Code changed in jenkins
User: Christoph Kutzinski
Path:
 test/src/test/java/hudson/maven/MavenProjectTest.java
http://jenkins-ci.org/commit/jenkins/7d422e60d9b3b2c678e6baf066e0780a29b027aa
Log:
  Added testcase for JENKINS-16499



 
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread dogf...@java.net (JIRA)














































dogfood
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Integrated in  jenkins_main_trunk #2237
 Added testcase for JENKINS-16499 (Revision 7d422e60d9b3b2c678e6baf066e0780a29b027aa)

 Result = UNSTABLE
Christoph Kutzinski : 7d422e60d9b3b2c678e6baf066e0780a29b027aa
Files : 

	test/src/test/java/hudson/maven/MavenProjectTest.java





























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Code changed in jenkins
User: Christoph Kutzinski
Path:
 core/src/main/java/hudson/model/Job.java
http://jenkins-ci.org/commit/jenkins/12efbc3a9bbcd613dc1e4391283b6839cc79990a
Log:
  FIXED JENKINS-16499 Assuming that:

	save() is not strictly necessary here. config.xml might be saved later or not - doesn't really matter
	this else branch should only be entered when migrating from very old Hudson instances































This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread scm_issue_l...@java.net (JIRA)















































SCM/JIRA link daemon
 resolved  JENKINS-16499 as Fixed


NPE when new job by copy from existing one
















Change By:


SCM/JIRA link daemon
(02/Feb/13 5:29 PM)




Status:


Open
Resolved





Resolution:


Fixed



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Code changed in jenkins
User: Christoph Kutzinski
Path:
 changelog.html
 test/src/test/java/hudson/maven/MavenProjectTest.java
http://jenkins-ci.org/commit/jenkins/432c63d9851cadb7e93a110a9a22716b0e033d87
Log:
  Changelog and fixed test for JENKINS-16499


Compare: https://github.com/jenkinsci/jenkins/compare/7d422e60d9b3...432c63d9851c

 
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread ku...@gmx.de (JIRA)














































kutzi
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Found now a simple fix for it.
However Kohsuke might still have a look on it, as I'm not 101% sure that this won't cause any regression.
Also you might want to find out, why this else-branch in Job#onLoad is entered after all. According to the comment that should only happen when migrating old instances. However, it looks like the nextBuildNumber file is not created directly after creating a job. Maybe that should be fixed as the root cause.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-02-02 Thread dogf...@java.net (JIRA)














































dogfood
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Integrated in  jenkins_main_trunk #2238
 FIXED JENKINS-16499 Assuming that: (Revision 12efbc3a9bbcd613dc1e4391283b6839cc79990a)
Changelog and fixed test for JENKINS-16499 (Revision 432c63d9851cadb7e93a110a9a22716b0e033d87)

 Result = SUCCESS
Christoph Kutzinski : 12efbc3a9bbcd613dc1e4391283b6839cc79990a
Files : 

	core/src/main/java/hudson/model/Job.java



Christoph Kutzinski : 432c63d9851cadb7e93a110a9a22716b0e033d87
Files : 

	test/src/test/java/hudson/maven/MavenProjectTest.java
	changelog.html





























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-31 Thread sp...@helten.dk (JIRA)














































David Langeland
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Hi Kathi,

Do you know when you will release version 2.2 of JobConfigHistory? Based in https://wiki.jenkins-ci.org/display/JENKINS/JobConfigHistory+Plugin it seems like it should already be released?

Thanks!



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-31 Thread kathi.st...@1und1.de (JIRA)














































Kathi Stutz
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Hi David,
Version 2.2 was released yesterday. The plugin information on the Jenkins wiki page always takes a while until it is up-to-date, but the new version should also appear in the update centre of your Jenkins instance.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-31 Thread sp...@helten.dk (JIRA)














































David Langeland
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Strange I have checked several times, but it just appeared now.  Thanks a lot 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-31 Thread tangthe...@gmail.com (JIRA)














































Pei-Tang Huang
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Shouldn't it be resolved in the Jenkins core?
Thus problem occurs in a clean Jenkins installation, which without JobConfigHistory installed, too. See first comment to reproduce this problem easily.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-31 Thread kathi.st...@1und1.de (JIRA)














































Kathi Stutz
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Yes, it still has to be resolved in the core. 
But if you have the JobConfigHistory plugin installed, the NPE appears not only when trying to copy a maven project but also with freestyle projects, the latter being the fault of our plugin. So, our latest release just tries to improve the situation by at least solving the problems that are caused by JobConfigHistory.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-30 Thread scm_issue_l...@java.net (JIRA)














































SCM/JIRA link daemon
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Code changed in jenkins
User: kstutz
Path:
 src/main/java/hudson/plugins/jobConfigHistory/JobConfigHistoryActionFactory.java
 src/test/java/hudson/plugins/jobConfigHistory/JobConfigHistoryJobListenerTest.java
http://jenkins-ci.org/commit/jobConfigHistory-plugin/5739007a07ce8f1f3ef111652450f7af045bc686
Log:
  Workaround for JENKINS-16499



 
You received this message because you are subscribed to the Google Groups "Jenkins Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-commits+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-30 Thread kathi.st...@1und1.de (JIRA)














































Kathi Stutz
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Using Yordan's code, I released a workaround for the JobConfigHistory plugin today. It catches the NPE, which is still thrown by the core.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-29 Thread sp...@helten.dk (JIRA)














































David Langeland
 commented on  JENKINS-16499


NPE when new job by copy from existing one















I can confirm this.

We have a lot of complicated and quite similar jobs, so we always create new jobs based on old jobs making this issue critical to us. Please let me know if anybody finds a temporary workaround.

Thanks!



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-29 Thread iordan.b...@gmail.com (JIRA)














































Yordan Boev
 commented on  JENKINS-16499


NPE when new job by copy from existing one















The exception is a result of AbstractProject.getActions() calling the java.unil.Vector.addAll() method with a null parameter.
The NPE comes from a method implemented in the jenkins Core:

public synchronized ListAction getActions() {
// add all the transient actions, too
ListAction actions = new VectorAction(super.getActions());
 NPE = actions.addAll(transientActions); 
// return the read only list to cause a failure on plugins who try to add an action here
return Collections.unmodifiableList(actions);
}
maybe there should be a check if transientActions are not null.

The problem also exists in other plugins using the Abstractproject.getActions() method in their ActionFactory classes, for example JobConfighistory and JSWidgets.
We could catch the exception and treat it as if there were no actions for the current project (see code below). That would solve the problem, but maybe it would be better if the method getAction() in AbstractProject is changed to return null or and empty list if there are no actions for a certain project.

Workaround:
Old code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(with NPE)

public Collection? extends Action createFor(@SuppressWarnings("unchecked") AbstractProject target) {
final ArrayListAction actions = new ArrayListAction();
final ListJobConfigHistoryProjectAction historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
LOG.fine(target + " already had " + historyJobActions);
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
LOG.fine(this + " adds " + newAction + " for " + target);
return actions;
}

New code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(catching the NPE)
public Collection? extends Action createFor(@SuppressWarnings("rawtypes") AbstractProject target) {
ListJobConfigHistoryProjectAction historyJobActions;
try {
historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
} catch (NullPointerException e) {
historyJobActions = null;
}

if (historyJobActions != null  !historyJobActions.isEmpty()) {
return historyJobActions;
}
final ArrayListAction actions = new ArrayListAction();
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
return actions;
}



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-29 Thread iordan.b...@gmail.com (JIRA)












































 
Yordan Boev
 edited a comment on  JENKINS-16499


NPE when new job by copy from existing one
















The exception is a result of AbstractProject.getActions() calling the java.unil.Vector.addAll() method with a null parameter.
The NPE comes from a method implemented in the jenkins Core:

public synchronized ListAction getActions() {
// add all the transient actions, too
ListAction actions = new VectorAction(super.getActions());
 NPE = actions.addAll(transientActions); 
// return the read only list to cause a failure on plugins who try to add an action here
return Collections.unmodifiableList(actions);
}

maybe there should be a check if transientActions are not null.

The problem also exists in other plugins using the Abstractproject.getActions() method in their ActionFactory classes, for example JobConfighistory and JSWidgets.
We could catch the exception and treat it as if there were no actions for the current project (see code below). That would solve the problem, but maybe it would be better if the method getAction() in AbstractProject is changed to return null or and empty list if there are no actions for a certain project.

Workaround:
Old code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(with NPE)

public Collection? extends Action createFor(@SuppressWarnings("unchecked") AbstractProject target) {
final ArrayListAction actions = new ArrayListAction();
final ListJobConfigHistoryProjectAction historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
LOG.fine(target + " already had " + historyJobActions);
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
LOG.fine(this + " adds " + newAction + " for " + target);
return actions;
}

New code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(catching the NPE)
public Collection? extends Action createFor(@SuppressWarnings("rawtypes") AbstractProject target) {
ListJobConfigHistoryProjectAction historyJobActions;
try {
historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
} catch (NullPointerException e) {
historyJobActions = null;
}

if (historyJobActions != null  !historyJobActions.isEmpty()) {
return historyJobActions;
}
final ArrayListAction actions = new ArrayListAction();
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
return actions;
}



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-29 Thread iordan.b...@gmail.com (JIRA)












































 
Yordan Boev
 edited a comment on  JENKINS-16499


NPE when new job by copy from existing one
















The exception is a result of AbstractProject.getActions() calling the java.unil.Vector.addAll() method with a null parameter.
The NPE comes from a method implemented in the jenkins Core:

public synchronized ListAction getActions() {
// add all the transient actions, too
ListAction actions = new VectorAction(super.getActions());
 NPE = actions.addAll(transientActions); 
// return the read only list to cause a failure on plugins who try to add an action here
return Collections.unmodifiableList(actions);
}

maybe there should be a check if transientActions are not null.

The problem also exists in other plugins using the Abstractproject.getActions() method in their ActionFactory classes, for example JobConfighistory and JSWidgets.
We could catch the exception and treat it as if there were no actions for the current project (see code below). That would solve the problem, but maybe it would be better if the method getAction() in AbstractProject is changed to return null or and empty list if there are no actions for a certain project.

Workaround:
Old code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(with NPE)

public Collection? extends Action createFor(@SuppressWarnings("unchecked") AbstractProject target) {
final ArrayListAction actions = new ArrayListAction();
final ListJobConfigHistoryProjectAction historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
LOG.fine(target + " already had " + historyJobActions);
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
LOG.fine(this + " adds " + newAction + " for " + target);
return actions;
}

New code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(catching the NPE)

public Collection? extends Action createFor(@SuppressWarnings("rawtypes") AbstractProject target) {
ListJobConfigHistoryProjectAction historyJobActions;
try {
historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
} catch (NullPointerException e) {
historyJobActions = null;
}

if (historyJobActions != null  !historyJobActions.isEmpty()) {
return historyJobActions;
}
final ArrayListAction actions = new ArrayListAction();
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
return actions;
}




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-29 Thread iordan.b...@gmail.com (JIRA)












































 
Yordan Boev
 edited a comment on  JENKINS-16499


NPE when new job by copy from existing one
















The NPE is a result of AbstractProject.getActions() calling the java.unil.Vector.addAll() method with a null parameter.
It comes from a method implemented in the Jenkins Core:

public synchronized ListAction getActions() {
// add all the transient actions, too
ListAction actions = new VectorAction(super.getActions());
 NPE = actions.addAll(transientActions); 
// return the read only list to cause a failure on plugins who try to add an action here
return Collections.unmodifiableList(actions);
}

maybe there should be a check if transientActions is not null.

The problem also exists in other plugins using the Abstractproject.getActions() method in their ActionFactory classes, for example JobConfighistory and JSWidgets.
We could catch the exception and treat it as if there were no actions for the current project (see code below). That would solve the problem, but maybe it would be better if the method getAction() in AbstractProject is changed to return null or and empty list if there are no actions for a certain project.

Workaround:
Old code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(with NPE)

public Collection? extends Action createFor(@SuppressWarnings("unchecked") AbstractProject target) {
final ArrayListAction actions = new ArrayListAction();
final ListJobConfigHistoryProjectAction historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
LOG.fine(target + " already had " + historyJobActions);
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
LOG.fine(this + " adds " + newAction + " for " + target);
return actions;
}

New code of JobConfigHistoryActionFactory.createFor(AbstractProject project)(catching the NPE)

public Collection? extends Action createFor(@SuppressWarnings("rawtypes") AbstractProject target) {
ListJobConfigHistoryProjectAction historyJobActions;
try {
historyJobActions = target.getActions(JobConfigHistoryProjectAction.class);
} catch (NullPointerException e) {
historyJobActions = null;
}

if (historyJobActions != null  !historyJobActions.isEmpty()) {
return historyJobActions;
}
final ArrayListAction actions = new ArrayListAction();
final JobConfigHistoryProjectAction newAction = new JobConfigHistoryProjectAction(target);
actions.add(newAction);
return actions;
}




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-28 Thread stefan.brau...@1und1.de (JIRA)














































Stefan Brausch
 commented on  JENKINS-16499


NPE when new job by copy from existing one















Which version of the jobconfighistory plugin do you use in your jenkins?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-28 Thread kuypers.d...@googlemail.com (JIRA)














































Dirk Kuypers
 commented on  JENKINS-16499


NPE when new job by copy from existing one















I have the same issue since upgrading to 1.500 and I am using version 2.1.1 of the jobconfighistory plugin.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-28 Thread tangthe...@gmail.com (JIRA)














































Pei-Tang Huang
 commented on  JENKINS-16499


NPE when new job by copy from existing one















@stefanbrausch: I think the version of JobConfigHistory is irrelevant. You can try the steps in the first comment to test if you can reproduce this problem without any plugins installed.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group, send email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-27 Thread tangthe...@gmail.com (JIRA)














































Pei-Tang Huang
 updated  JENKINS-16499


NPE when new job by copy from existing one
















Change By:


Pei-Tang Huang
(28/Jan/13 3:34 AM)




Summary:


NPE
when
newjobbycopy
from
existing
job
one



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




[JIRA] (JENKINS-16499) NPE when new job by copy from existing one

2013-01-27 Thread tangthe...@gmail.com (JIRA)














































Pei-Tang Huang
 commented on  JENKINS-16499


NPE when new job by copy from existing one















This problem happens on a clean 1.500 install too, steps to produce:

	Start the clean Jenkins installation
	New maven project, named "test", OK and then OK
	New job named "npe", select copy existing Job from "test"





























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.