![](/img/trans.png)
[英]IncompatibleClassChangeError with grails rendering plugin 0.44
[英]Grails rendering plugin with grails 3.1.1
我正在尝试使用此插件从gsp转换为pdf
但是我仍然会遇到这样的错误
java.lang.NullPointerException: null
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1337) ~[na:1.8.0_131]
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1197) ~[na:1.8.0_131]
at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_131]
at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_131]
at grails.plugins.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:31) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:68) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:60) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:65) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:35) ~[rendering-2.0.3.jar:na]
这是我的代码。
def createPdfReport = {
def cif = corporateUserService.getCurrentCifUser().cif
def perintahkerjaIns = PerintahKerja.findByCifAndId(cif,params.id)
def perintahkerjaDets = PerintahKerjaDetail.findAllByPerintahKerja(perintahkerjaIns,[sort:"pohon",order:"asc"])
def perintahpekerja = PerintahPekerja.findAllByPerintahKerja(perintahkerjaIns)
renderPdf(template: '/perintahKerja/templatprintperintahkerja',model: [jumlahpohon: perintahkerjaDets.size(), cif: cif, perintahLerjaInstance:perintahkerjaIns, perintahKerjaDetails:perintahkerjaDets, perintahPekerjaList: perintahpekerja], filename: "PerintahKerja")
}
我不知道我错过了什么。
您确定该插件可用于grails 3吗? 自从我阅读了插件github以来,它说构建失败了,并且自2年前以来就出现了一张关于问题的票证,该票务看起来很像您所拥有的问题,但直到现在仍未解决。 在github上的最后一次提交也是在2年前。 公开票使用的是grails 2,所以我认为该插件不适用于grails 3(因为它可能未更新为grails 3插件)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.