[jboss-user] [JBossWS] - Undeploy processDefnition...

daresan do-not-reply at jboss.com
Tue Feb 27 02:44:56 EST 2007


I am trying to undeploy processdefinition from oracle database by using jbpm api. but it is throughing error. these are follows

code:

JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance(); 
	JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();	
	try { 		
		ProcessDefinition processDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition(processDefn.getName());
		jbpmContext.getGraphSession().deleteProcessDefinition(processDefinition);
	}finally { 
	jbpmContext.close(); 
	} 
	


error:

12:48:23,799 WARN  [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
12:48:23,799 ERROR [JDBCExceptionReporter] ORA-00904: "TEMPLATESE0_"."ID_": inva
lid identifier

12:48:23,831 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could n
ot initialize a collection: [org.jbpm.taskmgmt.def.Task.templateSet#1662789]
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:65)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
        at org.hibernate.loader.Loader.loadCollection(Loader.java:1926)
        at org.hibernate.loader.collection.CollectionLoader.initialize(Collectio
nLoader.java:71)
        at org.hibernate.persister.collection.AbstractCollectionPersister.initia
lize(AbstractCollectionPersister.java:520)
        at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onIn
itializeCollection(DefaultInitializeCollectionEventListener.java:60)
        at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:
1627)
        at org.hibernate.collection.AbstractPersistentCollection.initialize(Abst
ractPersistentCollection.java:344)
        at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPe
rsistentCollection.java:86)
        at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:13
8)
        at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.
java:196)
        at org.hibernate.type.CollectionType.getElementsIterator(CollectionType.
java:188)
        at org.hibernate.engine.CascadingAction.getAllElementsIterator(Cascading
Action.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:2
88)
        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.cascadeBeforeDelet
e(DefaultDeleteEventListener.java:220)
        at org.hibernate.event.def.DefaultDeleteEventListener.deleteEntity(Defau
ltDeleteEventListener.java:169)
        at org.hibernate.event.def.DefaultDeleteEventListener.onDelete(DefaultDe
leteEventListener.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:4
7)
        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:2
90)

i have checked so many messages about this topic
e.g.
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78471 
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=82667

i have tried to delete processinstance before processdefinition
code:
jbpmContext.getGraphSession().deleteProcessInstance(pi);

but still i am not able to undeploy

if someone who has  encountered this problem can u plz help me out regarding this.

thanks in advance

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022891#4022891

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022891



More information about the jboss-user mailing list