NullPointerException in reading gsp template - grails

Below is method for gsp template parsing that have created:
String renderGSPTemplate(String templateText, Map bindings){
def output = new StringWriter()
String pageName = bindings.remove('pageName')
groovyPagesTemplateEngine.clearPageCache()
Template template1 = groovyPagesTemplateEngine.createTemplate(templateText, pageName)
Writable data = template1.make(bindings)
data.writeTo(output)
return output
}
Below is exception that I am getting:
Error java.lang.NullPointerException
| Error at org.codehaus.groovy.grails.web.pages.GroovyPageOutputStack.lookupStack(GroovyPageOutputStack.java:102)
| Error at org.codehaus.groovy.grails.web.pages.GroovyPageOutputStack.currentStack(GroovyPageOutputStack.java:76)
| Error at org.codehaus.groovy.grails.web.pages.GroovyPage.initRun(GroovyPage.java:213)
| Error at org.codehaus.groovy.grails.web.pages.GroovyPageWritable.doWriteTo(GroovyPageWritable.java:199)
| Error at org.codehaus.groovy.grails.web.pages.GroovyPageWritable.writeTo(GroovyPageWritable.java:128)
| Error at groovy.lang.Writable$writeTo.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 com.verecloud.nimbus4.mail.TemplateParserService$$EPpsYO6i.renderGSPTemplate(TemplateParserService.groovy:37)
Any one knows the reason for this error.
Thanks!

groovyPagesTemplateEngine uses HttpRequest and hence if we are not having a call from web application it will fail with NullPointerException.
Hence it was failing for me with NPE

Related

PDFBox | getting error while executing this line `PDDocument.load(input)`

I'm getting an error that while execute the line PDDocument.load(input)
Code example:
PDDocument pd
String pdfDir = "C:/Users/user/Desktop/file.pdf"
File input = new File("${pdfDir}")
pd = PDDocument.load(input) // System can't execute this line
pdfUtil.writePDF(pd, addr, data)
Error:
Error |
java.io.IOException: Error: End-of-File, expected line
Error |
at org.apache.pdfbox.pdfparser.BaseParser.readLine(BaseParser.java:1519)
Error |
at org.apache.pdfbox.pdfparser.PDFParser.parseHeader(PDFParser.java:360)
Error |
at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:186)
Error |
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1230)
Error |
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1197)
Error |
at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1168)
Error |
at org.apache.pdfbox.pdmodel.PDDocument$load.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 |
Dependency: compile 'org.apache.pdfbox:pdfbox:1.8.11'
As discussed in the comments: the file is empty. This is usually the reason when getting an exception like this
IOException: Error: End-of-File, expected line
with parseHeader in the stack trace.

Grails 2.3.8 refreshing dependencies

since today i'm getting an confusing error in ggts, while refreshing dependencies. I never had this error before and it says nothing to me:
Command terminated with an exception: java.lang.Exception (see details for
partial output)
Command: GrailsCommand(P/project> compile --non-interactive --refresh-
dependencies)
---- System.out ----
Loading Grails 2.3.8
.
|Environment set to development
.Error
|
java.lang.NoClassDefFoundError: _GrailsClasspath_groovy$_run_closure1
Error |
at _GrailsClasspath_groovy.run(_GrailsClasspath_groovy:39)
Error |
at _GrailsClasspath_groovy$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:45)
Error |
at _GrailsEvents_groovy$run.call(Unknown Source)
Error |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
Error |
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
Error |
at _GrailsEvents_groovy.run(_GrailsEvents_groovy:32)
Error |
at _GrailsEvents_groovy$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:45)
Error |
at _GrailsArgParsing_groovy$run.call(Unknown Source)
Error |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
Error |
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
Error |
at _GrailsArgParsing_groovy.run(_GrailsArgParsing_groovy:29)
Error |
at _GrailsArgParsing_groovy$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:45)
Error |
at _GrailsInit_groovy$run.call(Unknown Source)
Error |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
Error |
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
Error |
at _GrailsInit_groovy.run(_GrailsInit_groovy:34)
Error |
at _GrailsInit_groovy$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:45)
Error |
at _GrailsCompile_groovy$run.call(Unknown Source)
Error |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
Error |
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
Error |
at _GrailsCompile_groovy.run(_GrailsCompile_groovy:28)
Error |
at _GrailsCompile_groovy$run.call(Unknown Source)
Error |
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:45)
Error |
at _GrailsSettings_groovy$run.call(Unknown Source)
Error |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:59)
Error |
at org.codehaus.gant.IncludeTargets$leftShift.call(Unknown Source)
Error |
at Compile.run(Compile.groovy:25)
Error |
at Compile$run.call(Unknown Source)
Error |
at gant.Gant.prepareTargets(Gant.groovy:607)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeWithGantInstance
(GrailsScriptRunner.java:769)
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.ja
va:235)
Error |
at
org.codehaus.groovy.grails.cli.support.GrailsStarter.main
(GrailsStarter.java:263)
---- System.err ----
I didn't change the config of my project intentionally, don't know what happened.
I run grails 2.3.8 with java is 1.7
If somebody knows what to do, please tell me!
Thanks in advance
is your grails SDK and jdk configured correctly ?
You can follow below steps:
Go to your project directory e.g. d:\YourProject
Navigate to target\work folder in your project directory e.g. d:\YourProject\target\work
Delete the work folder
run commands grails clean and grails compile
If still issue not solved : run command grails clean-all and right click on project in GGTS then click on refresh dependencies > download
Hope it helps you
i had to remove the script cache folder from project: https://www.javabrahman.com/error-handling/error-_grailsclasspath_groovy_run_closure1/

Error in Groovy/Grails tool suite with grails project

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)

Grails 2.3.8 Stacktrace doesn't show any of my calling code

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.

Grails: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.grails.io.support.PathMatchingResourcePatternResolver

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?

Resources