Joined: Mon Aug 09, 2004 10:53 am Posts: 19
|
Hibernate version: 2.1
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
Debug level Hibernate log excerpt:
Hi, I get the following error when I try to delete data from a table using Spring/Hibernate :
I have a dao implementation which implements HibernateDaoSupport with a delete table method which looks like this :
public void deleteTable(String tableName)
{
getHibernateTemplate().delete("from " + tableName);
}
Based on the API for HibernateTemplate delete(java.lang.String qry) is a legitimate call. Any ideas?
Here is the exception below :
Exception: No persister for: java.lang.String org.springframework.orm.hibernate.HibernateSystemException: No persister for: ja va.lang.String; nested exception is net.sf.hibernate.MappingException: No persis ter for: java.lang.String net.sf.hibernate.MappingException: No persister for: java.lang.String at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryI mpl.java:344) at net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java: 2686) at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2693) at net.sf.hibernate.impl.SessionImpl.delete(SessionImpl.java:1133) at org.springframework.orm.hibernate.HibernateTemplate$14.doInHibernate( HibernateTemplate.java:295) at org.springframework.orm.hibernate.HibernateTemplate.execute(Hibernate Template.java:150) at org.springframework.orm.hibernate.HibernateTemplate.delete(HibernateT emplate.java:293) at com.cnetnetworks.service.psp.catalog.test.HibernateCatalogDaoAdminImp lTest.deleteTable(HibernateCatalogDaoAdminImplTest.java:34) at com.cnetnetworks.service.psp.catalog.test.CatalogDaoImplTest.testDele te(CatalogDaoImplTest.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)
|
|