-
1. Re: douplicate process definitions after redeploy
sunfire Nov 16, 2005 12:18 PM (in response to sunfire)"SunFire" wrote:
<property name="hibernate.hbm2ddl.auto">update</property> is in my hibernate.cfg.xml so that an instanced process would survive a redeploy.<property name="hibernate.hbm2ddl.auto">update</property>
that is ;) -
2. Re: douplicate process definitions after redeploy
koen.aers Nov 17, 2005 3:04 AM (in response to sunfire)It is not necessary to specify this property for the running instances to survive a redeploy. They survive automatically.
Regards,
Koen -
3. Re: douplicate process definitions after redeploy
sunfire Nov 25, 2005 9:48 AM (in response to sunfire)"koen.aers@jboss.com" wrote:
It is not necessary to specify this property for the running instances to survive a redeploy. They survive automatically.
If I don't set hibernate.hbm2ddl.auto at all I am getting15:40:57,828 WARN [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02 15:40:57,828 ERROR [JDBCExceptionReporter] Table 'test.jbpm_processdefinition' doesn't exist 15:40:57,828 INFO [STDOUT] org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.graph.def.ProcessDefinition]
And if I set it to create-drop all jbpm tables are being dropped if I redeploy my ejb3 with the processes in them.
And finaly if set to "update" it creates a new additional process definition for every redeploy of the ejb3.
So how does jBPM persist already started workflows if not in the tables? I start to think that I may have missed some fundamental part of the whole jBPM idea? :(
Thanks -
4. Re: douplicate process definitions after redeploy
koen.aers Nov 27, 2005 2:43 PM (in response to sunfire)You have to use update. jBPM will increment the version numbers of any process with the same name as the one being redeployed. Instances that are already running will continue to run in the vesion they were started from, new instances will run in the newly deployed version.
Regards,
Koen -
5. Re: douplicate process definitions after redeploy
jcox1 Jan 4, 2007 1:05 PM (in response to sunfire)I don't think the question was answered, so I'll restate it.
Each time the application deploys inside the J2EE container, jBPM is creating new definitions of the same process. This leads to much database bloat if you've got more than a few non-trivial business processes.
The hibernate.hbm2ddl.auto=update setting controls the creation of the tables in which the workflows are defined.
The question is how do we as jBPM users keep jBPM from redefining the workflow each time the container restarts or redeploys? It is not a hibernate issue since we can control when hibernate recreates or updates the tables, but is a jBPM deployment issue to keep it from continuing defining new processes that are not necessary.
Thanks,
Jack -
6. Re: douplicate process definitions after redeploy
kukeltje Jan 4, 2007 3:04 PM (in response to sunfire)jBPM by itself does not deploy anything. If procesessdefinitions are redeployed that might be because seam does it that way (if you use seam). I did not use seam with jBPM yet and never experienced anything like this.
-
7. Re: douplicate process definitions after redeploy
jcox1 Jan 4, 2007 3:16 PM (in response to sunfire)You are correct about it being a Seam thing, because this is occurring within a seam environment. My understanding is that in a vanilla jBPM environment, the application must deploy the workflows in code.
Where as with Seam the workflows are automatically deployed when the application starts (or restarts). -
8. Re: douplicate process definitions after redeploy
kukeltje Jan 4, 2007 6:26 PM (in response to sunfire)> vanilla jBPM....
Or via the designer or some other 'process'... -
9. Re: douplicate process definitions after redeploy
koen.aers Jan 10, 2007 7:02 AM (in response to sunfire)If SEAM is redeploying the process definitions when starting the applications, then probably you should post the issue on their forum. Probably they should have a mechanism preventing redeployment.
Regards,
Koen -
10. Re: douplicate process definitions after redeploy
kukeltje Jan 10, 2007 8:05 AM (in response to sunfire)He already did.... and Norman said to whisper something in the jBPM forum. That is why I revived the versioning topic :-)
-
11. Re: douplicate process definitions after redeploy
koen.aers Jan 10, 2007 8:14 AM (in response to sunfire)All right, so now we only need a solution... :-P
-
12. Re: douplicate process definitions after redeploy
rabbiaqaswar Jan 17, 2007 1:08 AM (in response to sunfire)hello
i am using JBoss jboss-4.0.5 and i commented the default value of hibernate.hbm2ddl.auto = create in persistence.properties and set it in the persistence.xml file as hibernate.hbm2ddl.auto = update.
My tables already exist in the database. I dont want to to create new tables everytime the application is deployed on the JBoss. But now when i deploy my application on JBoss with the value of hibernate.hbm2ddl.auto set to 'update' i get the following exception:09:54:18,483 WARN [JDBCExceptionReporter] SQL Error: 1031, SQLState: 42000 09:54:18,483 ERROR [JDBCExceptionReporter] ORA-01031: insufficient privileges 09:54:18,483 ERROR [SchemaUpdate] could not complete schema update org.hibernate.exception.SQLGrammarException: could not get table metadata: CUSTOMERS at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:100) at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:878) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:688) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence. java:127) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
Please help! -
13. Re: douplicate process definitions after redeploy
kukeltje Jan 17, 2007 5:43 AM (in response to sunfire)Wrong forum... ask in the hibernate forum...