Hello
i get an error when trying to save/update information into db.
i used debug and traced the problem in hibernateTemplate class:
Code:
..
//create session
System.out.println("session: " +session);
//begin transaction
System.out.println("begin transaction...");
Serializable id = session.save(entity);
session.getTransaction().commit();
...
in Console the last message is "begin transaction..." and then i get this error:
Quote:
org.hibernate.MappingException: Unknown entity: domain.blabla
org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:301)
$Proxy0.save(Unknown Source)
hibernate.HibernateTemplate.save(HibernateTemplate.java:84)
services.persistence.hibernate.HibernateServiceImpl.saveX(HibernateServiceImpl.java:41)
services.business.ServiceImplementation.saveX(ServiceImplementation.java:37)
web.MyServlet.save(MyServlet.java:118)
web.MyServlet.doPost(MyServlet.java:283)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
The data that i want to update the db with exits, but it just not save. The domain.blabla is mapped in hibernate xml config file
Any ideas? thank you