4 Replies Latest reply on Feb 21, 2005 6:23 PM by joff

    Hibernate stops working when app is redeployed

    daborg

      Hi,

      We have a problem with Hibernate on JBoss 3.2.3.

      When we redeploy our application, Hibernate stops working.

      More specifically, we get this error when trying to access Hibernate objects:

      "net.sf.hibernate.MappingException: No persister for: <persistent object class>"

      To get it working, we have to restart JBoss. This is obviously a pain in the neck.

      Does anyone have any ideas what could be causing this problem?

      Any help would be gratefully received!

        • 1. Re: Hibernate stops working when app is redeployed

          I saw a similar problem with cglib hanging onto old classes.
          Is cglib in your application or server/default/lib?

          • 2. Re: Hibernate stops working when app is redeployed
            joff

            I'm having the exact same problem as daborg, Hibernate 2.1.5, JBoss 4.0.1

            I've tried it both with the hibernate and related jars in both /lib/ and inside the sar i'm using to deploy hibernate (which itself is in an EAR)

            Is there a fix / workaround / solution to this problem?

            • 3. Re: Hibernate stops working when app is redeployed
              joff

              (oops, I guess angle brackets in posts aren't a good idea, anyway, to continue...)

              I've tried it both with the hibernate and related jars in both the server/lib/ dir and in the SAR file i'm using to deploy hibernate (which in turn is contained in an EAR)

              Is there a fix / workaround / solution for this at all??

              • 4. Re: Hibernate stops working when app is redeployed
                joff

                i've redeployed hibernate in a HAR archive in my application.. and also tried deploying it outside of the application EAR... still no joy at all

                here's a stacktrace (of sorts):

                12:20:54,206 FATAL [narthex] No persister for: com.securepayline.narthex.customer.merchantentity.Merchant
                12:20:54,206 FATAL [narthex]
                12:20:54,206 FATAL [narthex] net.sf.hibernate.impl.SessionFactoryImpl.getPersister(SessionFactoryImpl.java:347)
                12:20:54,206 FATAL [narthex] net.sf.hibernate.impl.SessionImpl.getClassPersister(SessionImpl.java:2690)
                12:20:54,206 FATAL [narthex] net.sf.hibernate.impl.SessionImpl.getOuterJoinLoadable(SessionImpl.java:3630)
                12:20:54,207 FATAL [narthex] net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3595)
                12:20:54,207 FATAL [narthex] net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
                12:20:54,207 FATAL [narthex] com.securepayline.narthex.customer.jobs.MonthlyBillingJob.runDirectMerchJob(MonthlyBillingJob.java:135)
                12:20:54,207 FATAL [narthex] com.securepayline.narthex.customer.jobs.MonthlyBillingJob.execute(MonthlyBillingJob.java:89)
                12:20:54,207 FATAL [narthex] org.quartz.core.JobRunShell.run(JobRunShell.java:191)
                12:20:54,207 FATAL [narthex] org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
                12:20:54,615 ERROR [narthex] Caught exception in job: null
                


                Any ideas? Should I open a bug on this?