Open akhopkar opened 8 years ago
You also need this:
runtime "org.springframework:spring-test:4.2.1.RELEASE"
I think this should be included in the build.gradle for this project, but it isn't. So, this is a bug.
Also just ran into this - not sure why the rendering plugin requires a runtime dependency on a test library.....seems like this is an issue.
I agree. Maybe I will look into why it's necessary later and see if I can remove that dependency and make a PR.
On Feb 23, 2017 5:22 PM, "Alex White" notifications@github.com wrote:
Also just ran into this - not sure why the rendering plugin requires a runtime dependency on a test library.....seems like this is an issue.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gpc/rendering/issues/27#issuecomment-282141154, or mute the thread https://github.com/notifications/unsubscribe-auth/AG7dTqI-r2EngjmW_Tt9TQBzbDgyG4Vtks5rfgbBgaJpZM4GzShN .
Hi there,
I am trying to migrate an old grails app to grails 3. I am using grails 3.0.10. I was using the rendering plugin in my old app to generate PDFs and have a bunch of PDFs built this way which I would like to keep intact, so I'm trying to get this rendering plugin installed in my grails 3 app. As suggested, I have added the following line to my build.gradle under the dependencies:
compile "org.grails.plugins:rendering:2.0.0-SNAPSHOT"
This seems to correctly pull this plugin .jar file and the run-app works. However, when I try to render a gsp as a PDF through my controller I'm getting a NullPointerException that is being thrown by some code in the rendering plugin. I am including the stack trace below. Can you please let me know how I could correct this issue?
ERROR org.grails.web.errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [GET] /test/testPDF Stacktrace follows: java.lang.reflect.InvocationTargetException: null at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] Caused by: java.lang.NullPointerException: null at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1281) ~[na:1.7.0_79] at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1141) ~[na:1.7.0_79] at java.beans.Introspector.getBeanInfo(Introspector.java:416) ~[na:1.7.0_79] at java.beans.Introspector.getBeanInfo(Introspector.java:163) ~[na:1.7.0_79] at grails.plugins.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:31) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:68) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:60) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:65) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:35) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:36) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:35) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.RenderingService.render(RenderingService.groovy:65) ~[rendering-2.0.0-SNAPSHOT.jar:na] at grails.plugins.rendering.RenderingTrait$Trait$Helper.renderPdf(RenderingTrait.groovy:47) ~[rendering-2.0.0-SNAPSHOT.jar:na] at com.svp.controller.TestController$_closure1.doCall(TestController.groovy:14) ~[main/:na] ... 3 common frames omitted