Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

groovy.lang.MissingMethodException: No signature of method: Codenarc.ruleset() #10

Closed
rvargas opened this issue Sep 26, 2016 · 4 comments

Comments

@rvargas
Copy link

rvargas commented Sep 26, 2016

I get this error in Grails 2.5.5 using Codenarc 0.25.2:

groovy.lang.MissingMethodException: No signature of method: Codenarc.ruleset() is applicable for argument types: (Codenarc$_run_closure1) values: [Codenarc$_run_closure1@739fa02f]
Possible solutions: sleep(long), use([Ljava.lang.Object;)
Error |
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
Error |
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:81)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
Error |
at Codenarc.run(Codenarc.groovy:1)
Error |
at Codenarc$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
Error |
at gant.Gant.prepareTargets(Gant.groovy:607)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeWithGantInstance(GrailsScriptRunner.java:775)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptFile(GrailsScriptRunner.java:571)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:470)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:421)
Error |
at org.grails.ide.api.impl.GrailsConnectorImpl.executeCommand(GrailsConnectorImpl.java:160)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.run(GrailsProcess.java:130)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.main(GrailsProcess.java:93)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)

Any help?

@chrismair
Copy link
Owner

I was not able to reproduce this error. I did a fresh install of Grails 2.5.5 on my Ubuntu system with Java 1.8. Then I ran into this problem (module not found: org.codehaus.groovy#groovy-all;2.4.4):
grails/grails-core#10011
So I installed Grails 2.5.4 first. I setup a very simple sample Grails app and added the CodeNarc plugin, and created some code with violations. Then I ran grails codenarc. That worked. Then I switched to Grails 2.5.5, and created a sample app with violations and ran grails codenarc. That worked, too.

Your stacktrace looks like some kind of Grails classpath/dependency issue. Are you able to try with different a Grails version?

@rvargas
Copy link
Author

rvargas commented Oct 8, 2016

I think I found my error, I called my ruleset file Codenarc.groovy. Or this can't be related?

@chrismair
Copy link
Owner

I'm not sure, but that could very well match up with that error stacktrace. I suggest renaming your ruleset something else.

@rvargas
Copy link
Author

rvargas commented Oct 8, 2016

Thanks! I'll close this issue.

@rvargas rvargas closed this as completed Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants