0
votes

When trying to configurating Worklight Server with ant script, it fails.

The Oracle server is listening on non-default ports and there are not properties to set the port. Since the configuration with ant script is broken we decided to create the tables manually using the sql scripts:

http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.deploy.doc/devref/r_ant_tasks_configure_dbs.html

Buildfile: /IBM/Worklight/WorklightServer/configuration-samples/configure-liberty-oracle.xml install: BUILD FAILED /IBM/Worklight/WorklightServer/configuration-samples/configure-liberty-oracle.xml:101: Element inside : attribute combination , server is invalid: port

  • Worklight Server: 6.1 version
  • OS: RedHat Linux
  • Remote Oracle Server: 11.2.0.4
3

3 Answers

1
votes

In Worklight 6.1, the sample ant files in /WorklightServer/configuration-samples do not contain the field to define the Oracle Listener port. However, it is possible to define it:

The port attribute is documented table 10 of http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.deploy.doc/devref/r_ant_tasks_configure_db_reference.html. You should add it wherever the oracle element appears in your ant files (to be absolutely correct the reference for the oracle element in the configureapplication server task is in the table 25 of http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/topic/com.ibm.worklight.deploy.doc/devref/r_ant_tasks_configure_appserver_reference.html)

An other way is to launch the Worklight Server Configuration Tool on Windows or Linux (requires graphic capabilities)- if you have the same type of application server than your target on the machine (type = WAS ND, or WAS standalone, or Tomcat or Liberty). THen create a configuration and export the ant file. It should have all the attributes you need for your configuration and you just need to modify the properties.

0
votes

Add in the below property right after property name="oracle.database.name"

<property name="oracle.database.port" value="1526"/>

The question has already been asked here Changing port value configureApplicationServer attribute Worklight

0
votes

Ok I have figured out the solution finally, in the configure-liberty-oracle.xml file, there is a section where we normally change the values. However, for the port to change we have to change it at few other places. Specifically under the Target name="databases" area

The easiest method to make sure that the port is added in all required places is to find for "${oracle.database.server}" and right after this add port="1526"

below is how it will look like after edit

  <target name="databases">
    <configuredatabase kind="Worklight">
      <oracle database="${oracle.database.name}" server="${oracle.database.server}" port="1526"
              user="${oracle.worklight-database.username}" password="${oracle.worklight-database.password}"
              SYSTEMPassword="${oracle.database.system.password}">
        <dba user="${oracle.databases.admin.username}" password="${oracle.databases.admin.password}"/>
      </oracle>

The same edit will be required in configuredatabases kind="WorklightReports", database kind="Worklight", and database kind="WorklightReports" sections.