Configuring Apache Tomcat for Oracle 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 for the Apache Tomcat Server, you must manually set up and configure your Oracle database and then the Apache Tomcat Server for Oracle. Complete the Oracle database setup procedure before continuing.
- Add the Oracle JDBC driver to the Tomcat lib directory. For JDBC, modify worklight.properties as follows:
wl.db.type=ORACLE wl.db.url= jdbc:oracle:thin:@ host_ip_address:1521/WRKLGHT wl.reports.db.type=ORACLE wl.reports.db.url=jdbc:oracle:thin:@ host_ip_address:1521/WLREPORT wl.db.username=worklight wl.db.password=worklight reports.exportRawData=trueFor JNDI, update the $TOMCAT_HOME/conf/web.xml file as follows:
<web-app> .... .... <resource-ref> <res-ref-name>jdbc/WorklightDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <resource-ref> <res-ref-name>jdbc/WorklightDS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </web-app>
- Update the $TOMCAT_HOME/conf/context.xml file as follows:
<Context> ... <Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/WorklightDS" password="worklight" username="worklight" type="javax.sql.DataSource" url="jdbc:oracle:thin:@host_ip_address:1521/ORCL"/> <Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" name="jdbc/WorklightReportsDS" password="worklight" username="worklight" type="javax.sql.DataSource" url="jdbc:oracle:thin:@ host_ip_address:1521/ORCL"/> ... </Context>
Parent topic Troubleshooting