Last modified: 13 March 2025
Application
- Install JRE 11 (if you have not installed it previously).
If you are unsure of the version of Java installed on your system, enter java –version at the command prompt or unix-like shell to display the version of Java. - Unzip the .ZIP file (as relevant to your choice of database) into a directory (C:\ recommended).
- Run the following command, after unzipping, from a command line prompt in the Lib folder:
jarsigner -verify "AppPdrBatcher.jar"
- Remove the delete.me files.
- Edit the pdr_key.properties file in the \lib subdirectory and replace the default values with a 16 digit hexadecimal string of your own choice.
Before starting to configure your installation, ensure you update the 16 digit hexadecimal key in the pdr_key.properties file. Changing the encryption key (hash) ensures any encrypted passwords in your properties file cannot be decrypted using the default and publicly available hash.
- Edit the pdr_log4j.properties file in the \lib subdirectory and update the log4j.appender.fileout.File parameter to redirect the log output file to the desired location.
- Edit the pdrEnvironment file to ensure the PATH environment variable includes a reference to the directory where the Java executable is installed on your system. Ensure the changes are made to the relevant file for your operating system (.BAT file for Windows and .SH file for unix-like systems).
Windows style directories using the backslash operator need to be escaped to be read properly from the properties configuration file. An example of a Windows path for this parameter follows:
log4j.appender.fileout.File=c:\\pdr\\log\\pdr.log
Unix-like paths using the forward slash operator, /, may be entered directly and do not require an escape sequence. An example of a unix-like path for this parameter follows:
log4j.appender.fileout.File=/home/pdr/log/pdr.log
The pdrLoader uses JRE 11. If you have a later version, ensure you change this batch file to reference the appropriate directories for Java. Placing the directory of the Java install at the start of the PATH environment variable ensures the pdrLoader always runs against the correct version of Java.
- For unix-like systems, the following two steps are necessary due to the specific environment in the overall build process for the pdrLoader.
- In the shell scripts (.SH files), each line is terminated with a carriage return and line feed. If your system cannot accept such line termination, remove the carriage returns (for example, as follows, in the \Lib directory):
cat pdrLoader.sh | tr –d ‘\r’ > pdrLoader.sh2
mv pdrLoader.sh2 pdrLoader.sh
repeat the above steps for other *.sh files - The shell scripts (.SH files) do not have execute permission for the unix-like operating system. From within the \Lib directory, allow execution of the shell scripts as follows:
chmod 750 *.sh
- In the shell scripts (.SH files), each line is terminated with a carriage return and line feed. If your system cannot accept such line termination, remove the carriage returns (for example, as follows, in the \Lib directory):
If the distribution file is unzipped to the C:\ subdirectory on a Windows system accessing an Oracle database, the sample application starts by executing pdrLoader.bat with just the editing of hash in pdr_key.properties file and db_user, db_password and db_url, in the pdrLoader.properties file. To observe a file being loaded, copy an existing .CSV file (zipped or unzipped) to the Reports directory. Exercise care to ensure no effect on production operations by running this application.
Directory structure created
Decompressing the distribution file creates a directory (\pdr\loader) with eight sub-directories. One directory (\Lib) contains the application and the other eight are working directories for the pdrLoader:
- Archive: Where the pdrLoader places successfully processed files.
- Error: Where the pdrLoader places files it cannot load into the database.
- Log: Contains log files associated with the pdrLoader processing.
- Reports: Where the pdrLoader searches for files to load into the local database.
- Reports/Queue: Where the pdrLoader places files queued for processing.
- ReportsTrickle: Where the pdrLoader searches for trickled files to load into the database when there are no files in the \Reports directory.
- Request: Where the pdrLoader places request files to send to AEMO.
- Temp: Where the pdrLoader can place temporary work files.
- Performance: Where the pdrLoader stores performance and logging data for ingestion by pdrMonitor.
The application files in the \Lib directory include:
- The application files, being the main application .JAR file (AppPdrLoader.jar) and a suite of third party JAR component libraries upon which pdrLoader depends.
- For the JDBC driver of choice, additional .JAR files (for example, for Oracle, ojdbc8.jar).
- To provide parameters for the running instance, three .properties files (pdrLoader.properties, pdr_log4j.properties and pdr_key.properties).
- To run the application, one .BAT file (pdrLoader.bat) for Windows and one .SH file (pdrLoader.sh) for unix-like systems.
- The definitions of the environment variables required to run the application, being one .BAT file (pdrEnvironment.bat) for Windows and one .SH file (pdrEnvironment.sh) for unix-like systems.
- To generate a support dump file, one .BAT file (pdrLoaderSupportDump.bat) for Windows and one .SH file (pdrLoaderSupportDump.sh) for unix-like systems.
- Five files (pdrServiceInstall.bat, pdrServiceUninstall.bat, WinRun4J.exe, WinRun4J64.exe, and WinRun4J.ini) to support the running of the application as a Windows service.
- SQL files to set up the database:
For Oracle, being oracle_create_pdr.sql and populate_parser_config_metadata.sql.
For SQL Server, being sqlserver_create_pdr.sql, sqlserver_create_pdr_sp_msql.sql and populate_parser_config_metadata.sql.
- SQL files to update an existing database:
For Oracle, being oracle_alter_pdr.sql and populate_parser_config_metadata_delta.sql.
For SQL Server, being sqlserver_alter_pdr.sql and populate_parser_config_metadata_delta.sql.
Each directory, other than \Lib directory, has a placeholder file to cause the creation of each directory during the unzipping process. The placeholder file, named delete.me, needs to be removed from each directory.
Before attempting to run, edit the two .properties files (pdrLoader.properties and pdr_key.properties) to suit your situation (see ApplicationPage 1) and ensure the database has the control and target tables configured.
When setting up the application, the directory structure does not have to be identical to the arrangement detailed in the above table. By modifying the .properties file, the installer can distribute the directories over different locations.