7 Replies Latest reply on May 21, 2010 8:48 AM by newbeewan

    Unable to load JBPM 4.3 in spring web application context

    newbeewan

      Hi,

       

      I have a trouble to deploy my application in web context on tomcat, I get a classcast exception :

      2010-05-18 15:25:19,285 [ERROR] org.springframework.web.context.ContextLoader  - Context initialization failed
      java.lang.ClassCastException: org.jbpm.jpdl.internal.model.JpdlProcessDefinition cannot be cast to org.jbpm.pvm.internal.model.ProcessDefinitionImpl
              at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.execute(ProcessDefinitionQueryImpl.java:72)
              at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:71)
              at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.list(ProcessDefinitionQueryImpl.java:141)
              at org.jbpm.pvm.internal.repository.ProcessDeployer.checkKey(ProcessDeployer.java:134)
              at org.jbpm.pvm.internal.repository.ProcessDeployer.deploy(ProcessDeployer.java:93)
              at org.jbpm.pvm.internal.repository.DeployerManager.deploy(DeployerManager.java:46)
              at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:61)
              at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
              at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
              at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
              at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)
              at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
              at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:55)
              at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
              at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
              at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
              at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:91)

      ...

       

      It's very strange, because in unit test I have never get that !

       

      Everything is like my context is deployed 2 times and as if the 2 contexts are melting some classes !

       

      I manage to deploye my application 1 time on a standalone server, and if I want to redeploy it I've got that exception !

      Is there any issue with a classloader ?

       

      When I manage to load may webapp there are some sql requests regularly :

      Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
      Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
      Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
      Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
      Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?

       

      Have you got any idea ?

       

      Regards

        • 1. Re: Unable to load JBPM 4.3 in spring web application context
          walterjs

          Yes it looks like a classloader issue to me. I'm not familiar with tomcat, but make sure that it is not loading the jbpm jar in two classloaders.

           

          Cheers

          Walter

          • 2. Re: Unable to load JBPM 4.3 in spring web application context
            mwohlf

            the selects are pretty normal, it's the JobExecutor doing its work and polling the database for new jobs...

             

            someone else had a similar classloading problem some time ago:

            http://community.jboss.org/message/538997

             

            In case this is really a classloading issue:

            Tomcat has a feature that serializes and saves session data and maybe other stuff between restart, you can turn that off by

            setting:

             

            <Manager pathname="" />
               

            in tomcat's context.xml, maybe this is worth a try...

            • 3. Re: Unable to load JBPM 4.3 in spring web application context
              newbeewan

              Thanks for the info but it doesn't help.

               

              I add a context.xml with :

              <?xml version="1.0" encoding="UTF-8"?>
              <Context antiJARLocking="true" path="/my-jbpm-webapp">
                <Manager pathname=""/>
              </Context>
              

               

              And it doesn't change anything...

               

              The only workaround (heavy !) is :

              • undeploy from tomcat,
              • restart tomcat,
              • redeploy the application...

              It's not really a good solution, but I can continue to work ahead, before finding for a better solution !

               

              The thread you point is interesting, but I'm not using jbpm installation tools, i'm using maven to build.

              My theory is jbpm stay loaded when trying to redeploy so the new classloader is in conflic with the previously loaded one...

               

              There is a background task launching an hibernate session regularly as I see some SQL request launch every 5 seconds :

              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKEXPTIME_ is null or jobimpl0_.LOCKEXPTIME_<=?) and (jobimpl0_.DUEDATE_ is null or jobimpl0_.DUEDATE_<=?) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              Hibernate: select jobimpl0_.DBID_ as DBID1_6_, jobimpl0_.DBVERSION_ as DBVERSION3_6_, jobimpl0_.DUEDATE_ as DUEDATE4_6_, jobimpl0_.STATE_ as STATE5_6_, jobimpl0_.ISEXCLUSIVE_ as ISEXCLUS6_6_, jobimpl0_.LOCKOWNER_ as LOCKOWNER7_6_, jobimpl0_.LOCKEXPTIME_ as LOCKEXPT8_6_, jobimpl0_.EXCEPTION_ as EXCEPTION9_6_, jobimpl0_.RETRIES_ as RETRIES10_6_, jobimpl0_.PROCESSINSTANCE_ as PROCESS11_6_, jobimpl0_.EXECUTION_ as EXECUTION12_6_, jobimpl0_.CFG_ as CFG13_6_, jobimpl0_.SIGNAL_ as SIGNAL14_6_, jobimpl0_.EVENT_ as EVENT15_6_, jobimpl0_.REPEAT_ as REPEAT16_6_, jobimpl0_.CLASS_ as CLASS2_6_ from JBPM4_JOB jobimpl0_ where (jobimpl0_.LOCKOWNER_ is null) and jobimpl0_.RETRIES_>0 and jobimpl0_.STATE_<>'suspended' order by jobimpl0_.DUEDATE_ asc limit ?
              

               

              I suspect that thread to never been stopped so the old classloader is never dereferenced ...

               

              I manage to identify it, it is the DispatcherThread which is launching jobexecutor every 5 seconds.

               

              Is there a possibility to stop that thread (with an application listener for example or a spring lifecycle listener) ?

               

              Regards

              • 4. Re: Unable to load JBPM 4.3 in spring web application context
                newbeewan

                I add a PreDestroy annoted method to close cleanly the ProcessEngine and stop DispacherThread (according to the close method from ProcessEngineImpl)...

                 

                The thread is effectivelly cleanly interrupted but it doesn't help to unload the context

                 

                I have tried to deploy my webapp on the target portal (liferay + glassfish), and it is worth, the application stops its deploiment just after loading hibernate session !

                 

                I have also tried glassfish 3 without liferay, deploiment issues are the same I had on tomcat !

                 

                If anybody have a genuis idea, it may be the good one !

                 

                Regards

                • 5. Re: Unable to load JBPM 4.3 in spring web application context
                  swiderski.maciej

                  Hi,

                   

                  please take a look at following discussion: http://community.jboss.org/message/538490

                   

                  Seems like similar problem that is worth trying.

                   

                  HTH

                  Maciej

                  • 6. Re: Unable to load JBPM 4.3 in spring web application context
                    newbeewan

                    I've justed test it, remplacing my @PreDestroy annotation, I've got that messages :

                    2010-05-20 09:37:48,648 [INFO ] org.springframework.web.context.support.XmlWebApplicationContext  - Closing Root WebApplicationContext: startup date [Thu May 20 09:36:59 CEST 2010]; root of context hierarchy
                    2010-05-20 09:37:48,648 [DEBUG] mypackage.internal.jbpm.ExtendedProcessEngine  - ApplicationClosedEvent fired !
                    2010-05-20 09:37:48,648 [INFO ] mypackage.internal.jbpm.ExtendedProcessEngine  - Terminating ProcessEngine !...2010-05-20 09:37:48,649 [INFO ] org.jbpm.pvm.internal.jobexecutor.DispatcherThread  - inactive job dispatcher thread 'DispatcherThread' got interrupted
                    2010-05-20 09:37:48,649 [INFO ] org.jbpm.pvm.internal.jobexecutor.DispatcherThread  - DispatcherThread leaves cyberspace

                     

                    My "ExtendedProcessEngine" is only a wrapper implementing ProcessEngine and ApplicationListener

                        @Override
                        public void onApplicationEvent(ContextClosedEvent event) {
                            logger.info("Terminating ProcessEngine !...");
                            processEngine.close();
                            processEngine =  null;
                        }

                     

                    It doesn't help for reloading context

                     

                    The only positive point is DispatcherThread and ProcessEngine seem to be correctly unloaded...

                     

                    Any other idea ?

                    • 7. Re: Unable to load JBPM 4.3 in spring web application context
                      newbeewan

                      Finally, I found it !

                       

                      It is an ugly maven dependency for jbpm-api to jboss-j2ee !

                       

                      I don't know if it's really used but excuding it solve my reloading issue !

                       

                              <dependency>
                                  <groupId>org.jbpm.jbpm4</groupId>
                                  <artifactId>jbpm-api</artifactId>
                                  <version>4.3</version>
                                  <exclusions>
                                      <exclusion>
                                          <artifactId>jboss-j2ee</artifactId>
                                          <groupId>jboss</groupId>
                                      </exclusion>
                                  </exclusions>
                              </dependency>

                       

                      Regards