Bonjour,

Je suis confronté à un problème avec des caractères spéciaux stocké dans une base de données DB2 V8 (aix).

Le charset de la db est ISO8859-1

Le caractère qui me pose problème est le carriage return ( chr(10) )

Hibernate n'arrive pas à charger les objets. Il génère l'exception suivante:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: could not execute query; uncategorized SQLException for SQL
SQL state [null]; error code [-99999]; null; nested exception is com.ibm.db2.jcc.b.SqlException
 
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
        at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
 
        at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
        at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
        at org.springframework.orm.hibernate3.HibernateTemplate.loadAll(HibernateTemplate.java:595)
 
 
Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:107)
        at com.ibm.db2.jcc.b.y.a(y.java:1594)
        ... 27 more
Quelqu'un aurait-il déjà rencontré ce genre de problèmes?
D'ou peut provenir ce problème?

J'ai essayé d'utiliser les options suivantes pour la config hibernate
<prop key="hibernate.connection.characterEncoding">ISO8859-1</prop>
<prop key="hibernate.connection.charSet">ISO8859-1</prop>

Cela n'a rien changé


Sam