-
Notifications
You must be signed in to change notification settings - Fork 5
Specmate with Oracle DB
- Download SQL Developer and Oracle Database (Oracle Database Express Edition (smaller download) or Oracle Database). You have to register.
- Install the Oracle Database. You have to set a password.
- Connect with SQL Developer to the Oracle DB. Create new connection in SQL Developer.
- If you are using a pre-configured VM the credentials may differ. See hints on Oracle on MacOs.
- If you are using the Oracle XE (and maybe Oracle Database, but not tested) the following credentials work:
- Username: system
- Password: predefined password on installation of the DB
- Hostname: localhost
- Port: 1521
- SID: XE
- Now we need to execute some SQL statements on the oracle db.
- Create a new schema, which we can use for Specmate. On default, on Oracle XE the user has to have the prefix C##.
CREATE USER C##specmate IDENTIFIED BY specmate_oracle;
- Grant access to the new user
GRANT CREATE SESSION TO C##specmate;
GRANT CREATE TABLE TO C##specmate;
ALTER USER C##specmate quota unlimited on USERS;
- Create a new schema, which we can use for Specmate. On default, on Oracle XE the user has to have the prefix C##.
- Now we can create a new database connection to our newly created schema.
- Configure the connection in Specmate. Open specmate-config/config/specmate-config.properties
- Comment out the H2 jdbc connection
#h2.jdbcConnection = jdbc:h2:./database/specmate
- Add the oracle connection.
oracle.jdbcConnection = jdbc:oracle:thin:@localhost:1521/XE
oracle.username = C##specmate
oracle.password = specmate_oracle - Change the cdo.repositoryName to the name of the database schema. ATTENTION: This must be the same name as the schema defined in 4.i.
cdo.repositoryName = C##specmate
- Comment out the H2 jdbc connection
- Download the oracle driver oracle-driver-ojdbc-12.1.0.2.jar. (Found on google drive).
- Create a new folder in the bundle specmate-dbprovider-oracle named jar.
- Copy downloaded .jar file into created jar folder
- Add .jar file to the buildpath of the specmate-dbprovider-oracle bundle.
- In Eclipse, run dev-specmate-all-oracle.bndrun
As Oracle DB is not supported by MacOS, the simplest way is to download a pre-configured Linux VM where Oracle DB is pre-installed. (https://www.oracle.com/database/technologies/databaseappdev-vm.html)
For configuration of the VM see: https://www.databasestar.com/oracle-mac/
However, step 5, 6 and 7 seem to be outdated.
Credentials for pre-configured VM:
- Username: system
- Password: oracle
- Service name: orcl
Due to the other credential on step 6.ii. the oracle.jdbcConnection must be adapted.
If you can't connect to the database on a Windows PC, it is possible that the Windows-Listener is not started. To check the status of the listener type use the following command on Powershell (with admin rights):
lsnrctl status
To start it, use
lsnrctl start