2

I am trying to be able to step through the code of a Hudson plugin called SVNPublisher. I checked out the code for SVNPublisher, used Netbeans to open the project, and clicked "Debug Main project". This results in a Firefox window opening address http://localhost:8080 which shows the Hudson main page. Clicking the "New Job" link results in an error page:

HTTP ERROR: 500

jar:file:/home/francis/svn/svnpublisher/target/work/webapp/WEB-INF/lib/hudson-core-1.319.jar!/lib/hudson/newFromList/form.jelly:43:47: <j:forEach> hudson.scm.SubversionTagAction and hudson.scm.SubversionTagAction$DescriptorImpl disagree on InnerClasses attribute

RequestURI=/newJob
Caused by:

org.apache.commons.jelly.JellyTagException: jar:file:/home/francis/svn/svnpublisher/target/work/webapp/WEB-INF/lib/hudson-core-1.319.jar!/lib/hudson/newFromList/form.jelly:43:47:  hudson.scm.SubversionTagAction and hudson.scm.SubversionTagAction$DescriptorImpl disagree on InnerClasses attribute
    at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:713)
    at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:282)
    at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
    ...

I am very new to Hudson and not very experienced with Java so I'm pretty much clueless on the meaning of this error.

Can anyone help?

StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
  • What is the version of JRE you are using to debug your project? – VonC Apr 22 '10 at 10:26
  • Just saw http://weblogs.java.net/blog/fabriziogiudici/archive/2010/02/05/are-you-sure-you-know-everything-you-need-about-erasure (bottom of the page): could be interesting to *downgrade* the JRE version (early 1.6 or even late 1.5) just to see if that has any relevance to the issue at hand. – VonC Apr 22 '10 at 15:00
  • There's a similar report at the bug database of oracle (now only available from the google web cache): http://webcache.googleusercontent.com/search?q=cache:74iXiYcb6icJ:bugs.sun.com/bugdatabase/view_bug.do%3Fbug_id%3D7003595 – tangens Jan 31 '11 at 16:17

2 Answers2

7

I know this thread is v. old but I have just had this issues and wanted to help anyone else who has is.

I found I got this issue when I had a DescriptorImpl in a class (this is a sub-class of the main class). In my case this is ResourceAxis contains DescriptorImpl.

I started getting this issue when I renamed DescriptorImpl to ResourceDescriptorImpl. Then I started getting the following error message:

Error injecting constructor, java.lang.IncompatibleClassChangeError: org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis and org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis$DescriptorImpl disagree on InnerClasses attribute
at org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis$DescriptorImpl.<init>(ResourceAxis.java:94)

This propted me to change ResourceDescriptorImpl back to DescriptorImpl - as it was complaining about DiscriptorImpl. At that point I got this error message:

Error injecting constructor, java.lang.IncompatibleClassChangeError: org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis and org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis$ResourceDescriptorImpl disagree on InnerClasses attribute
at org.jenkinsci.plugins.matrix_resource_manager.ResourceAxis$ResourceDescriptorImpl.<init>(ResourceAxis.java:94)

This one is complaining about ResourceDescriptorImpl. I realised I was not doing a Clean build each time and that the old compiled code might be causing issues (as I only change one class, so the other may not be re-compiled). If you see this issue try doing a clean build and see if that solves your issue.

Hope this helps.

canuck_1987
  • 71
  • 1
  • 2
2

I'm running into the same issue and unfortunately I haven't been able to resolve it yet either. As VonC mentioned it may have to do with a change in how generics are used between 1.5 and 1.6, this is problemaitc since even if you install a 1.5 version hudson requires 1.6 to build and run via hpi:run.

What I have noticed is that if you install hudson locally (http://wiki.hudson-ci.org/display/HUDSON/Meet+Hudson#MeetHudson-TestDrive) you can use a maven install command to generate an .hpi file of the plugin and install that. I don't get the same error when I do that which makes me think it could be an issue with the hpi:run goal. That should at least let you test any changes you need to make.

Coincidentally I'm the author of that SVN Publish plugin if there are any questions you have. I haven't made any changes recently, but I found this thread because I have some in the works and ran into this issue ;)

Thanks, Brent

Statuswoe
  • 71
  • 3
  • Also, as a note I tried this with a couple other plugins and got the same result, which leads me to think it's a more general issue. – Statuswoe May 31 '10 at 19:42
  • Thanks for your reply. It turned out the problem only occurs when using Netbeans' embedded Hudson server. On the actual buildservers it worked fine. – StackedCrooked May 31 '10 at 21:28