Problem when run jBilling source

mrtrinhviet's Avatar

mrtrinhviet

May 02, 2013 @ 08:51 AM

Hi jBilling team.
I have installed step by step as your guide in "http://www.jbilling.com/documentation/developers/building-from-source" but I got problem when i ran "grails prepare-test" command. Please see my log file which attach here for more detail.
Note: I run on Window XP Professional SP3.

  1. 1 Posted by Mirta Iva on Feb 28, 2014 @ 03:58 PM

    Mirta Iva's Avatar

    Hi Mrtrinhviet,

    Your error log says: Cannot run program "psql": CreateProcess error=2, The system cannot find the file specified.

    The psql.exe is a part of the PostgreSQL installation. Have you installed the PostgreSQL?

    If the answer is yes, it could be that the part of the system which interprets Groovy scripts cannot reach the PostgreSQL executable file psql.exe. I had the same problem with dropdb and createdb and I overcame it by adding the whole path of the PostgreSQL bin folder into the script PrepareTestDb.groovy like this:

    ...

    def psqlpath = "C:/Program Files/PostgreSQL/9.3/bin"

    ... println "Dropping a database: ${database}..." // call postgresl to drop database exec(executable: "${psqlpath}/dropdb", failonerror: false) { arg(line: "-U ${username} -e ${database}") } println "Done."

    println "Creating a database: ${database}..."
    // call postgresl to create database
    exec(executable: "${psqlpath}/createdb", failonerror: true) {
        arg(line: "-U ${username} -O ${username} -E UTF-8 -e ${database}")
    }
    println "Done."
    

    ...

    And it works for now. I'm not sure this is the best way to solve this issue since this is the hardcoded path, depending on location of the PostgreSQL installation, so if anyone knows better solution, please share it. Thank you!

    Kindest regards,
    Mirta

  2. Support Staff 2 Posted by Technical Suppo... on Jan 21, 2015 @ 10:42 AM

    Technical Support's Avatar

    Please let us know If you are still facing same issue .

    Thanks
    Technical Support Team.

Reply to this discussion

Internal reply

        No formatting (switch to Markdown)

        Already uploaded files

        • Error_log.txt 7.22 KB

          You can attach files up to 10MB

            If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

              Keyboard shortcuts

              Generic

              ? Show this help
              ESC Blurs the current field

              Comment Form

              r Focus the comment reply box
              ^ + ↩ Submit the comment

              You can use Command ⌘ instead of Control ^ on Mac