-->
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.  [ 2 posts ] 
Author Message
 Post subject: Unknown character set index error
PostPosted: Fri Nov 05, 2010 1:15 pm 
Newbie

Joined: Fri Nov 05, 2010 1:09 pm
Posts: 2
I have a large application using Hibernate and one particular record throws the following MySQL error when hibernate tries to retrieve it:

Code:
Unknown character set index for field '25432' received from server.
at com.mysql.jdbc.Connection.getCharsetNameForIndex(Connection.java:1664)
at com.mysql.jdbc.Field.(Field.java:144)
at com.mysql.jdbc.MysqlIO.unpackField(MysqlIO.java:506)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:280)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1319)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2233)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2193)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2174)
at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:536)


I turned on SQL debugging and the SQL statement being run is over a thousand lines long and returns over 20,000 results. I assume that one of the results has an invalid character encoding (something besides Unicode or latin1). The trouble is that I don't know which record or even which table. The query joins over 20 different tables. In my production instance, I can readily reproduce this error by running a specific report on a specific product. If I run the same report on any other product, no error occurs, so I think that I can assume that there is bad data for this particular product. The trouble is that I don't have any idea about how to find the bad data.

Does anyone have any suggestions about how I could locate the source of the problem?


Top
 Profile  
 
 Post subject: Re: Unknown character set index error
PostPosted: Fri Nov 05, 2010 4:20 pm 
Newbie

Joined: Fri Nov 05, 2010 1:09 pm
Posts: 2
I actually fixed this problem on my own. Underneath the stack trace in small letters, there was the message "OutOfMemoryException." When I looked more closely, I had over 9,000 child objects for this product which caused hibernate to run out of memory. I have since resolved the issue.


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