Documentation Center

Upgrading JasperReports Server from version 4.2.1 to version 5.2

Starting with version 10.4, the WorldServer distribution archive includes the JasperReports Server (JRS) 5.2 installation kit. However, if you still use JRS 4.2.1 with WorldServer 11.x, you can upgrade to JRS 5.2.

Before you begin

Make sure you have installed Microsoft SQL Management Studio (MSSQL DB) or Oracle SQL Developer (Oracle DB) on your local machine. You also need a working version of WorldServer 11.x (with Java Development Kit 8 and Tomcat 8) on the same machine. JasperReports Server only works with Java Development Kit (JDK) 7 and Tomcat 7, so you cannot use the same Tomcat and JDK versions you used when you installed other WorldServer 11.x components (ws-api, ws, ws-legacy).

About this task

The following procedure applies to upgrading the JasperReports Server engine for WorldServer 11.x. Only users with administrator permissions can install JasperReports Server. You can find the JasperReports Server installation kit on the WorldServer FTP, in <distribution archive>\integrations\JasperSoft_5.2.

Procedure

  1. Go to <js-install>\buildomatic.
  2. Open the command prompt (CMD) as an administrator and enter the following command: js-export.bat --everything --output-zip js-421-export.zip
  3. Back up the current JRS database.
  4. Move <tomcat-home>\webapps\jasperserver-pro to a backup location.
  5. Extract the jasperreports-server-5.2-bin.zip archive to the <js-install> path.
  6. Go to <js-install>\buildomatic\sample_conf and copy the sqlserver_master.properties or oracle_master.properties file (depending on the type of database you have on your local machine) to <js-install>\buildomatic, and then rename it to default_master.properties.
  7. Open the default_master.properties file and set the following properties:
    Property nameDescription
    appServerTypeThis should always be tomcat7.
    appServerDirThis path should be <tomcat-home>\\Reports\\tomcat (for example, C:\\Program Files\\Idiom\\Reports\\tomcat).
    dbTypeDo not change this property.
    dbHostThe name of the database server or its IP address.
    dbUsernameThe username that will be used to log in to the database.
    dbPasswordThe password that will be used to log in to the database. Do not encrypt it.
    sysUsernameOnly on Oracle databases. If you created and deployed the JasperReports Server database automatically by running the <js-install>\buildomatic\js-install.bat minimal command, specify the username of the database administrator. If you created and deployed the database manually, specify the same value as for dbUsername.
    sysPasswordOnly on Oracle databases. If you created and deployed the JasperReports Server database automatically by running the <js-install>\buildomatic\js-install.bat minimal command, specify the password of the database administrator. If you created and deployed the database manually, specify the same value as for dbPassword.
    js.dbNameOptional: If you want to change the name of the database, uncomment this property and specify a new name.
    webAppNameProOptional: If you want to change the folder name (thus, making it part of the URL), uncomment this property and specify a new name.
  8. Make sure the SDL WorldServer Reports service is stopped.
  9. At the command prompt, enter the following command: <js-install>\buildomatic\js-upgrade-newdb.bat -input-zip c:\js-421-export.zip
    JasperReports Server will take a little longer to load when you open it for the first time, because the repository will be upgraded.
  10. Start the SDL WorldServer Reports service.
  11. Open the general.properties file in the WS_CONFIG folder and make sure it contains the following line:
    report_center_url=http://<jasper-IP>:<port>/jasperserver-pro/flow.html?_flowId=searchFlow&mode=search&filderId=resourceTypeFilter&filterOption=respirceTypeFilter-reports
    where <jasper-IP> is the IP address of the machine on which JasperReports Server is installed and <port> is the Tomcat 7 port on which JasperReports Server is installed (by default, 8081). If it does not contain this line, add it yourself.
  12. Restart the SDL WorldServer Reports service.
  13. Depending on how you installed WorldServer 11.x, do one of the following:
    • If you installed WorldServer 11.x by using the installer, restart the Idiom Process Monitor service.
    • If you installed WorldServer 11.x by using Tomcat 8, restart the Apache Tomcat 8 service.
  14. Open JasperReports in your browser: http://<localhost>:<port>/jasperserver-pro/login.html.
    Use the superuser/superuser credentials to log in.
  15. In the WorldServer Report Center, clickView > Repository, and then, in the Folders tree, go to <root> > Organizations > WorldServer > DataSources.
  16. Right-click WorldServerDB, and then click Edit.
  17. On the Set Data Source Type and Properties page, specify the following information:
    FieldValue
    JDBC DriverOther
    JDBC Driver (required)
    • For Microsoft SQL: com.microsoft.sqlserver.jdbc.SQLServerDriver
    • For Oracle: oracle.jdbc.OracleDriver
    URL (required)
    • For Microsoft SQL: jdbc:sqlserver://<host name>:<port>;DatabaseName=<database name>
    • For Oracle: jdbc:oracle:thin:@<host name>:<port>:<SID>

    Make sure you replace <host name>, <port>, and <database name> or <SID> with values that match the configuration of your WorldServer database.

    User Name (required)The user name that will be used to log in to the database.
    PasswordThe password that will be used to log in to the database.
  18. Click Test Connection, and then click Save.

Results

At this point, you should be able to see the reports from Tools > Report Center with JasperReports Server 5.2.