Jbilling Postgresql database initialisation

rad's Avatar

rad

28 Feb, 2017 08:12 PM

Hi !

I am not able to find the database initialisation scripts as per the instructions mentioned here >http://www.jbilling.com/documentation/users/database-guide
I am not able to find the "db-samples' in the resources folder. I also tried downloading the source but could not find the files there also.
How can I initialise the postgres database ?
I am working with the > Jbilling-community-4.1.1.zip
What am I doing wrong ?
Any help will be appreciated.

Cheers

Rad

  1. 1 Posted by ahmed.drira@gma... on 28 Feb, 2017 08:52 PM

    ahmed.drira@gmail.com's Avatar

    Hi ,
    db initialization can be done when you are compiling from source by
    executing the script prepareTest located under scripts folder ...
     otherwise it seem that you are using the packaged release , this one is
    using an embedded h2 database ...
    if you are looking for a db i can send you a clean db with test data

  2. 2 Posted by rad on 28 Feb, 2017 09:46 PM

    rad's Avatar

    Hi !

    Thank you.

    So does that mean I can not use Postgresql for packaged release ?
    It did work with the built in db .
    So you say I have to compile if want to use postgresql.
    It is not very clear in the documentation.

    I will be glad if you could send me the db .

    Cheers

    Rad

  3. 3 Posted by ahmed.drira@gma... on 28 Feb, 2017 09:51 PM

    ahmed.drira@gmail.com's Avatar

    Hi
    it can run with the postgres db , you have to make change on the
    configuration DataSource.groovy and provide the driver for your db engine ,

    i will upload and share the db tomorow

  4. 4 Posted by rad on 28 Feb, 2017 10:22 PM

    rad's Avatar

    Hi !

    Thank you.

    So in addition to making changes in the DataSource.groovy , I have to provide the driver also ?
    Hmm , looks like it is messy affair.Can you point me to correct reference for doing this correctly ?
    Or you think it is better to take the compile route ?

    Cheers

    Rad

  5. 5 Posted by ahmed.drira@gma... on 28 Feb, 2017 10:52 PM

    ahmed.drira@gmail.com's Avatar

    Hello i think that there is no public doc but it is so easy to do it , just
    change the h2 config into postgres config . I think it is commented on the
    config file the according to your pg server versiob you have check if the
    jar of the jdbc driver exist on the lib folder , if not just downloaf it
    and put it into this folder , start your server and keep an eyes on the log

  6. 6 Posted by rad on 01 Mar, 2017 01:19 AM

    rad's Avatar

    Hi !
    I thought I will compile as per > http://www.jbilling.com/documentation/developers/building-from-source .
    But I got stuck with the error .

    root@main:~/jbilling-community-4.1.1# grails compile --verbose
    | Error Error occurred running Grails CLI: null
    java.lang.NullPointerException
    at org.grails.cli.GrailsCli.initializeProfile(GrailsCli.groovy:515)
    at org.grails.cli.GrailsCli.initializeApplication(GrailsCli.groovy:306)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:269)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
    | Error Error occurred running Grails CLI: null

    I know I am doing something basically wrong. But I am totally dependent on documentation and I could not find anything. Is there any more prerequisites other than what is mentioned here ? Let me know if this is meant for highly skilled users ?

    Cheers
    Rad

  7. 7 Posted by ahmed.drira@gma... on 01 Mar, 2017 08:52 AM

    ahmed.drira@gmail.com's Avatar

    Hello
    so this is the link to download the db , https://drive.google.com/file/d/0B4Yxh09_V09QV240NHVIbEQyUkk/view?u...
    you can connect with the user admin/Admin123$ and the company is pricing Pony

    wich version of grails are you using ? is you GRAILS_HOME well defined ?
    and which OS are you using ?

  8. 8 Posted by rad on 01 Mar, 2017 12:43 PM

    rad's Avatar

    Hi
    I am using Ubuntu 16 . Grails 3.2.6. I installed using SDK manager as mentioned in the link.
    Yes I have set the GRAILS_HOME variable like this ,

    export GRAILS_HOME=/.sdkman/candidates/grails/3.2.6
    export PATH=$PATH:$GRAILS_HOME/bin

    | Grails Version: 3.2.6
    | Groovy Version: 2.4.7
    | JVM Version: 1.8.0_121

    and still keep getting the same error

    How can I check if everything is correct ?

    cheers

    Rad

  9. 9 Posted by ahmed.drira@gma... on 01 Mar, 2017 12:53 PM

    ahmed.drira@gmail.com's Avatar

    Hello
    with jbilling 4 you have to use grail 2.4.3 with jdk 8 , just download it
    and put it on your home dir then fix you GRAILS_HOME

    when you run the command grails -version it must return ==>
    Grails version: 2.4.3
    then i recommend to use GGTS , groovy grails tools as IDE , download a
    clean source and the import them as a grails project and not a maven
    project , it will automatically load dependency and frails plugin then you
    will face a little problem , you will have an error mention that the is no
    file jbilling.properties , to solve it you copy it from the bundled jbilling
    edition ...
    Finlay : configure your db on DataSource.groovy , run your pg server and on
    the grails command prompt of ggts run clean , preparetest compile and
    run-up :) it will be done

  10. 10 Posted by rad on 01 Mar, 2017 01:03 PM

    rad's Avatar

    Thank you.
    I am not a developer. I just want to try Jbilling..
    I give up on compiling as it is beyond my skills.
    I have come to conclusion that if you are not a developer you should simply use the pre-built package . Even making it work with postgresql is beyond me as the documentation is very patchy.

    Anything else is too adventurous !

    cheers

    Rad

  11. 11 Posted by ahmed.drira@gma... on 01 Mar, 2017 01:34 PM

    ahmed.drira@gmail.com's Avatar

    Yes , if you are not a developer there is a developer like me how can assist you :p
    otherwise , pre-built package is cool to explore it and you can add the postgres db to have more data ;
    have nice day :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

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

Recent Discussions

11 Apr, 2018 04:35 AM
10 Apr, 2018 04:19 PM
28 Mar, 2018 10:39 AM
15 Mar, 2018 08:23 AM
26 Feb, 2018 11:19 AM

 

07 Feb, 2018 02:33 AM
07 Feb, 2018 02:31 AM
07 Feb, 2018 02:30 AM
25 Jan, 2018 03:48 PM
12 Jan, 2018 02:45 PM
12 Jan, 2018 04:48 AM