MappingException...

Help
2005-05-16
2013-04-25
  • digitaldreamer

    digitaldreamer - 2005-05-16

    Hi,

    I am trying to persist some new items using Hibernate and PersistenceManager.updateGroup() but I get the following Exception:

    Caused by: net.sf.hibernate.MappingException: No persister for: de.nava.informa.impl.basic.Item

        at net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:344)

        at net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2681)

        at net.sf.hibernate.impl.SessionImpl.getPersister(SessionImpl.java:2688)

        at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1374)

        at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)

        at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:482)

        at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1467)

        at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1385)

        at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)

        at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)

        at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:482)

        at net.sf.hibernate.impl.SessionImpl.doUpdate(SessionImpl.java:1467)

        at net.sf.hibernate.impl.SessionImpl.update(SessionImpl.java:1347)

        at de.nava.informa.utils.manager.hibernate.HibernateUtil.updateObject(HibernateUtil.java:238)

        ... 3 more

    I do i need an xml mapping file on the claspath?

     
    • Niko Schmuck

      Niko Schmuck - 2005-05-17

      inside informa.jar there should be several hibernate descriptor files under the path: /de/nava/informa/impl/hibernate with the ending *.hbm.xml, other wise the hibernate persistence manager won't work.

      -- Niko

       
    • digitaldreamer

      digitaldreamer - 2005-06-06

      I now understand why I get this exception, from the Persistance Manager Limitations:

      "When working with manager make sure that you are not using externally created objects of the types understood by manager. For example, you may have some ChannelIF objects unserialized from XML or created manually. Using them with manager will not work. Manager implementation is free to support these cases, but it also free to not to do so. Please be careful with where you get your objects."

      So my question is now what is the correct way to update items for a channnel when using the Persistance Manager?
      I am currently using a Poller.

       

Log in to post a comment.