1 Reply Latest reply on May 7, 2007 10:31 AM by Jon Erdman

    BPEL delete process error

    Jon Erdman Newbie

      I am trying to write a simple app that deploys a bpel archive to jbpm bpel and then removes it. The storage is done with the following call:

      context.getGraphSession().saveProcessDefinition(processDef);


      Deletion is done this way:

      graphSession.deleteProcessDefinition(processDef);


      The storage seems to work fine and I can retrieve it correctly, but on the delete I get the following error:

      org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: org.jbpm.bpel.variable.def.SchemaType (loaded object was of wrong class)


      I've tried with both the "hello world" and "atm" example archives and received the same error with both. I've also tried with both the Hypersonic and MySQL DBs with the same results. Does anyone know the cause or solution for this?

      Thanks.

        • 1. Re: BPEL delete process error
          Jon Erdman Newbie

          Here is the full stack trace:

          org.hibernate.WrongClassException: Object with id: 1 was not of the specified subclass: org.jbpm.bpel.variable.def.SchemaType (loaded object was of wrong class)
          at org.hibernate.loader.Loader.instanceAlreadyLoaded(Loader.java:1235)
          at org.hibernate.loader.Loader.getRow(Loader.java:1186)
          at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:569)
          at org.hibernate.loader.Loader.doQuery(Loader.java:689)
          at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
          at org.hibernate.loader.Loader.loadCollection(Loader.java:1919)
          at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:71)
          at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520)
          at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60)
          at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
          at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
          at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
          at org.hibernate.collection.PersistentMap.values(PersistentMap.java:198)
          at org.hibernate.type.MapType.getElementsIterator(MapType.java:39)
          at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.java:188)
          at org.hibernate.engine.CascadingAction.getAllElementsIterator(CascadingAction.java:266)
          at org.hibernate.engine.CascadingAction.access$100(CascadingAction.java:21)
          at org.hibernate.engine.CascadingAction$2.getCascadableChildrenIterator(CascadingAction.java:52)
          at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:288)
          at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
          at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
          at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
          at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
          at org.hibernate.engine.Cascade.cascade(Cascade.java:223)
          at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:220)
          at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:169)
          at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:110)
          at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:764)
          at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:757)
          at org.hibernate.engine.CascadingAction$2.cascade(CascadingAction.java:47)
          at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:213)
          at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:157)
          at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
          at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:290)
          at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:185)
          at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:160)
          at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:108)
          at org.hibernate.engine.Cascade.cascade(Cascade.java:248)
          at org.hibernate.engine.Cascade.cascade(Cascade.java:223)
          at org.hibernate.event.def.DefaultDeleteEventListener.cascadeBeforeDelete(DefaultDeleteEventListener.java:220)
          at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(DefaultDeleteEventListener.java:169)
          at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDeleteEventListener.java:110)
          at org.hibernate.impl.SessionImpl.fireDelete(SessionImpl.java:764)
          at org.hibernate.impl.SessionImpl.delete(SessionImpl.java:743)
          at org.jbpm.db.GraphSession.deleteProcessDefinition(GraphSession.java:236)