Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem with ImageTools plugin in Grails
    primarykey
    data
    text
    <p>i have a grails project with an Image Domain Class and Controller. I just installed the grails <a href="http://www.grails.org/ImageTools+plugin" rel="nofollow noreferrer">ImageTools</a> 1.0.4 Plugin and i would like to generate thumbnails for images wich will be uploaded. </p> <p>My Image-Domain-Class:</p> <pre><code> class Image { byte[] data //String name byte[] thumbnail static constraints = { //name() data() } } </code></pre> <p>The "safe"-action in my Controller:</p> <pre><code>def save = { def imageInstance = new Image(params) def imageTool = new ImageTool() imageTool.load(imageInstance.data) imageTool.thumbnail(320) imageInstance.thumbnail = imageTool.getBytes("JPEG") //Here is my problem! if(!imageInstance.hasErrors() &amp;&amp; imageInstance.save()) { flash.message = "Image ${imageInstance.id} created" redirect(action:show,id:imageInstance.id) } else { render(view:'create',model:[imageInstance:imageInstance]) } } </code></pre> <p>When I start my Grails-application and uploading an image I'm getting the following error-message:</p> <blockquote> <p>Error 200: groovy.lang.MissingMethodException: No signature of method: ImageTool.getBytes() is applicable for argument types: (java.lang.String) values: {"JPEG"} Servlet: grails URI: /grailsproject/grails/image/save.dispatch Exception Message: No signature of method: ImageTool.getBytes() is applicable for argument types: (java.lang.String) values: {"JPEG"} Caused by: groovy.lang.MissingMethodException: No signature of method: ImageTool.getBytes() is applicable for argument types: (java.lang.String) values: {"JPEG"} Class: GrailsAuthenticationProcessingFilter At Line: [57]</p> </blockquote> <p>It says that the Method getBytes() is missing but the method is still available. My IDE intelliJ also recognizes no errors.</p> <p>So what can I do? Could someone help me please? Sorry for my bad english. If you are german, please look at <a href="http://support-network.info/board/problem-mit-imagetools-getbytes-t3008.html" rel="nofollow noreferrer">http://support-network.info/board/problem-mit-imagetools-getbytes-t3008.html</a> .</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload