4 Replies Latest reply on Dec 1, 2005 11:15 PM by Anamica rama

    Deploying the par file

    Anamica rama Newbie

      Hi,
      I am new to JBPM and using version 3.0.2 I am trying to deploy the par file from eclipse IDE to HSQL db using ant build script. I kept all the required jars in the build path.

      it looks like

      <target name="deploy.process.archives" depends="deploy.par" description="deploys the process archive">
       <deploypar par="target/par/testprocess.par" properties="src/config/jbpm.properties">
       <fileset dir="target/par" includes="*.par" />
       </deploypar>
       </target>
      
      <target name="deploy.par">
       <taskdef name="deploypar" classname="org.jbpm.ant.DeployParTask">
       <classpath refid="classpath"/>
       </taskdef>
       </target>



      While runnig the above script, getting the error like Resource: org/jbpm/msg/Message.hbm.xml not found. Can any one help me on this. Thanks in advance.


      complete trace as follows,
      -------------------------------
      -------------------------
      Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.ByteArrayInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.DateInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.DoubleInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.HibernateLongInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.HibernateStringInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.LongInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.HbmBinder bindSubclass
      [deploypar] INFO: Mapping subclass: org.jbpm.context.exe.variableinstance.StringInstance -> JBPM_VARIABLEINSTANCE
      [deploypar] Dec 1, 2005 5:31:02 PM org.hibernate.cfg.Configuration addResource
      [deploypar] INFO: Mapping resource: org/jbpm/msg/Message.hbm.xml
      [deploypar] org.hibernate.MappingException: Resource: org/jbpm/msg/Message.hbm.xml not found
      [deploypar] at org.hibernate.cfg.Configuration.addResource(Configuration.java:447)
      [deploypar] at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1263)
      [deploypar] at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1235)
      [deploypar] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1217)
      [deploypar] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184)
      [deploypar] at org.hibernate.cfg.Configuration.configure(Configuration.java:1112)
      [deploypar] at org.hibernate.cfg.Configuration.configure(Configuration.java:1098)
      [deploypar] at org.jbpm.db.JbpmSessionFactory.createConfiguration(JbpmSessionFactory.java:114)
      [deploypar] at org.jbpm.db.JbpmSessionFactory.createConfiguration(JbpmSessionFactory.java:102)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createConfiguration(AntTaskJbpmSessionFactory.java:97)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getConfiguration(AntTaskJbpmSessionFactory.java:57)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createJbpmSessionFactory(AntTaskJbpmSessionFactory.java:74)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getJbpmSessionFactory(AntTaskJbpmSessionFactory.java:38)
      [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:32)
      [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
      [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
      [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      [deploypar] couldn't create configuration: Resource: org/jbpm/msg/Message.hbm.xml not found
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createConfiguration(AntTaskJbpmSessionFactory.java:113)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getConfiguration(AntTaskJbpmSessionFactory.java:57)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createJbpmSessionFactory(AntTaskJbpmSessionFactory.java:74)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getJbpmSessionFactory(AntTaskJbpmSessionFactory.java:38)
      [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:32)
      [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
      [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
      [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      [deploypar] couldn't create JbpmSessionFactory: couldn't create configuration: Resource: org/jbpm/msg/Message.hbm.xml not found
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createJbpmSessionFactory(AntTaskJbpmSessionFactory.java:81)
      [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getJbpmSessionFactory(AntTaskJbpmSessionFactory.java:38)
      [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:32)
      [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
      [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
      [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)


        • 1. Re: Deploying the par file
          Koen Aers Master

          You are probably using a hibernate.cfg.xml from the 3.1 alpha release. The message stuff is in that branch and not in the 3.0.

          Regards,
          Koen

          • 2. Re: Deploying the par file
            Anamica rama Newbie

            Thanks for your reply. That error has gone. Now I am getting the following exception
            hibernate.properties file contains the following & it is in the path

            hibernate.dialect=org.hibernate.dialect.HSQLDialect
            hibernate.connection.driver_class=org.hsqldb.jdbcDriver
            hibernate.connection.url=jdbc:hsqldb:hsql://localhost:1701
            hibernate.connection.username=sa
            hibernate.connection.password=

            hibernate.show_sql=true
            hibernate.c3p0.min_size=1
            hibernate.c3p0.max_size=3




            [deploypar] log4j:WARN No appenders could be found for logger (org.jbpm.ant.AntTaskJbpmSessionFactory).
            [deploypar] log4j:WARN Please initialize the log4j system properly.
            [deploypar] org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
            [deploypar] at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
            [deploypar] at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
            [deploypar] at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
            [deploypar] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
            [deploypar] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1797)
            [deploypar] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1125)
            [deploypar] at org.jbpm.db.JbpmSessionFactory.buildSessionFactory(JbpmSessionFactory.java:138)
            [deploypar] at org.jbpm.db.JbpmSessionFactory.(JbpmSessionFactory.java:77)
            [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createJbpmSessionFactory(AntTaskJbpmSessionFactory.java:77)
            [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getJbpmSessionFactory(AntTaskJbpmSessionFactory.java:38)
            [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:32)
            [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
            [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
            [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
            [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
            [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
            [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
            [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
            [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
            [deploypar] couldn't create JbpmSessionFactory: Hibernate Dialect must be explicitly set
            [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.createJbpmSessionFactory(AntTaskJbpmSessionFactory.java:81)
            [deploypar] at org.jbpm.ant.AntTaskJbpmSessionFactory.getJbpmSessionFactory(AntTaskJbpmSessionFactory.java:38)
            [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:32)
            [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
            [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
            [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
            [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
            [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
            [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
            [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
            [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

            Could you help me on this.

            Regards,
            Anamica

            • 3. Re: Deploying the par file
              Hannes Stillerich Newbie

              Maybe the property file don't got read.
              the line in the 'hibernate.properties' corresponds to
              the tag:

              <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>

              in the 'hibernate.cfg.xml'
              Imho the xml is dominating, so check if the tag is there.


              • 4. Re: Deploying the par file
                Anamica rama Newbie

                The property file got read and in the console I am getting like


                [deploypar] 09:42:04,581 [main] INFO Environment : Hibernate 3.1 beta 3
                [deploypar] 09:42:04,597 [main] INFO Environment : loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=org.hsqldb.jdbcDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.c3p0.max_size=3, hibernate.dialect=org.hibernate.dialect.HSQLDialect, hibernate.c3p0.min_size=1, hibernate.connection.username=sa, hibernate.connection.url=jdbc:hsqldb:hsql://10.145.3.183:1701, hibernate.show_sql=true, hibernate.connection.password=****}
                [deploypar] 09:42:04,597 [main] INFO Environment : using CGLIB reflection optimizer



                and in the XML file the tag is like

                <hibernate-configuration>
                <session-factory>
                org.hibernate.dialect.HSQLDialect..
                ...........




                Can anyone help one this.
                Thanks,
                Anamica