2 Replies Latest reply on Sep 8, 2007 6:47 PM by madhav_inamti

    seam generate-entities failed with mysql blob column please

    aharonav

      18:54:56,591 INFO [TableMetadata] columns: [filetype, file, uploadid, filename, filesize, bundleid]
      18:54:56,591 WARN [ServiceController] Problem starting service persistence.units:ear=BatchMail.ear,unitName=BatchMail
      javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: FILE, expected: tinyblob at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)

        • 1. Re: seam generate-entities failed with mysql blob column ple
          ellenzhao

          Most likely you would have to hack a class in the org.hibernate.dialect package. I filed a Hibnernate JIRA a while ago with a patch, but till now such kind of problem is not get fixed. Okay, first know which dialect you are using. Most likely MySQL5Dialect. That class extends the MySQLDialect. You can open the source code of org.hibernate.dialect.MySQLDialect.java and add the column type you want (make sure your mysql jdbc driver support this type), or write a java class called org.hibernate.dialect.MySQLPatchedDialect.java, and rebuild the hibernate.

          • 2. Re: seam generate-entities failed with mysql blob column ple

            Hi,

            I am stuck with the same problem. I am using MySQLInnoDBDialect. Any solution would be appreciated.

            Just a note. Using MySQL5Dialect, I get this error for TEXT datatype also.

            Thanks,
            M