6 Replies Latest reply on Aug 29, 2006 3:21 AM by Kurt Edegger

    DVDstore application with persistence allowing server restar

    Kurt Edegger Newbie

      Hi,

      I'm toying with the dvdstore example application and would like to achieve a more real life szenario by getting persistence over jboss server restarts. By default the application is completely reset to its initial state after a server restart.
      So I changed the property "hbm2ddl.auto" in hibernate.cfg.xml from "create-drop" to "update". The server starts up fine the first time and the scheme is created successfully. But on each subsequent (re)start the deployment of the application fails with a RuntimeException[1] stating that a process definition couldn't be deployed.

      Why would seam try to put an already defined process again into the database? How do I achieve the requirement to allow persistence ocross server restarts without loosing business data?

      Any pointers appreciated!

      Thanks, Kurt

      [1] The server log showing the exception:


      2006-08-24 12:08:17,390 INFO [STDOUT] Hibernate: select processdef0_.ID_ as ID1_18_, processdef0_.NAME_ as NAME2_18_, processdef0_.VERSION_ as VERSION3_18_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_18_, processdef0_.STARTSTATE_ as STARTSTATE5_18_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc limit ?
      2006-08-24 12:08:17,451 INFO [STDOUT] Hibernate: select nextval ('hibernate_sequence')
      2006-08-24 12:08:17,482 ERROR [STDERR] java.lang.RuntimeException: could not deploy a process definition
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.core.Jbpm.installProcessDefinitions(Jbpm.java:167)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.core.Jbpm.startup(Jbpm.java:58)
      2006-08-24 12:08:17,482 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,482 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,482 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,482 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.Component.callComponentMethod(Component.java:1334)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.Component.callCreateMethod(Component.java:1322)
      2006-08-24 12:08:17,482 ERROR [STDERR] at org.jboss.seam.Component.newInstance(Component.java:1312)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1263)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.Component.getInstance(Component.java:1253)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:125)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:104)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.init.Initialization.init(Initialization.java:196)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.WebModule.startModule(WebModule.java:83)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.WebModule.startService(WebModule.java:61)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      2006-08-24 12:08:17,497 ERROR [STDERR] at $Proxy0.start(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      2006-08-24 12:08:17,497 ERROR [STDERR] at $Proxy43.start(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      2006-08-24 12:08:17,497 ERROR [STDERR] at $Proxy44.start(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,497 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      2006-08-24 12:08:17,497 ERROR [STDERR] at $Proxy6.deploy(Unknown Source)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      2006-08-24 12:08:17,497 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,512 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
      2006-08-24 12:08:17,512 ERROR [STDERR] at $Proxy0.start(Unknown Source)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.ServiceController.start(ServiceController.java:417)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,512 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      2006-08-24 12:08:17,512 ERROR [STDERR] at $Proxy4.start(Unknown Source)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      2006-08-24 12:08:17,512 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      2006-08-24 12:08:17,512 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      2006-08-24 12:08:17,512 ERROR [STDERR] at $Proxy5.deploy(Unknown Source)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:464)
      2006-08-24 12:08:17,512 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
      2006-08-24 12:08:17,512 ERROR [STDERR] Caused by: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [org.jbpm.graph.def.ProcessDefinition#1]
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:537)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:525)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.hibernate.impl.SessionImpl.save(SessionImpl.java:521)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:77)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
      2006-08-24 12:08:17,512 ERROR [STDERR] at org.jboss.seam.core.Jbpm.installProcessDefinitions(Jbpm.java:162)
      2006-08-24 12:08:17,512 ERROR [STDERR] ... 154 more
      2006-08-24 12:08:17,512 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/seam-dvd]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.RuntimeException: could not deploy a process definition
      at org.jboss.seam.core.Jbpm.installProcessDefinitions(Jbpm.java:167)
      at org.jboss.seam.core.Jbpm.startup(Jbpm.java:58)


        • 1. Re: DVDstore application with persistence allowing server re
          Norman Richards Master

          I can't reproduce this problem, but if you don't want the process definition deployed at startup, then look at the Jbpm component configuration in components.xml. Remove the ordermanagement1.jpdl.xml process from the list of process to deploy and you should be good.

          • 2. Re: DVDstore application with persistence allowing server re
            Kurt Edegger Newbie

            HI,

            thank you for your response. I've tried your suggestion and removed the processDefinition from components.xml starting off from a completely functional copy, but then Seam can't create the new process anymore because none of the jbpm related tables are created in the database at server startup.
            Obviously an exception[1] is thrown when the order is submit. Why is the Jbpm-component not initialized, if I don't define a processDefinition in components.xml?
            After putting the process definition back into components.xml everythings working - just as before, but I'm still loosing orders between server restarts.

            Any pointers?

            Thanks, Kurt

            [1]

            2006-08-25 08:47:18,113 INFO [STDOUT] Hibernate: select nextval ('hibernate_sequence')
            2006-08-25 08:47:18,113 INFO [org.jbpm.JbpmConfiguration] using jbpm configuration resource 'jbpm.cfg.xml'
            2006-08-25 08:47:21,191 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] schema export unsuccessful
            java.sql.SQLException: You cannot set autocommit during a managed transaction!
             at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:482)
            

            and further down the line:
            2006-08-25 08:47:21,410 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 42P01
            2006-08-25 08:47:21,410 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: relation "jbpm_processdefinition" does not exist
            2006-08-25 08:47:21,629 ERROR [STDERR] org.hibernate.exception.SQLGrammarException: could not execute query
             at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
             at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
            


            • 3. Re: DVDstore application with persistence allowing server re
              Norman Richards Master

              Sorry. I can't reproduce anything close to this behavior starting from the DVD Store in CVS. If you post a minimal change set from the DVD Store, I'll be glad to give it a shot.

              • 4. Re: DVDstore application with persistence allowing server re
                Kurt Edegger Newbie

                Thank you Norman to stick to the topic!
                I've solved the initial issue by updatiung both the persistence.xml AND hibernate.cfg.xml (create-drop to update). So the DVD Store keeps it's orders over server restarts.
                Albeit I'm still having this behavior that no database tables are created at startup (auto.ddl set to create!), if I drop the line deploying the processdefinition in components.xml.
                I'm using PostgresSQL 8.1 instead of HSQL DB - may this be an issue?
                Any pointers?

                Regards, Kurt

                • 5. Re: DVDstore application with persistence allowing server re
                  Norman Richards Master

                  Yes, if you take the process line out, the process won't deploy. I had assumed that you already had a deployed database with the process definition in it. If you don't, then you need to work out a strategy for creating processes. You can see the processDefinitionSwitcher component for the easiest way to do that. In fact, you can probably log in as admin after deploying and use the switcher to load your process definition into the database right now. I haven't tried that, but I'm pretty sure it would work.

                  • 6. Re: DVDstore application with persistence allowing server re
                    Kurt Edegger Newbie

                    If I take the process line out, I'd expect the jbpm component still to be initialized and the jbpm-related tables to be created. Just the actual process definition shouldn't be deployed to the database, right?
                    Instead of getting this behavior, none of the jbpm_* named tables are created at startup anymore.
                    Interestingly, the component org.jboss.seam.core.jbpm shows up in the list of managed components at server startup, but no tables are created, even if auto.ddl is set to create.
                    Is the property "processDefinitions" mandatory?
                    If I put the line back in, everythings fine again.

                    Regards, Kurt