Edit the pom.xml file in the root of your project, there add the next dependency inside the <dependencies> part:
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>15.0.1.4</version>
</dependency>
Maybe the above code is already in your pom.xml but commented, in that case just uncomment it.OpenXava 8.0 or later (Spring Boot): Edit src/main/resources/application.properties of your project to adjust the datasource to point to Informix, something like this:
spring.datasource.username=root
spring.datasource.password=ao49fmsk
spring.datasource.url=jdbc:informix-sqli://localhost:1533/myappdb:INFORMIXSERVER=myserver
spring.datasource.driver-class-name=com.informix.jdbc.IfxDriver
Instead of localhost you should put the address of the server that hosts Informix and instead of myappdb the name of your database. Also put the correct username and password. Don't forget to comment or remove the datasource entries for HSQLDB (the default one when you create a new OpenXava project), only one datasource should be active.
OpenXava 7.x or earlier: Edit src/main/webapp/META-INF/context.xml of your project to adjust the datasource to point to Informix, something like this:
<Resource name="jdbc/MyAppDS" auth="Container"
type="javax.sql.DataSource"
maxTotal="100" maxIdle="20" maxWaitMillis="10000"
username="root" password="ao49fmsk"
driverClassName="com.informix.jdbc.IfxDriver"
url="jdbc:informix-sqli://localhost:1533/myappdb:INFORMIXSERVER=myserver"/>
The differences are the driverClassName and the url. The final part of the url (before INFORMIXSERVER) is the name of your Informix database, myappdb in this example. Obviously, instead of localhost you should put the address of the server that hosts Informix. Also put the correct username and password. Maybe the above code is already in your context.xml but commented, in that case just uncomment it. Don't forget to comment or remove the datasource for HSQLDB (the default one when you create a new OpenXava project), only one datasource (with the same name) should be active.
CREATE DATABASE myappdb;

$ 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 Informix database. If it fails, verify that your database server is up, that the user and password in your datasource configuration (application.properties in 8.0+, context.xml in 7.x) 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, your datasource configuration (application.properties in 8.0+, context.xml in 7.x) (remove the passwords) and specially the stacktrace produced, you can find the trace in the Console tab of OpenXava Studio.
When you use OpenXava with HSQLDB (the default), the launcher class includes a line DBServer.start() to start the database. Since you're now using Informix, this line is no longer needed. You can comment or remove it to improve startup performance:
OpenXava 8.0 or later (Spring Boot): Launcher class in root package (myapp)
@SpringBootApplication
public class MyApplication extends OpenXavaApplication {
public static void main(String[] args) throws Exception {
// DBServer.start("myapp-db"); // Comment or remove, HSQLDB no longer needed
SpringApplication.run(MyApplication.class, args);
}
}
OpenXava 7.x or earlier: Launcher class in run package
public class myapp {
public static void main(String[] args) throws Exception {
// DBServer.start("myapp-db"); // Comment or remove, HSQLDB no longer needed
AppServer.run("myapp");
}
}