4 Replies Latest reply on Dec 8, 2006 1:17 AM by anu123suya

    Problem in deploying the processDefinition.xml

    anu123suya Newbie

      I am a newbie to JBPM 3.1.2 and need to deploy a simple processdefinition to the Jboss app server and hsql db.

      Took the jbpm.sar and the db script from the starter kit.

      I tried the following deployment ways

      1. When tried to deploy the process definition from eclipse, I got a succes msg. but the Database tables for this process is not updated.

      2. When I tried to deploy it programmaticaly with the following code,

      JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("META-INF/processdefinition.xml");
      jbpmContext.deployProcessDefinition(processDefinition);


      getting the following exception.

      Can anyone suggest me the steps to deploy the processdefinition.xml and invocation of the process.

      Thanks




      java.lang.NullPointerException
      at net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(CacheMa
      nager.java:269)
      at net.sf.ehcache.CacheManager.configure(CacheManager.java:252)
      at net.sf.ehcache.CacheManager.init(CacheManager.java:196)
      at net.sf.ehcache.CacheManager.(CacheManager.java:183)
      at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:
      180)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
      a:1213)
      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory
      (DbPersistenceServiceFactory.java:90)
      at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPers
      istenceService.java:74)
      at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
      Service.java:78)
      at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersis
      tenceService.java:217)
      at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
      at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
      at org.apache.jsp.Testdeploy_jsp._jspService(Testdeploy_jsp.java:51)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
      .java:332)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
      14)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)




        • 1. Re: Problem in deploying the processDefinition.xml
          Tom Baeyens Master

          you are using another ehcache on the same classpath

          • 2. Re: Problem in deploying the processDefinition.xml
            anu123suya Newbie

            Thanks..

            In my Jboss server there are 2 ehcache jar jn both Portal.sar and JBPM.sar.
            so i removed ehcache from portal.sar.

            but even now i am getting the following exception. please could you let me know the root cause of the problem


            java.lang.IllegalAccessError: tried to access method net.sf.ehcache.CacheManager
            .()V from class org.hibernate.cache.EhCacheProvider
            at org.hibernate.cache.EhCacheProvider.start(EhCacheProvider.java:124)
            at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:
            180)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
            a:1213)
            at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory
            (DbPersistenceServiceFactory.java:90)
            at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPers
            istenceService.java:74)
            at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistence
            Service.java:78)
            at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersis
            tenceService.java:217)
            at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:537)
            at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
            at org.apache.jsp.Testdeploy_jsp._jspService(Testdeploy_jsp.java:51)
            at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
            .java:332)
            at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
            14)
            at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
            lter.java:96)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
            alve.java:213)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
            alve.java:178)
            at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
            yAssociationValve.java:175)
            at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
            e.java:74)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
            ava:126)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
            ava:105)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
            ve.java:107)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
            a:148)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
            :869)
            at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
            rocessConnection(Http11BaseProtocol.java:664)
            at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
            int.java:527)
            at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
            kerThread.java:112)
            at java.lang.Thread.run(Thread.java:534)

            • 3. Re: Problem in deploying the processDefinition.xml
              Tom Baeyens Master

              you need to CONFIGURE ehcache for each session factory separately, i think.

              • 4. Re: Problem in deploying the processDefinition.xml
                anu123suya Newbie

                It got deployed. Thanks Tom.

                If anyone interested, this is what done to resolve the issue.
                the hibernate should be configured to identify the ehcache class and the ehcache.xml file.
                this can be done either in the .properties file or in the .cfg.xml file and this file should be in the classpath.

                hibernate.properties file contains
                hibernate.cache.provider_class=net.sf.ehcache.hibernate.EhCacheProvider
                net.sf.ehcache.configurationResourceName=/ehcache.xml