1 2 Previous Next 19 Replies Latest reply on May 30, 2008 9:36 AM by Felipe Fornachari

    Error in Process Definition Deployment.

    nassij zouhair Newbie

      Hi,

      I tried to deploy my process definition, but i received this error :


      org.jbpm.JbpmException: couldn't find process definition 'ValidationFicheIncident'

      Cause:

      org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery

      Do we have to make specific change in database configuration.
      Could anyone help me in sorting out the problem
      Below is the code which i tried.

      Thanks in advance.
      public static void deployProcess(String path, JbpmContext jbpmCtx){
       FileInputStream fis = null;
       try {
       fis = new FileInputStream(path);
       if (fis != null)
       System.out.println("------------>Fichier de process trouvé !!");
      
       ProcessDefinition processDefinition = ProcessDefinition.parseXmlInputStream(fis);
       try {
       jbpmCtx.deployProcessDefinition(processDefinition);
       } catch (Exception e2) {
       e2.printStackTrace();
       } finally {
       jbpmCtx.close();
       }
       } catch (FileNotFoundException e1) {
       System.out
       .println("------------> Aucune Trace du Fichier de process !!");
       e1.printStackTrace();
       }
       }


        • 1. Re: Error in Process Definition Deployment.
          suresh kumar gandham Newbie


          Hi,

          Can u please provide complete details as below:

          Which version of JBPM r you using?

          Exception clearly telling there is no method like findLatestProcessDefinitionQuery in GraphSession.

          whether u modified hibernate-queries.xml file


          Thanks & Regards,
          Suresh



          • 2. Re: Error in Process Definition Deployment.
            suresh kumar gandham Newbie



            Hi,

            I verified with the code, there is no problem with that.

            Please give me an update for my previous mail so that we can understand what is the problem.

            Thanks & Regards,
            Suresh

            • 3. Re: Error in Process Definition Deployment.
              Felipe Fornachari Newbie

              Hi gandhamsuresh,

              I am having a problem very similar with nassij's problem.
              I have a process that I deployed using the eclipse and I can run it from the jBPM Console.
              Now, I would like to run the process from my own java application. I tried the code below:

              try
               {
               jbpmConfiguration = JbpmConfiguration.parseResource("default.jbpm.cfg.xml");
               JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
               GraphSession gpSession = jbpmContext.getGraphSession();
              
               ProcessDefinition pdef = gpSession.findLatestProcessDefinition("request");
               ProcessInstance instance = pdef.createProcessInstance();
              
               //set initial value
               instance.getContextInstance().setVariable("infoDoc ", "Test Information");
              
               Token token = instance.getRootToken();
               token.signal();
              
               String infoDoc = (String)instance.getContextInstance().getVariable("infoDoc ");
               System.out.println("#############Documento Information: "+infoDoc );
              
               jbpmContext.close();
               }
              
               catch(Exception ex)
               {
               System.out.println("#########ERROR--> "+ex.getMessage());
               }


              But I received this error:


              14:45:19,294 [main] ERROR JDBCExceptionReporter : Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
              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)
               at org.hibernate.loader.Loader.doList(Loader.java:2223)
               at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
               at org.hibernate.loader.Loader.list(Loader.java:2099)
               at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
               at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
               at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
               at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
               at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
               at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
               at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
               at ClientApp.main(ClientApp.java:24)
              Caused by: java.sql.SQLException: Table not found in statement [select top ? processdef0_.ID_ as ID1_4_, processdef0_.NAME_ as NAME3_4_, processdef0_.DESCRIPTION_ as DESCRIPT4_4_, processdef0_.VERSION_ as VERSION5_4_, processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN6_4_, processdef0_.STARTSTATE_ as STARTSTATE7_4_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by processdef0_.VERSION_ desc]
               at org.hsqldb.jdbc.Util.throwError(Unknown Source)
               at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
               at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
               at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:505)
               at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:423)
               at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
               at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
               at org.hibernate.loader.Loader.doQuery(Loader.java:673)
               at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
               at org.hibernate.loader.Loader.doList(Loader.java:2220)
               ... 10 more
              14:45:19,497 [main] ERROR GraphSession : org.hibernate.exception.SQLGrammarException: could not execute query
              ############--->ERROR--> couldn't find process definition 'request'
              


              I am using the jBPM 3.2.2 and I did not configure a database, I am using the default configuration. I thing that the default is the Hypersonic SQL, that came pre-configured. So I didn't create any table.

              I searched and found that probably the problem is with hibernate, in the file default.jbpm.cfg.xml. But I don't know where specifically is the problem in the file default.jbpm.cfg.xml, and I don't know how fix it. I am new with hibernate.

              Any idea? Any help?
              Thank you very much in advance!!

              • 4. Re: Error in Process Definition Deployment.
                Mauricio Salatino Master

                Are you using Hypersonic DB??
                or you change the database??

                • 5. Re: Error in Process Definition Deployment.
                  Felipe Fornachari Newbie

                   

                  "salaboy21" wrote:
                  Are you using Hypersonic DB??
                  or you change the database??


                  I didn't change anything, I am using Hypersonic DB!

                  Any idea?

                  Thank for your reply!

                  • 6. Re: Error in Process Definition Deployment.
                    Ronald van Kuijk Master

                    most likely (very likely even) your app and the jbpm jar it is using is not using the same databasetables as the console is

                    • 7. Re: Error in Process Definition Deployment.
                      Felipe Fornachari Newbie

                       

                      "kukeltje" wrote:
                      most likely (very likely even) your app and the jbpm jar it is using is not using the same databasetables as the console is


                      How could I fix it?

                      Thank you for your reply!

                      • 8. Re: Error in Process Definition Deployment.
                        Felipe Fornachari Newbie

                        Any idea, any help, please?

                        I tried the websale example, that came with jBPM 3.2.2, and the same thing happens!

                        • 9. Re: Error in Process Definition Deployment.
                          Felipe Fornachari Newbie

                          This is the hibernate.cfg.xml code of my app:

                          <?xml version='1.0' encoding='utf-8'?>
                          
                          <!DOCTYPE hibernate-configuration PUBLIC
                           "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
                          
                          <hibernate-configuration>
                           <session-factory>
                          
                           <!-- hibernate dialect -->
                           <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
                          
                           <!-- JDBC connection properties (begin) -->
                           <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                           <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
                           <property name="hibernate.connection.username">sa</property>
                           <property name="hibernate.connection.password"></property>
                           <!-- JDBC connection properties (end) -->
                          
                           <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                          
                           <!-- DataSource properties (begin) ===
                           <property name="hibernate.connection.datasource">java:/JbpmDS</property>
                           ==== DataSource properties (end) -->
                          
                           <!-- JTA transaction properties (begin) ===
                           <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
                           <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                           ==== JTA transaction properties (end) -->
                          
                           <!-- CMT transaction properties (begin) ===
                           <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
                           <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
                           ==== CMT transaction properties (end) -->
                          
                           <!-- logging properties (begin) ===
                           <property name="hibernate.show_sql">true</property>
                           <property name="hibernate.format_sql">true</property>
                           <property name="hibernate.use_sql_comments">true</property>
                           ==== logging properties (end) -->
                          
                           <!-- ############################################ -->
                           <!-- # mapping files with external dependencies # -->
                           <!-- ############################################ -->
                          
                           <!-- following mapping file has a dependendy on -->
                           <!-- 'bsh-{version}.jar'. -->
                           <!-- uncomment this if you don't have bsh on your -->
                           <!-- classpath. you won't be able to use the -->
                           <!-- script element in process definition files -->
                           <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
                          
                           <!-- following mapping files have a dependendy on -->
                           <!-- 'jbpm-identity.jar', mapping files -->
                           <!-- of the pluggable jbpm identity component. -->
                           <!-- Uncomment the following 3 lines if you -->
                           <!-- want to use the jBPM identity mgmgt -->
                           <!-- component. -->
                           <!-- identity mappings (begin) -->
                           <mapping resource="org/jbpm/identity/User.hbm.xml"/>
                           <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
                           <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
                           <!-- identity mappings (end) -->
                          
                           <!-- following mapping files have a dependendy on -->
                           <!-- the JCR API -->
                           <!-- jcr mappings (begin) ===
                           <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
                           ==== jcr mappings (end) -->
                          
                          
                           <!-- ###################### -->
                           <!-- # jbpm mapping files # -->
                           <!-- ###################### -->
                          
                           <!-- hql queries and type defs -->
                           <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
                          
                           <!-- graph.action mapping files -->
                           <mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>
                          
                           <!-- graph.def mapping files -->
                           <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
                           <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
                          
                           <!-- graph.node mapping files -->
                           <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
                          
                           <!-- context.def mapping files -->
                           <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
                           <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
                          
                           <!-- taskmgmt.def mapping files -->
                           <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
                          
                           <!-- module.def mapping files -->
                           <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
                          
                           <!-- bytes mapping files -->
                           <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
                          
                           <!-- file.def mapping files -->
                           <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
                          
                           <!-- scheduler.def mapping files -->
                           <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
                           <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
                          
                           <!-- graph.exe mapping files -->
                           <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
                          
                           <!-- module.exe mapping files -->
                           <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
                          
                           <!-- context.exe mapping files -->
                           <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
                          
                           <!-- job mapping files -->
                           <mapping resource="org/jbpm/job/Job.hbm.xml"/>
                           <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
                           <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
                           <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
                          
                           <!-- taskmgmt.exe mapping files -->
                           <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
                          
                           <!-- logging mapping files -->
                           <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
                           <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
                           <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
                           <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
                           <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
                          
                           </session-factory>
                          </hibernate-configuration>
                          


                          And the jbpm-ds.xml is below:

                           <?xml version="1.0" encoding="UTF-8" ?>
                          - <datasources>
                          - <local-tx-datasource>
                           <jndi-name>JbpmDS</jndi-name>
                           <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}jbpmDB</connection-url>
                           <driver-class>org.hsqldb.jdbcDriver</driver-class>
                           <user-name>sa</user-name>
                           <password />
                           <min-pool-size>1</min-pool-size>
                           <max-pool-size>5</max-pool-size>
                           <idle-timeout-minutes>0</idle-timeout-minutes>
                           <track-statements />
                          - <!--
                          
                           <security-domain>HsqlDbRealm</security-domain>
                          
                          
                           -->
                           <prepared-statement-cache-size>32</prepared-statement-cache-size>
                          - <metadata>
                           <type-mapping>Hypersonic SQL</type-mapping>
                           </metadata>
                           <depends>jboss:service=Hypersonic,database=jbpmDB</depends>
                           </local-tx-datasource>
                          - <mbean code="org.jboss.jdbc.HypersonicDatabase" name="jboss:service=Hypersonic,database=jbpmDB">
                           <attribute name="Database">jbpmDB</attribute>
                           <attribute name="InProcessMode">true</attribute>
                           </mbean>
                           </datasources>
                          


                          I searched in the internet and I tried to change this lines in the hibernate.cfg.xml:

                           <!-- JDBC connection properties (begin) ===
                           <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                           <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
                           <property name="hibernate.connection.username">sa</property>
                           <property name="hibernate.connection.password"></property>
                           === JDBC connection properties (end) -->
                          
                           <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                          
                           <!-- DataSource properties (begin) -->
                           <property name="hibernate.connection.datasource">java:/JbpmDS</property>
                           <!-- DataSource properties (end) -->
                          


                          But didn't work, the error changed to "Could not find datasource".
                          Any idea, please??
                          Thank you!

                          • 10. Re: Error in Process Definition Deployment.
                            Martin Weiler Apprentice

                             

                            "kukeltje" wrote:
                            most likely (very likely even) your app and the jbpm jar it is using is not using the same databasetables as the console is


                            How could I fix it?


                            search for all hibernate.cfg.xml files in your deploy directory, and don't forget to check *inside* jar archives as well

                            But didn't work, the error changed to "Could not find datasource".
                            Any idea, please??


                            On which server are you running on? JBoss, Tomcat, ...?

                            You should provide some details regarding your environment, and also about what you have deployed there in respect to jBPM, eg. your custom jBPM based application, the jbpm-console.war, etc.

                            • 11. Re: Error in Process Definition Deployment.
                              Felipe Fornachari Newbie

                              Ok mputz and thank you for your reply!

                              I downloaded the file jbpm-jpdl-suite-3.2.2.zip, that came with hibernate, hypersonic db, the jbpm 3.2.2 and the jboss (everything that I need, I think), so I am working with the Jboss that came with this file and the hypersonic DB. I didn't change anything, I am using the default configurations of all (the jboss, hibernate, config files, hypersonic db...)
                              I am using Windows XP.

                              I did a simple workflow, like the websale example. I deployed it from eclipse and I can run it from the jBPM Console. Now I want to run it from my java application, but I receive the error "couldn't find process definition "NameOfMyProcess"". My java application code, the complete error message, and config files are above, in my other comments.


                              Any help would be appreciate!
                              Any other information that I can tell you, please, ask me!
                              Thank you!

                              • 12. Re: Error in Process Definition Deployment.
                                Martin Weiler Apprentice

                                 

                                My java application code, the complete error message, and config files are above, in my other comments.


                                what is still missing is the structure of your application.

                                For your convenience, here's a bare minimal application that could run the application code you posted:

                                /home/mputz/jboss/work/jbpm-jpdl-suite-3.2.2/server/server/jbpm/deploy/jbpm-test.war/
                                |-- WEB-INF
                                | |-- classes
                                | | `-- hibernate.cfg.xml
                                | |-- lib
                                | | |-- jbpm-identity.jar
                                | | `-- jbpm-jpdl.jar
                                | `-- web.xml
                                `-- index.jsp
                                


                                where
                                * 'hibernate.cfg.xml' is just the same as the one deployed in /jbpm-jpdl-suite-3.2.2/server/server/jbpm/deploy/jbpm-console.war/WEB-INF/classes/hibernate.cfg.xml,
                                * web.xml has only empty web-app tags and
                                * index.jsp contains your code.


                                Hope this helps a bit finding the culprit in your environment.

                                • 13. Re: Error in Process Definition Deployment.
                                  Felipe Fornachari Newbie

                                  Mputz

                                  The structure of my application is correct, thank you.
                                  I tried to use the hibernate.cfg.xml that you said (jbpm-console.war) and tried to intance my process like the java code I posted above, but I receivied the error "Could not find datasource"

                                  But when I start the process from the jBPM Console, it works fine.

                                  The differences from the hibernate.cfg.xml file that I was using from the hibernate.cfg.cml file that I tried now (the file that you said) are the following lines:

                                  hibernate.cfg.xml that I was using - Receive the error: "couldn't find process definition NameofMyProcess'"

                                   <!-- JDBC connection properties (begin) -->
                                   <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                                   <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
                                   <property name="hibernate.connection.username">sa</property>
                                   <property name="hibernate.connection.password"></property>
                                   <!-- JDBC connection properties (end) -->
                                  
                                   <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                                  
                                   <!-- DataSource properties (begin) ===
                                   <property name="hibernate.connection.datasource">java:/JbpmDS</property>
                                   ==== DataSource properties (end) -->


                                  Hibernate.cfg.xml file that I tried now (jbpm-console.war) - Receive the error "Could not find datasource":
                                   <!-- JDBC connection properties (begin) ===
                                   <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                                   <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
                                   <property name="hibernate.connection.username">sa</property>
                                   <property name="hibernate.connection.password"></property>
                                   ==== JDBC connection properties (end) -->
                                  
                                   <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
                                  
                                   <!-- DataSource properties (begin) -->
                                   <property name="hibernate.connection.datasource">java:/JbpmDS</property>
                                   <!-- DataSource properties (end) -->
                                  


                                  I just posted the differents lines between the two files, the other lines are the same for both files.

                                  Any idea?

                                  • 14. Re: Error in Process Definition Deployment.
                                    Ronald van Kuijk Master

                                    AHHHHH.... (sorry Martin) This is the second time that people do not know that in memory hsql databases are not shared.... and in this case they do not ecen point to the same database, one in memory and one as a datasource..... please learn hibernate a little, learn how datasources work, learn .....

                                    1 2 Previous Next