I am getting the "java.lang.RuntimeException: Reloading agent exited via exception" error while running grails app. Previously it was working fine. Suddenly I am getting this error. And I am not able to run application.
Full stacktrace as follows
|Loading Grails 2.4.0
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
..
|Compiling 10 source files
Error |
java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
Error |
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:104)
Error |
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
Error |
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
Error |
at java.lang.ClassLoader.defineClass1(Native Method)
Error |
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
Error |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
Error |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
Error |
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
Error |
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Error |
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Error |
at java.security.AccessController.doPrivileged(Native Method)
Error |
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:523)
Error |
at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:183)
Error |
at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:168)
Error |
at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:124)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:617)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:269)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolveFromModule(ResolveVisitor.java:551)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:269)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:237)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:221)
Error |
at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:233)
Error |
at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:988)
Error |
at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:647)
Error |
at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:956)
Error |
at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:641)
Error |
at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:139)
Error |
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
Error |
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
Error |
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:163)
Error |
at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1259)
Error |
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
Solved!!!
Delete grails installation folder (GRAILS_HOME), and recreate.
Related
I have encountered with runtime error:
java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira.
Stacktrace as follow:
"C:\Program Files (x86)\Java\jdk1.7.0\bin\java" -Dgrails.home=D:\ranjit\grails-2.4.2\grails-2.4.2 "-Dbase.dir=E:\projects\Nepal Rastriya Bank\nrb 03 29" "-Dtools.jar=C:\Program Files (x86)\Java\jdk1.7.0\lib\tools.jar" -Dgroovy.starter.conf=D:\ranjit\grails-2.4.2\grails-2.4.2/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -Djline.WindowsTerminal.directConsole=false -javaagent:D:\ranjit\grails-2.4.2\grails-2.4.2\lib\org.springframework\springloaded\jars\springloaded-1.2.0.RELEASE.jar -noverify -Dspringloaded=profile=grails -Didea.launcher.port=7533 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\bin" -Dfile.encoding=UTF-8 -classpath "D:\ranjit\grails-2.4.2\grails-2.4.2\lib\org.codehaus.groovy\groovy-all\jars\groovy-all-2.3.3.jar;D:\ranjit\grails-2.4.2\grails-2.4.2\dist\grails-bootstrap-2.4.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf D:\ranjit\grails-2.4.2\grails-2.4.2/conf/groovy-starter.conf "run-app -plain-output"
|Loading Grails 2.4.2
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
.................................................
|Running Grails application
Error |
java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
Error |
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPrePr ocessorAgentAdapter.java:104)
Error |
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
Error |
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
Error |
at java.lang.ClassLoader.defineClass1(Native Method)
Error |
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
Error |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
Error |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
Error |
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
Error |
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
Error |
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Error |
at java.security.AccessController.doPrivileged(Native Method)
Error |
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
Error |
at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
Error |
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:753)
Error |
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.<init>(DefaultGrailsApplication.java:121)
Error |
at org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean.afterPropertiesSet(GrailsApplicationFactoryBean.java:99)
Error |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
Error |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
Error |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
Error |
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
Error |
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
Error |
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
Error |
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
Error |
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
Error |
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
Error |
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
Error |
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
Error |
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
Error |
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
Error |
at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:71)
Error |
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
Error |
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
Error |
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
Error |
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
Error |
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
Error |
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
Error |
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
Error |
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
Error |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
Error |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
Error |
at java.lang.Thread.run(Thread.java:722)
Error |
Caused by: java.lang.RuntimeException: Method code too large!
Error |
at sl.org.objectweb.asm.MethodWriter.a(Unknown Source)
Error |
at sl.org.objectweb.asm.ClassWriter.toByteArray(Unknown Source)
Error |
at org.springsource.loaded.ReloadableType$MergedRewrite$ChainedAdapters.getBytes(ReloadableType.java:872)
Error |
at org.springsource.loaded.ReloadableType$MergedRewrite.rewrite(ReloadableType.java:852)
Error |
at org.springsource.loaded.ReloadableType.rewriteCallSitesAndDefine(ReloadableType.java:825)
Error |
at org.springsource.loaded.ReloadableType.<init>(ReloadableType.java:155)
Error |
at org.springsource.loaded.TypeRegistry.addType(TypeRegistry.java:926)
Error |
at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:298)
Error |
at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
Error |
... 46 more
Configuring Spring Security Core ...
... finished configuring Spring Security Core
Configuring Spring Security UI ...
... finished configuring Spring Security UI
abc
|Server running. Browse to http://localhost:8080/xyz
I have already tried options like clean or clean-all or deleting /target or cloning a fresh project from repo, but none of these options were helpful to solve the problem.
I also tried this question, but that also did not help.
Hi i am new to Groovy/Grails and i recently installed Groovy/Grails suite 3.6.4 on windows 7. I made my JAVA_HOME and GRAIL_HOME and when i tried to run a Grails application i get the following errors.
Error
|
java.io.FileNotFoundException: C:\Users\οΏ½οΏ½οΏ½\Documents\workspace-ggts-3.6.4.RELEASE\.metadata\.plugins\org.grails.ide.eclipse.core\as-dependencies.txt (The system cannot find the path specified)
Error |
at java.io.FileOutputStream.open0(Native Method)
Error |
at java.io.FileOutputStream.open(FileOutputStream.java:270)
Error |
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
Error |
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
Error |
at org.grails.ide.eclipse.runtime.shared.DependencyFileFormat$DepWriter.<init>(DependencyFileFormat.java:55)
Error |
at org.grails.ide.eclipse.runtime.shared.DependencyFileFormat.write(DependencyFileFormat.java:106)
Error |
at org.grails.ide.eclipse.runtime.GrailsBuildSettingsDependencyExtractor.writeDependencyFile(GrailsBuildSettingsDependencyExtractor.java:206)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.writeDependencyFile(GrailsProcess.java:200)
Error |
at org.grails.ide.eclipse.longrunning.process.GrailsProcess.run(GrailsProcess.java:133)
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:62)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:498)
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)
I have a method in my controller that is being called from somewhere. As far as I can tell, nothing in my code is calling it, so I added a stack trace output line to see if i can tell where it's getting called from. With this, here is what the method looks like:
def remediationSearch() {
println " "; println ">>>>>> remediationSearch() start at " + System.nanoTime()
new Exception("why are you calling me?!?!").printStackTrace()
def resultList
if (params.rerender) {
println "<><><> remediationsearch() called with rerender."
resultList = recordSearchService.individualSearch(session.oldIndRemedParams)
}
else {
params.selectedBatch = selectedBatch
session.oldIndRemedParams = params
resultList = recordSearchService.individualSearch(params)
println "<><><> remediationsearch() called fresh."
}
render(template: 'indivSearchResults', model: [resultList: resultList, resultCount: resultList?.size()])
println "<<<<<< remediationSearch() end at " + System.nanoTime(); println " ";
}
And here is the output of the stacktrace which I can't seem to understand (partly because I'm new to Grails) because I don't seem to see any of my coded functions in it:
>>>>>> remediationSearch() start at 67861365037047
Error |
java.lang.Exception: why are you calling me?!?!
Error |
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Error |
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor
Impl.java:57)
Error |
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor
AccessorImpl.java:45)
Error |
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
Error |
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(Refl
ectiveInterceptor.java:986)
Error |
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:
77)
Error |
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoC
oerce.callConstructor(ConstructorSite.java:102)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallS
iteArray.java:57)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractC
allSite.java:182)
Error |
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractC
allSite.java:190)
Error |
at com.twc.fatcaone.CustomerController.remediationSearch(CustomerController.groovy
:264)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:606)
Error |
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInte
rceptor.java:1254)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper.invoke(M
ixedGrailsControllerHelper.java:154)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handl
eAction(AbstractGrailsControllerHelper.java:354)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.execu
teAction(AbstractGrailsControllerHelper.java:231)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handl
eURI(AbstractGrailsControllerHelper.java:197)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handl
eURI(AbstractGrailsControllerHelper.java:121)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest
(SimpleGrailsController.java:72)
Error |
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Simpl
eControllerHandlerAdapter.java:48)
Error |
at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(Grail
sDispatcherServlet.java:355)
Error |
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.j
ava:856)
Error |
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServle
t.java:953)
Error |
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:8
55)
Error |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
Error |
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:
829)
Error |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:303)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentC
achingFilter.java:198)
Error |
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
Error |
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingF
ilterProxy.java:343)
Error |
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterP
roxy.java:260)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:101)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:101)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:101)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.jav
a:748)
Error |
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispat
cher.java:486)
Error |
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.
java:411)
Error |
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.ja
va:338)
Error |
at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(We
bUtils.java:332)
Error |
at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(We
bUtils.java:297)
Error |
at org.codehaus.groovy.grails.web.util.WebUtils.forwardRequestForUrlMappingInfo(We
bUtils.java:288)
Error |
at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInterna
l(UrlMappingsFilter.java:217)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:107)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.executeFilterChainWith
WrappedResponse(GrailsPageFilter.java:233)
Error |
at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPa
geFilter.java:208)
Error |
at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFil
ter.java:153)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at javax.servlet.FilterChain$doFilter.call(Unknown Source)
Error |
at org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.gro
ovy:45)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInter
nal(GrailsWebRequestFilter.java:69)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:107)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(
HiddenHttpMethodFilter.java:67)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:107)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(Charact
erEncodingFilter.java:88)
Error |
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilt
er.java:107)
Error |
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingF
ilterProxy.java:343)
Error |
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterP
roxy.java:260)
Error |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
terChain.java:241)
Error |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
.java:208)
Error |
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
220)
Error |
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
122)
Error |
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
Error |
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
Error |
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:11
6)
Error |
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
Error |
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processo
r.java:1040)
Error |
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractPr
otocol.java:607)
Error |
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315
)
Error |
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Error |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Error |
at java.lang.Thread.run(Thread.java:745)
<><><> remediationsearch() called fresh.
<<<<<< remediationSearch() end at 67863898745818
`
If you compare this output to a "real" request you'll see basically the same thing. This is what I'd expect to see - the various filters in the filter chain get called, then the servlet's service method (note that the servlet is GrailsDispatcherServlet which extends Spring's DispatcherServlet), then it goes to doPost which is weird because that's a POST request, but this seemed like it'd be a GET, then to doDispatch (where Grails figures out where to route the request), and then to SimpleControllerHandlerAdapter.handle.
There's only 1 Spring MVC controller in a Grails app, SimpleGrailsController. It acts as a bridge between Grails controllers and Spring MVC. Grails controllers are just Groovy classes, so they can't be registered as Spring MVC controllers, but instead this controller instance handles all requests and with help from MixedGrailsControllerHelper which tells it the controller and method to use (based on a reverse URL mapping from the requested url to an entry in URLMappings.groovy), it uses reflection to call the controller method. That's why there's a Method.invoke just before your controller action. The springloaded jlrMethodInvoke is there because springloaded adds reloading support in dev mode, but otherwise it can be ignored.
Your best bet is to run the app in debug mode and set some breakpoints so you can figure out what url is being requested. Before that though - set the Log4j level for these classes to debug and maybe that'll have something useful.
When I'm, trying to create and execute new project in GGTS using grails 2.3.8 I have this issue:
Loading Grails 2.3.8
Error |
java.lang.NoClassDefFoundError: Could not initialize class
org.codehaus.groovy.grails.io.support.PathMatchingResourcePatternResolver
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.getAvailableScripts(GrailsScriptRunner.java:817)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:427)
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:235)
Error |
at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:263)
How it can be solved?
I am using Grails 2.3.1 and GGTS 3.4
When I try to start the grails application from within GGTS I get the below error
If I run the application from command line it works fine. I also tried to create the application from within GGTS and it also gives the same below error.
I tried deleting the folder for .slcache and also restarted the machine but same issue. Could not find reference for this issue elsewhere. Is this an issue
Loading Grails 2.3.1
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Running Grails application
| Error java.io.FileNotFoundException: C:\Users\Admin\.grails\2.3.1\.slcache\.index (The process cannot access the file because it is being used by another process)
| Error at java.io.FileOutputStream.open(Native Method)
| Error at java.io.FileOutputStream.<init>(FileOutputStream.java:212)
| Error at java.io.FileWriter.<init>(FileWriter.java:107)
| Error at org.springsource.loaded.MethodInvokerRewriter.addToCacheIndex(MethodInvokerRewriter.java:379)
| Error at org.springsource.loaded.MethodInvokerRewriter.rewrite(MethodInvokerRewriter.java:321)
| Error at org.springsource.loaded.MethodInvokerRewriter.rewriteUsingCache(MethodInvokerRewriter.java:154)
| Error at org.springsource.loaded.TypeRegistry.methodCallRewriteUseCacheIfAvailable(TypeRegistry.java:791)
| Error at org.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:265)
| Error at org.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:102)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
| Error at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
| Error at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
| Error at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
| Error at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
| Error at org.slf4j.impl.GrailsSlf4jLoggerFactory.getLogger(GrailsSlf4jLoggerFactory.java:44)
| Error at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:270)
| Error at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
| Error at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:291)
| Error at org.apache.commons.logging.LogFactory$getLog.call(Unknown Source)
| Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
| Error at org.grails.plugins.tomcat.fork.ForkedTomcatServer.<clinit>(ForkedTomcatServer.groovy:39)
It's an old thread but it may help someone.
There's seems to be a problem with .grails folder located in the home directory.
Either it doesn't exist. If it's so then create one.
Or you don't have permission to access that .grails folder. It it's so then change the permission using chown command.
After completing either of the above steps, clean your grails project and restart your IDE.