4 Replies Latest reply on Jul 11, 2008 1:14 PM by damatrix

    s:graphicImage problems

    damatrix

      Hi.


      I'm using Seam 2.0.GA on Tomcat 6. I have a page for displaying a list of products and their pictures. The pictures are stored to the database and are displayed through the s:graphicImage tag.


      However, i find that sometimes half the image appears in the s:graphicImage area, the rest of the area is all gray. I've got this tag in my components.xml file


          <web:multipart-filter create-temp-files="true" max-request-size="5000000"/>



      and have been tweaking it to see if its the image upload section that gives the problem but its no use.


      Need help since this worked perfectly in development, but deploying it to production is now showing up this behaviour.


      Thanx.



        • 1. Re: s:graphicImage problems
          dan.j.allen

          Taking the scientific approach, I would try to determine which part is the problem, the upload or the graphic image. See if you can use a database viewer or write a quick exporter to generate images from what is in the database. If those are fine, then the problem is in the rendering.

          • 2. Re: s:graphicImage problems
            damatrix

            Ok, I think i've seen the problem. The data type generated from the entities for the image field is the MySQL blob type, and it seems too small to hold my images. I changed this to longblob during development but forgot to do so at deployment.


            However, since my entities are all annotated and the database schema is generated dynamically, is there any way i could force the image field to be longblob and not just blob using annotations?

            • 3. Re: s:graphicImage problems
              dan.j.allen

              I'm pretty sure that is what the @Lob annotation is for. If that doesn't do it for you, remember that the @Column annotation can take a SQL column definition clause, so you can put anything you want in there.

              • 4. Re: s:graphicImage problems
                damatrix

                I did use the @Lob annotation. But i'll try the extra options on the @Column annotation to see if i can achieve the desired result. Thanks for the help.