-->
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.  [ 5 posts ] 
Author Message
 Post subject: import.sql
PostPosted: Sun Aug 24, 2008 1:42 am 
Newbie

Joined: Sun Aug 24, 2008 1:34 am
Posts: 4
I'm using JBoss 4.2.2, MySQL 5.0

I'm deploying application with import.sql file which is supposed to be executed by hibernate and populate database with data

Problem is import.sql contains data in UTF encoding. And these data is inserted incorrectly. all non-ASCII characters are broken. MySQL database is set up with default UTF8 encoding and collation. I can insert utf data directly and I see it correctly, but data inserted from import.sql is broken.

Is it a bug?

Yes I tried to launch JBoss with -Dfile.encoding=UTF-8 - same result


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 24, 2008 8:28 pm 
Newbie

Joined: Sun Aug 24, 2008 1:34 am
Posts: 4
ok
I found the solution.

I had to start JBoss with -Dfile.encoding=Shift_JIS JVM parameter


Top
 Profile  
 
 Post subject: still
PostPosted: Tue Aug 26, 2008 8:41 am 
Newbie

Joined: Sun Aug 24, 2008 1:34 am
Posts: 4
is it possible to tell hibernate wht encoding is used in import.sql?
I do not whant to add -Dfile.encoding=UTF8 or -Dfile.encoding=Shift_JIS to the JBoss launching parameters


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 7:46 am 
Newbie

Joined: Fri Nov 07, 2008 7:32 am
Posts: 5
hi,
sorry for my english. I'm studing how to create export/import data with hibernate.
can you explain me how you did it?
I have the same problema, but i need to create the class to read import.sql.

For export data, do you hava an idea?

thanks gianluca


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2008 9:06 am 
Newbie

Joined: Sun Aug 24, 2008 1:34 am
Posts: 4
gianlucafg wrote:
hi,
sorry for my english. I'm studing how to create export/import data with hibernate.
can you explain me how you did it?
I have the same problema, but i need to create the class to read import.sql.

For export data, do you hava an idea?

thanks gianluca

create an import.sql file with SQL queries and put it into CLASSPATH


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.