java - Hibernate Not Loading Postgresql bytea consistently -


i using hibernate 3.6 on 2 different boxes, both reading same database table. hibernate annotation 2 fields such:

@basic(fetch=fetchtype.eager) @column(name="encryptedkey",length = 256) protected byte[] encryptedkey;  @basic(fetch=fetchtype.eager) @column(name="encryptediv",length = 256) protected byte[] encryptediv; 

now, when loading entity properties on 1 machine (ubuntu linux sun jdk 1.6.0_22-b04), able load 256-byte encrypted keys , ivs.

however, not case on machine (windows 2003 server sp2 enterprise edition sun jvm 1.6.0_22-b04), have either 0 or 511 bytes loaded each field. otherwise, jar files on both systems same.

the database engine postgresql 9.0 , i'm using latest postgresql jdbc driver.

anyone has idea going wrong?

it turns out jre lib folder had posgresql 8.4 driver in it. deleting solved issue.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -