title: Getting java.lang.ClassCastException with Hibernate
body: <p>I'm very new to Hibernate and only have tried to generate mapings via NetBeans.
  So I've made very simple HQL query to see how it handled, that's what i get:</p>
  
  <p><code>java.lang.ClassCastException: car_store.entity.Colour_$$_javassist_6 cannot be cast to javassist.util.proxy.ProxyObject at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:147) at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:71) at org.hibernate.tuple.entity.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:631) java.lang.ClassCastException: car_store.entity.Colour_$$_javassist_6 cannot be cast to javassist.util.proxy.ProxyObject at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxy(JavassistLazyInitializer.java:147) at org.hibernate.proxy.pojo.javass ist.JavassistProxyFactory.getProxy(JavassistProxyFactory.java:71)</code> and etc.</p>
  
  <p>I've just used NetBeans's tools, so what possibly could go wrong?
  Thanks in advance.</p>