Setting up your Apache Derby database manually

IBM Worklight V5.0.5. automatically configures your databases. However, if you are using an older version of IBM Worklight, or if you are experiencing problems with the automatic configuration process, you must manually set up and configure your Apache Derby database. Complete the following procedure to set up your Apache Derby database.

  1. Create the database schema:

    1. In the location where you want the database to be created, run ij.bat on Windows systems or ij.sh on UNIX and Linux systems. The script displays ij version 10.4.

      Note: The ij program is part of Apache Derby. If you do not already have it installed, you can download it from Apache Derby: Downloads.

    2. At the command prompt, enter the following commands:
      connect 'jdbc:derby:WRKLGHT;create=true;user=worklight;password=worklight';
      run 'worklight_home/path_to_script/createworklight
      -derby.sql';
      connect 'jdbc:derby:WLREPORT;create=true; user=worklight;password=worklight';
      run 'Worklight_home/path_to_script/createworklight
      -reports-derby.sql';
      quit;
      

  2. Create a worklight.properties file. Give the file the following contents, depending on whether you are using JDBC or JNDI.

    1. JDBC version:
      wl.db.jndi.name=
      wl.db.type=DERBY
      wl.db.url=path_to_db/WRKLGHT
      wl.reports.db.type=DERBY
      wl.reports.db.url=path_to_db/WLREPORT
      wl.db.username=worklight
      wl.db.password=worklight
      reports.exportRawData=true
      

    2. JNDI version:
      wl.db.jndi.name=jdbc/WorklightDS
      wl.db.type=DERBY
      wl.reports.db.jndi.name=jdbc/WorklightReportsDS
      wl.reports.db.type=DERBY
      wl.db.username=worklight
      wl.db.password=worklight
      

  3. Replace the WEB-INF/classes/conf/worklight.properties file in worklight.war with the file you created in the previous step.


Parent topic Troubleshooting