jenkins 1.506 m2release plugin issue JSONNull cannot be cast to JSONObject

231 views
Skip to first unread message

Tomek Kaczanowski

unread,
Mar 18, 2013, 12:30:28 PM3/18/13
to jenkins...@googlegroups.com

after upgrading to 1.506 when trying to do a maven release via https://wiki.jenkins-ci.org/display/JENKINS/M2+Release+Plugin ver 0.9.1 I get this:


Status Code: 500

Exception: java.lang.ClassCastException: net.sf.json.JSONNull cannot be cast to net.sf.json.JSONObject
Stacktrace:
javax.servlet.ServletException: java.lang.ClassCastException: net.sf.json.JSONNull cannot be cast to net.sf.json.JSONObject
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:719)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
	at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:384)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
	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:677)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:770)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:583)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:214)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
	at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
	at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
	at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
	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 winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
	at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
	at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
	at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227)
	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassCastException: net.sf.json.JSONNull cannot be cast to net.sf.json.JSONObject
	at org.jvnet.hudson.plugins.m2release.M2ReleaseAction.doSubmit(M2ReleaseAction.java:239)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:677)
	... 42 more

any hints on how to solve this issue?

--
Regards,
Tomek Kaczanowski

teilo

unread,
Mar 18, 2013, 12:52:00 PM3/18/13
to jenkins...@googlegroups.com
the simplest quick fix is to downgrade Jenkins...

What version did you upgrade from - and what options/parameters are you using?

/James

Tomek Kaczanowski

unread,
Mar 18, 2013, 2:44:18 PM3/18/13
to Jenkins Users
Hi James,

thanks for the quick response!

> the simplest quick fix is to downgrade Jenkins...
yeah, sure it is

> What version did you upgrade from - and what options/parameters are you
> using?
1.496

what options/parameters you are asking about?

--
Regards,
Tomek Kaczanowski

teilo

unread,
Mar 19, 2013, 6:57:28 AM3/19/13
to jenkins...@googlegroups.com


On Monday, 18 March 2013 18:44:18 UTC, Tomek Kaczanowski wrote:
Hi James,

thanks for the quick response!

> the simplest quick fix is to downgrade Jenkins...
yeah, sure it is

> What version did you upgrade from - and what options/parameters are you
> using?
1.496
 
what options/parameters you are asking about? 

When you release there are options for the username/password, comment prefix, tag, nexus pro support..

There was a similar defect raised when the plugin was run in Hudson 2.2 - and I think Jenkins recently updated it's json library...  So the problem may be how to get this to work in a backwards compatible way.
In the interim there is a pull request that will fix this (not tested on older releases yet) so you may be able to grab that, build locally and use it to unblock you whilst I look at if anything else is needed.  https://github.com/jenkinsci/m2release-plugin/pull/9


Tomek Kaczanowski

unread,
Mar 20, 2013, 3:01:19 AM3/20/13
to jenkins...@googlegroups.com
thank you, this is exactly what I did based on the description from https://issues.jenkins-ci.org/browse/JENKINS-13465

Jeff

unread,
Mar 20, 2013, 11:00:28 AM3/20/13
to jenkins...@googlegroups.com
I hit that also and applied the patched m2 release plugin .HPI file attached to that defect.

I use GIT + SSH and when I do a release, I have NO options checked when I do the release.


On Wed, Mar 20, 2013 at 1:01 AM, Tomek Kaczanowski <kaczanow...@gmail.com> wrote:
thank you, this is exactly what I did based on the description from https://issues.jenkins-ci.org/browse/JENKINS-13465

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



--
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent
I ♥ DropBox !! 
Reply all
Reply to author
Forward
0 new messages