-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: No persister exception upon delete with query
PostPosted: Mon Aug 30, 2004 2:35 pm 
Newbie

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)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.