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: net.sf.hibernate.MappingException: No persister for
PostPosted: Wed Oct 20, 2004 6:36 pm 
Newbie

Joined: Wed Oct 20, 2004 6:09 pm
Posts: 1
I am running an application that uses Hibernate on both a Tomcat server, and in a Jave GUI. The following code works fine on Tomcat, but fails with a MappingException on the GUI. I am wondering what I am doing wrong.

Transaction t = session.beginTransaction();
try {
session.save(job);
t.commit();
}
catch (HibernateException e) {
t.rollback();
throw e;
}
finally {
session.close();
}

Here is the stack trace.

ERROR [] - No persister for: com.onerealm.solx.wfg.run.WfgJob
net.sf.hibernate.MappingException: No persister for: com.onerealm.solx.wfg.run.WfgJob
at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:347)
at net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2690)
at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2697)
at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:763)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)

However, the startup log shows that Hibernate successfully read the mapping files.

INFO [main] - Mapping resource: com/onerealm/solx/wfg/run/WfgJob.hbm.xml
INFO [main] - Mapping class: com.onerealm.solx.wfg.run.WfgJob -> wfg_job
INFO [main] - Mapping resource: com/onerealm/solx/wfg/run/WfgJobStep.hbm.xml
INFO [main] - Mapping class: com.onerealm.solx.wfg.run.WfgJobStep -> wfg_job_step
INFO [main] - processing one-to-many association mappings
INFO [main] - Mapping collection: com.onerealm.solx.wfg.run.WfgJob.steps -> wfg_job_step
INFO [main] - processing one-to-one association property references
INFO [main] - processing foreign key constraints
INFO [main] - Using dialect: net.sf.hibernate.dialect.MySQLDialect

Any suggestions will be gratefully received.
Thanks, Alec


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.