Hudson plugin, Java error "... disagree on InnerClasses attribute"
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?
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.
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
精彩评论