Hi,
I'm using
Hibernate 3.2.5 with Oracle 9 database.
I've a problem while reading varchar2(20) column where user password hash is stored.
I get different results when password is read from pl/sql developer (or C client aplication which is connecting with my application) and when using hibernate.
For example:
codes of characters for some pass, read from pl/sql dev are as following:
8364, 35, 8364, 88, 8364, 80, 196, 110, 341, 91
while corresponding codes returned by hibernate are:
128, 35, 128, 88, 128, 80, 196, 110, 224, 91
It seems like hibernate was reading only one byte, but 8 least significant bits of 8364 aren't the same as bits of 128.
I thought that it is problem with setting NLS_LANG environment variable, but after setting it result is the same.
part of hibernate.cfg.xml:
Code:
<hibernate-configuration>
<session-factory name="MySessionFactory">
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">pass</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@(...)</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="hibernate.cache.use_query_cache">true</property>
<property name="hibernate.generate_statistics">true</property>
<property name="hibernate.cache.use_structured_entries">true</property>
<property name="hibernate.max_fetch_depth">1</property>
password column mapping:
Code:
<property name="Password" type="string">
<column name="PASSWORD" length="20" />
</property>
I think that i've missed something during configuration.
Any help will be appreciated.
Thanks.