-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: hbm2java on "seam generate-entities"
PostPosted: Wed May 02, 2007 2:14 pm 
Newbie

Joined: Wed May 02, 2007 2:04 pm
Posts: 2
Hi,

the error I'm getting is sure more related to JBoss Seam, but after viewing the code I saw that it depends on hbm2java.

I'm talking about seam-gen, more concisely about the "seam generate-entities" command so I can generate the POJO's that represent the entities.

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). I think that's the cause, because using tables with ansi names works fine.

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 had this problem?


Thanks,
Tiago Cavaleiro


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 03, 2007 1:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
we just pass the table names we receive from mysql driver back to it when asking for more data.....don't know how we otherwise can ask it to ensure the driver understands its own data ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: "seam generate-entities" - SOLVED (but don't under
PostPosted: Mon May 07, 2007 7:14 am 
Newbie

Joined: Wed May 02, 2007 2:04 pm
Posts: 2
Hi again!

I don't know how to start, but the point is that hbm2java works great! :)

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 was relationed with the fact that 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!!


Just want to thank you for the beautiful tool that you made.

Tiago Cavaleiro.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.