We just spent a few glorious hours or so trawling the internet and writing old skool jdbc code, to discover this little beauty. Simply upgrade to 10.2.0.5 of the jdbc driver and it goes away.
Thanks to this post http://efreedom.com/Question/1-377745/Oracle-JDBC-Euro-Character we discovered our problem.
Changing entities to be lazy loaded led me to the following problem:
@OneToMany(fetch = FetchType.LAZY)
Caused by: org.hibernate.HibernateException: Javassist Enhancement failed: Thing
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:142)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:72)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:402)
at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3483)
….
Caused by: java.lang.InstantiationException: Thing_$$_javassist_38
at java.lang.Class.newInstance0(Class.java:340)
at java.lang.Class.newInstance(Class.java:308)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:139)
Thanks to I jumped straight to the problem. From the :
Cat has a no-argument constructor. All persistent classes must have a default constructor (which can be non-public) so that Hibernate can instantiate them using Constructor.newInstance(). It is recommended that you have a default constructor with at least package visibility for runtime proxy generation in Hibernate.