[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Classcastexception
ssuyamboo
do-not-reply at jboss.com
Thu Jul 19 10:59:51 EDT 2007
Hi,
I am using the simple insert/retrieval against postgres using hibernate 3.1rc1 and jboss 4.0.3SP1.
My hbm.xml is below,<hibernate-mapping>
</hibernate-mapping>
I am able to successfully store data , but during retrieval it throws java.lang.ClassCastException.
OrderDTO orderdto = null;
try{
orderdto=(OrderDTO) retrieveObj(OrderDTO.class, id);
} catch (ClassCastException e){
e.printStackTrace();
}
When I checked the following,
retObject instanceof OrderDTO) this line returns false
retObject.getClass().getName() returns com.xpe.ecommerce.order.model.OrderDTO
Can anyone give a hint? Is this because of reflection failure?
Thanks
Sun
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065851#4065851
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065851
More information about the jboss-user
mailing list