-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to generate pdf with grails version 2.5.0 #24
Comments
@pandeybk you might try my branch at |
@PaulWaldo On Fri, Aug 7, 2015 at 6:36 PM, Paul Waldo notifications@github.com wrote:
|
Hi @pandeybk, here is what you do:
That should pull in the updated plugin for your project. |
Hi @PaulWaldo, I followed the steps, here comes new issue, when I run | Script 'MavenInstall' not found, did you mean: 1) UninstallPlugin 2) InstallPlugin 3) InstallDependency 4) InstallJQuery 5) InstallTemplates I made little bit modification in code, removed Now I am finally receiving following compilation error. | Error Compilation error: startup failed: /home/bkpandey/workspace/github/opensource/rendering/grails-app/controllers/RenderingController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'RenderingController'. @ line -1, column -1. /home/bkpandey/workspace/github/opensource/rendering/grails-app/controllers/RenderingController.groovy: -1: Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'RenderingController'. @ line -1, column -1. 2 errors |
@pandeybk, I'm wondering if it is a grails or groovy version problem. Here is my build transcript:
|
Thank you for pointing to right direction actually it was JDK version. I was using 1.8 and correcting it to 1.7 solve the issue. But this branch again throwing the same initial error message. I just checked whether my application uses correct branch. Here comes excerpt of
|
@pandeybk it sounds like you are still using Java 8. What are your values for |
Currently I am using Intellij and here is configuration, So I think this is not related to /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Dgrails.home=/opt/grails/grails-2.5.0 -Dbase.dir=/home/bkpandey/workspace/wheeloflife -Dtools.jar=/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar -Dgroovy.starter.conf=/opt/grails/grails-2.5.0/conf/groovy-starter.conf -Xmx768M -Xms768M -XX:MaxPermSize=256m -XX:PermSize=256m -javaagent:/opt/grails/grails-2.5.0/lib/org.springframework/springloaded/jars/springloaded-1.2.3.RELEASE.jar -noverify -Dspringloaded=profile=grails -Dfile.encoding=UTF-8 -classpath /opt/grails/grails-2.5.0/lib/org.codehaus.groovy/groovy-all/jars/groovy-all-2.4.3.jar:/opt/grails/grails-2.5.0/dist/grails-bootstrap-2.5.0.jar org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf /opt/grails/grails-2.5.0/conf/groovy-starter.conf "run-app -plain-output" |
@pandeybk I'm not an Intellij user, so I'm scratching my head there :-) I do know that grails will use the value of JAVA_HOME when it does its magic. See http://grails.github.io/grails-doc/2.5.0/guide/gettingStarted.html. I was able to recreate your problem on the command line just by switching my JAVA_HOME to Java 8. I assume you are using Linux: can you show me the output of
from the command line? It will look something like this:
|
Ok, now I running application through command line only. Here is my
Still no progress and same error output. Also if you look at my first post, I mentioned that the same code base works with grails version 2.2.4. Problem is only identified in 2.5.0 only. So I pretty sure this is not related to JAVA_HOME related.
|
I'm sorry @pandeybk, I misunderstood. I'm not familiar with the guts of the plugin to be of much help. One thing you can try is setting debug mode for the plugin |
@PaulWaldo thank you for the support and effort. I will let you know if I found any solution. Currently I implemented pdfbox as my PDF generation service. Thank you again. |
I have the same problem on Grails 2.5.1 and Rendering 1.0.0. Exact same code on Grails 2.3.11 worked fine. |
This is what i used in my Grails 2.4.3 app. // inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
excludes 'commons-io', 'core-renderer', 'itext', 'org.grails:grails-docs'
}
// more config...
dependencies {
compile 'org.xhtmlrenderer:flying-saucer-core:9.0.7'
compile 'org.xhtmlrenderer:flying-saucer-pdf:9.0.7'
compile 'com.lowagie:itext:2.1.7'
// more config... |
I tried your config settings and still get the same issue. |
Found the solution to getting it to work on Grails 2.5.1, just add this dependency in your buildConfig: |
Thanks @zaccak that works 👍 |
I am trying to render html file to pdf using rendering plugin, my controller method is,
And my _download.gsp file is,
I have added following dependencies in BuildConfig.groovy file
I received following stack-trace,
Note Update: The same code base works with grails version 2.2.4, problem only seen in grails version 2.5.0
The text was updated successfully, but these errors were encountered: