1 Reply Latest reply on May 7, 2007 7:26 AM by tcavaleiro

    seam generate-entities

    tcavaleiro

      Hi there,

      after running "seam generate-entities" to generate the POJO's that represent the entities I get an error.

      I think that is associated with the fact that my MySQL tables are using the "latin-1" charset and because they have names with accents (e.g. acção).

      The output that I've is this:

      ...(regular stuff omitted)...
      [hibernate] INFO: cleaning up connection pool: jdbc:mysql://localhost/sicrema
      [hibernate] An exception occurred while running exporter #2:hbm2java (Generates a set of .java files)
      [hibernate] To get the full stack trace run ant with -verbose
      [hibernate] org.hibernate.exception.SQLGrammarException: Error while reading primary key meta data for sicrema.ac?º?úo
      [hibernate] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'sicrema.ac?ú?º?ú?úo' doesn't exist

      BUILD FAILED
      C:\Programas\jboss-seam-1.2.1.GA\seam-gen\build.xml:813: org.hibernate.exception
      .SQLGrammarException: Error while reading primary key meta data for sicrema.ac?º?úo


      Doesn't hbm2java support table names with accents??
      Anyone that had this problem?


      Thanks,
      Tiago Cavaleiro



        • 1. Re: seam generate-entities
          tcavaleiro

          Hi again!


          Since my post I was searching an answer to my problem, and doing my research over the jdbc mysql driver so I can get some answers.


          I was getting that error and I thought the problem exists because the database (MySQL) was using latin1 charset, then I changed the charset to utf8 and the problem was solved.
          To get a conclusion I changed back to latin1 and the problem "doesn't" exist.

          So I don't know what happened!!

          Thanks anyway.

          Tiago Cavaleiro.