6 Replies Latest reply on Oct 1, 2009 6:05 AM by elhostis

    hibernate.cfg.xml not found

    elhostis

      Hi,

      I have a problem to deploy my application in production.

      I have a projet named "Workflow" which use jBPM. It works fine.
      I have a second project named "appTCP" which use the "Workflow" project. It works fine in my dev environment.

      Now, I have to deploy these projects in production, and when I test the "appTCP" project, I have the message hibernate.cfg.xml not found. But i don't know where jBPM is searching the file.

      My config :

      static{
       jbpmConfiguration = JbpmConfiguration.parseXmlString(
       "<jbpm-configuration>" +
       " <jbpm-context>" +
       " <service name='persistence' " +
       " factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />" +
       " </jbpm-context>" +
       " <string name='resource.hibernate.cfg.xml' value='hibernate.cfg.xml' />" +
       "</jbpm-configuration>"
       );


      I try to use a real path like /home/appTCP/hibernate.cfg.xml but I doesn't work. Any idea to help me ?

      Tks a lot.

      Eric

        • 1. Re: hibernate.cfg.xml not found
          kukeltje

          It should be on the classpath.

          • 2. Re: hibernate.cfg.xml not found
            elhostis

             

            "kukeltje" wrote:
            It should be on the classpath.


            What do you mean by "on the classpath" ?

            I launch my project with this command :

            java -classpath
            /usr/share/java/mysql.jar:
            /usr/share/java/hibernate/hibernate3.jar:
            /usr/share/java/dom4j/dom4j-1.6.1.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/log4j.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/coucheMetier.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/coucheMetier2.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/jdom.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/workflow.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/jbpm-3.1.1.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/lib/ext/commons-logging.jar:
            /home/projet/liferay-portal-5.2.3/tomcat-6.0.18/appTCP/appTCP.jar:
            /home/config/hibernate.cfg.xml smartagsw.smartouch.appTCP.Server
            


            I have the config file in the classpath (in bold), but the problem still exixts.

            • 3. Re: hibernate.cfg.xml not found
              kukeltje

              jbpm 3.1.1?

              If it works in dev, but not production, I'd look into the differences between those first

              • 4. Re: hibernate.cfg.xml not found
                elhostis

                I think the problem is on the java command.

                In dev, I use Eclipse to test my application.
                In production, I use the java command. Something is missing, but why ?

                I use jBPM 3.1.1, so what ?

                • 5. Re: hibernate.cfg.xml not found
                  kukeltje

                  You cannot put individual files on the classpath, only archives (zip, jar) and directories. Change /home/config/hibernate.cfg.xml to /home/config

                  And regarding 3.1.1, there also is a 3.1.4 and even that is 'old'. When starting a new project (as you seem to do since it has not run in production) I'd certainly switch to at least 3.2.6SP1

                  • 6. Re: hibernate.cfg.xml not found
                    elhostis

                     

                    "kukeltje" wrote:
                    You cannot put individual files on the classpath, only archives (zip, jar) and directories. Change /home/config/hibernate.cfg.xml to /home/config


                    It was that ! Thanks a lot !

                    "kukeltje" wrote:
                    And regarding 3.1.1, there also is a 3.1.4 and even that is 'old'. When starting a new project (as you seem to do since it has not run in production) I'd certainly switch to at least 3.2.6SP1


                    It's not a new project. The old project was running with jBPM 3.1.1 but I never understood how the config file was found because the file was not in the classpath. Now, I understand.

                    But, you've probably right. I should upgrade my jBPM... I will see with my boss.

                    Thks again.