-->
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.  [ 2 posts ] 
Author Message
 Post subject: net.sf.hibernate.MappingException: No persister for:
PostPosted: Mon Jan 05, 2004 9:16 am 
Newbie

Joined: Tue Sep 23, 2003 7:02 am
Posts: 16
Hi I guess I am being an idiot but I have no Idea that when I run the following query this excepption is thrown.

The strange thing is that the first time the query runs it works fine but the second time it runs it says that I do not have a
persister for an object that it should not even know about in the first place.

query = "select RssItem from RssItem as RssItem where external_id = :id";

My persistent object is RssItem not RssItemBean but hibernate still insists that I need a mapping.

Configuration classes......

public static Class[] persistantClasses = {Topic.class, VideoCategory.class
, Video.class, Image.class, IntroMedia.class, RssItem.class, TopicItems.class,
RssFeed.class, TopicFeeds.class, CateVid.class, Advert.class, TopVideo.class, LoginUser.class, TopicAdvert.class};

The XML config files that relate to these classes at no point reference a RssItemBean object. How does hibernate know it even exisists????
And why does the quey run once and then fail the second time....


net.sf.hibernate.MappingException: No persister for: sportal.business.beans.RssItemBean

net.sf.hibernate.persister.ClassPersister net.sf.hibernate.impl.SessionFactoryImpl.getPersister(java.lang.Class)

SessionFactoryImpl.java:426

net.sf.hibernate.persister.ClassPersister net.sf.hibernate.impl.SessionImpl.getPersister(java.lang.Class)

SessionImpl.java:2248

net.sf.hibernate.persister.ClassPersister net.sf.hibernate.impl.SessionImpl.getPersister(java.lang.Object)

SessionImpl.java:2255

java.io.Serializable net.sf.hibernate.impl.SessionImpl.getEntityIdentifierIfNotUnsaved(java.lang.Object)

SessionImpl.java:2306

java.io.Serializable net.sf.hibernate.type.EntityType.getIdentifier(java.lang.Object, net.sf.hibernate.engine.SessionImplementor)

EntityType.java:54

void net.sf.hibernate.type.ManyToOneType.nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int, net.sf.hibernate.engine.SessionImplementor)

ManyToOneType.java:33

void net.sf.hibernate.collection.CollectionPersister.writeElement(java.sql.PreparedStatement, java.lang.Object, boolean, net.sf.hibernate.engine.SessionImplementor)

CollectionPersister.java:347

void net.sf.hibernate.collection.Set.writeTo(java.sql.PreparedStatement, net.sf.hibernate.collection.CollectionPersister, java.lang.Object, int, boolean)

Set.java:223

void net.sf.hibernate.collection.CollectionPersister.insertRows(net.sf.hibernate.collection.PersistentCollection, java.io.Serializable, net.sf.hibernate.engine.SessionImplementor)

CollectionPersister.java:696

void net.sf.hibernate.impl.ScheduledCollectionUpdate.execute()

ScheduledCollectionUpdate.java:45

void net.sf.hibernate.impl.SessionImpl.executeAll(java.util.Iterator)

SessionImpl.java:2063

void net.sf.hibernate.impl.SessionImpl.execute()

SessionImpl.java:2038

boolean net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(java.util.Set)

SessionImpl.java:1552

net.sf.hibernate.hql.QueryTranslator[] net.sf.hibernate.impl.SessionImpl.getQueries(java.lang.String, boolean)

SessionImpl.java:1358

java.util.List net.sf.hibernate.impl.SessionImpl.find(java.lang.String, java.lang.Object[], net.sf.hibernate.type.Type[], net.sf.hibernate.engine.RowSelection, java.util.Map)

SessionImpl.java:1318

java.util.List net.sf.hibernate.impl.QueryImpl.list()

QueryImpl.java:68

java.lang.Object immedea.webkit.framework.PersistentSession.loadObject(java.lang.String, java.lang.String)

PersistentSession.java:101

immedea.webkit.loader.AssetPublisher sportal.business.beans.RssItemBean.findAssetByExternalID(java.lang.String)

RssItemBean.java:154

void immedea.webkit.loader.AssetDataSet.processPublishedAsset(java.lang.String, immedea.webkit.loader.AssetPublisher, boolean)

AssetDataSet.java:247

void immedea.webkit.loader.AssetDataSet.processAssociations(immedea.webkit.loader.Asset, immedea.webkit.loader.AssetPublisher)

AssetDataSet.java:285

void immedea.webkit.loader.AssetDataSet.processPublishedAsset(java.lang.String, immedea.webkit.loader.AssetPublisher, boolean)

AssetDataSet.java:252

void immedea.webkit.loader.AssetDataSet.processAssociations(immedea.webkit.loader.Asset, immedea.webkit.loader.AssetPublisher)

AssetDataSet.java:285

void immedea.webkit.loader.AssetDataSet.processPublishedAsset(java.lang.String, immedea.webkit.loader.AssetPublisher, boolean)

AssetDataSet.java:252

void sportal.business.beans.TopicBean.main(java.lang.String[])

TopicBean.java:533


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 1:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Please show your mappings. And please use the preview button, this stack trace is a pain to read.


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

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.