Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.3.5, 1.3.6
-
Fix Version/s: 1.4-M1
-
Component/s: None
-
Labels:None
Description
It appears that custom Codecs do not work in 1.3.5. Given the custom codec XmlCodec.groovy, with the default codec set to "xml", (you could also set the default codec to "base64") the app will fail. The relevant error from the stacktrace.log is given below.
2010-10-06 22:58:22,488 [http-8080-1] ERROR StackTrace - Sanitizing stacktrace:
java.lang.NullPointerException
at org.springframework.util.ReflectionUtils.makeAccessible(ReflectionUtils.java:399)
at org.codehaus.groovy.grails.web.util.CodecPrintWriter.initEncode(CodecPrintWriter.java:24)
at org.codehaus.groovy.grails.web.util.CodecPrintWriter.<init>(CodecPrintWriter.java:19)
at org.codehaus.groovy.grails.web.pages.GroovyPage.initRun(GroovyPage.java:183)
at org.codehaus.groovy.grails.web.pages.GroovyPageWritable.writeTo(GroovyPageWritable.java:186)
at org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderWithTemplateEngine(GroovyPageView.java:146)
at org.codehaus.groovy.grails.web.servlet.view.GroovyPageView.renderMergedOutputModel(GroovyPageView.java:79)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet$1.doFilter(ErrorHandlingServlet.java:138)
at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.codehaus.groovy.grails.web.servlet.ErrorHandlingServlet.doDispatch(ErrorHandlingServlet.java:113)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
Issue Links
- is related to
-
GRAILS-6073
Performance penalty for people not using default codec
-
I think this may have been caused by https://github.com/grails/grails-core/commit/38f1844a8a00f27e6f29c256cf610e5cb678e8fe. Will investigate and get resolved.