hi it is me againt. I have a new problem with my id.
Code:
<hibernate-mapping package="ca.canassistance.pojo">
<class
name="Xc4dvoyPojo"
table="XC4DVOY"
>
<meta attribute="sync-DAO">false</meta>
<id
name="id"
type="integer"
column="ID"
>
<generator class="vm"/>
</id>
my code
Code:
public void save(ca.canassistance.pojo.Xc4dvoyPojo pojo)
throws HibernateException, Exception {
Session session = null;
// Transaction tx = null;
try {
session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
session.save(pojo);
session.getTransaction().commit();
} catch (HibernateException e) {
session.getTransaction().rollback();
e.printStackTrace();
throw new ServiceException(e.getMessage(), e);
} finally {
HibernateUtil.getSessionFactory().close();
}
}
and the console
Quote:
Initial SessionFactory creation failed.org.hibernate.MappingException: could not instantiate id generator [entity-name=ca.canassistance.pojo.Xc4dvoyPojo]
but evething was working very good with hibernate 2
also I try
Code:
<generator class="narative"/>
and it fail to thank you for help