Edit the pom.xml file in the root of your project, there add the next dependency inside the <dependencies> part:
Maybe the above code is already in your pom.xml but commented, in that case just uncomment it.
<dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc8</artifactId> <version>126.96.36.199</version> </dependency>
<dependency> <groupId>com.oracle.ojdbc</groupId> <artifactId>orai18n</artifactId> <version>188.8.131.52</version> </dependency>
<Resource name="jdbc/MyAppDS" auth="Container" type="javax.sql.DataSource" maxTotal="100" maxIdle="20" maxWaitMillis="10000" username="root" password="ao49fmsk" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:mysid"/>
<!-- Default Persistence Unit for Oracle --> <persistence-unit name="default"> ... <properties> ... <!-- ADD THE NEXT PROPERTY --> <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle12cDialect"/> </properties> </persistence-unit>
After the changes you have to rebuild your project. In OpenXava Studio click with right mouse button on your project an choose Run As > Maven install, thus:
Or if you have Maven installed in your computer and you prefer to use command line:
$ cd myapp $ mvn install
Optimization note: Instead of a mvn install, that do a complete Maven build, you can use mvn war:exploded, enough to apply the above changes for development. You can run mvn war:exploded from OpenXava Studio with Run As > Maven build... and typing war:exploded for goal.
Run your application, it should work nicely against your Oracle database. If it fails, verify that your database server is up, that the user and password in context.xml are correct, that the server IP is correct. Also verify that the user has rights to create databases and tables (if you want to use the automatic schema generation of OpenXava, not needed if the tables already exist).
If it still fails ask us in the OpenXava Help forum. Include the content of your persistence.xml, context.xml (remove the passwords) and specially the stacktrace produced, you can find the trace in the Console tab of OpenXava Studio.