Scarab has been developed with database independence in mind, however our primary goal is to make Scarab work with MySQL. Therefore, our support for other RDBM's is largely untested. We are relying on the user community in order to help us test and develop further support for other databases. This document outlines the steps that we think are required to get Scarab working with Oracle. Community feedback on this document will help improve things for others.
In order to get Torque to generate the right Scarab .sql files for Oracle, try the following:
scarab.database.host=localhost scarab.database.port= scarab.database.url= scarab.database.admin.url= scarab.database.type=oracle scarab.database.jdbc.driver=oracle.jdbc.driver.OracleDriver scarab.database.username= scarab.database.password= scarab.database.admin.username= scarab.database.admin.password=Note: Effective with version 1.0 beta 12, it is no longer necessary to addscarab.database.validationQuery=SELECT 1 FROM DUAL
scarab.database.validationQuery
to build.properties.
It is automatically added when scarab.database.type
is set to oracle.
There is also some more discussion and information in this reported issue.
BLOB
java.lang.RuntimeException: Please check turbine.log for more info: Failed to retrieve users: ORA-00932: inconsistent datatypes
at org.tigris.scarab.om.ScarabModule.getUsers(ScarabModule.java:164)
at org.tigris.scarab.tools.ScarabRequestTool.getUsers(ScarabRequestTool.java:1856)
(remainder of stack trace omitted)
A workaround is to edit the webapps/scarab/WEB-INF/sql/turbine.sql file,
and change the columns defined as BLOB
to VARCHAR2(4000).
An alternate workaround would be to edit
webapps/scarab/WEB-INF/src/torque/templates/sql/base/oracle/db.props
and change the line which reads
VARBINARY = BLOBto be
VARBINARY = VARCHAR2(4000)This has the slight advantage of being slightly more persistent - the only time that this file changes is when a new version of Torque is added into Scarab, or when "ant clean" or "ant clean-all" is run.