我在使用grails渲染插件时遇到了问题。控制器准备数据并调用 renderPdf
def reportergebnis = Reparaturauftrag.all.findAll{
params.datumvon <= it.auftragsdatum && it.auftragsdatum <= params.datumbis && params.auftragsstatus.contains(it.auftragsstatus.id.toString())
}
renderPdf(template: 'report', model: [reportergebnis: reportergebnis], filename: 'report.pdf')
它不想要我,并在 renderPdf 调用中抛出一个 NPE:
Caused by NullPointerException: null
->> 1337 | getPublicDeclaredMethods in java.beans.Introspector
完整的堆栈跟踪在此粘贴粘贴上
关于这可能是什么的任何想法? 我正在使用grails 3和gradle,并通过build.gradle
和compile 'org.grails.plugins:rendering:2.0.3'
拉动插件
在完整的堆栈跟踪中:
| 141 | $tt__reportexecute in ReparaturauftragController.groovy
| 96 | doInTransaction in grails.transaction.GrailsTransactionTemplate$2
| 133 | execute . . . . in org.springframework.transaction.support.TransactionTemplate
| 93 | execute in grails.transaction.GrailsTransactionTemplate
| 210 | invoke . . . . . in org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker
| 187 | invoke in org.grails.core.DefaultGrailsControllerClass
| 90 | handle . . . . . in org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter
| 963 | doDispatch in org.springframework.web.servlet.DispatcherServlet
| 897 | doService . . . in ''
| 970 | processRequest in org.springframework.web.servlet.FrameworkServlet
| 861 | doGet . . . . . in ''
| 846 | service in ''
| 55 | doFilterInternal in org.springframework.boot.web.filter.ApplicationContextHeaderFilter
| 317 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 127 | invoke . . . . . in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 91 | doFilter in ''
| 331 | doFilter . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 115 | doFilter in org.springframework.security.web.access.ExceptionTranslationFilter
| 64 | doFilter . . . . in grails.plugin.springsecurity.web.UpdateRequestContextHolderExceptionTranslationFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 53 | doFilter . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 158 | doFilter . . . . in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 169 | doFilter . . . . in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 200 | doFilter . . . . in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 62 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 105 | doFilter . . . . in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 58 | doFilter . . . . in grails.plugin.springsecurity.web.SecurityRequestHolderFilter
| 331 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 214 | doFilterInternal in org.springframework.security.web.FilterChainProxy
| 177 | doFilter in ''
有几个条目指向org.springframework.security.web
。
您是否在未经授权的情况下检查过插件是否按预期工作?如果是这样,则问题出在安全配置上。