To build a Java CRUD application with OpenXava, generate a Maven project, add a Jakarta Persistence entity, and run the application. OpenXava uses the entity as the basis for a generated browser module with a form and list view, so you can create and inspect records without first building those screens by hand. This guide uses OpenXava 8.0 as its reference; check the version and conventions in the project you generate before copying code.
What you need before you start
- A Java development environment and Maven installed, as required by OpenXava’s quick start.
- A terminal and a browser.
- An OpenXava project generated from the current archetype. The quick-start command uses the Maven archetype version value
RELEASE, so the generated project’s actual dependencies may change over time.
OpenXava announced version 8.0 on September 28, 2026. Its announcement describes the release as Spring Boot-based, Jakarta EE-supporting, and containing more than 60 new features; that feature count is OpenXava’s release description, not an independent audit. The getting-started tutorial identifies 8.0 as current and advises choosing the latest available version. Check the generated project before using examples: OpenXava 8.0 uses Jakarta Persistence 3.2 and jakarta.persistence imports, while earlier versions use javax.persistence. See the OpenXava announcement and getting-started tutorial.
Generate and run the Maven project
From the parent directory where you want the project created, run the command from OpenXava’s quick start:
mvn archetype:generate
-DarchetypeGroupId=org.openxava
-DarchetypeArtifactId=openxava-master-detail-archetype
-DarchetypeVersion=RELEASE
-DgroupId=com.yourcompany
-DartifactId=yourapp
-DinteractiveMode=false
This generates a project named yourapp with group ID com.yourcompany. If you choose a different artifact ID, use that name in the folder and local URL in the following steps.
Free tools Windows power users keep installed
One-click scans. No signup required.
- Change into the generated directory:
cd yourapp. - Build and launch the application:
mvn package exec:java. - When startup completes, open
http://localhost:8080/yourappin a browser.
The archetype and its resolved dependency versions can change. If the command behaves differently or generated files do not match an example, inspect the generated project and use its version and package conventions rather than mixing in older snippets.
Add a small entity
OpenXava’s central unit is the business entity: a Java class annotated as a JPA entity. The following illustrative Customer class follows the Jakarta Persistence imports used with OpenXava 8.0 and includes a numeric primary key and a required name:
Rank #2
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import org.openxava.annotations.Required;
@Entity
public class Customer {
@Id
@Column(length = 6)
int number;
@Column(length = 50)
@Required
String name;
}
@Entitymarks the class as persistent.@Ididentifies the primary key; this example usesnumber.@Columnsets column-length constraints for the two fields.@Requiredmakes the name mandatory in the generated interface.
Place the class in the application’s model package, following the generated project’s layout. OpenXava’s tutorial example also uses Lombok @Getter and @Setter; follow the template’s accessor conventions and ensure the imports match your OpenXava version. The Customer tutorial and JPA appendix describe the entity pattern and persistence context.
Use the generated CRUD module
OpenXava derives the module’s interface from the entity model. The framework generates a form for editing entity fields and a list view for finding and reviewing records. Its model reference summarizes the approach this way: “OpenXava is a model oriented framework where the model is the most important, and the rest (e.g. user interface) depends on it.”
With the application running, follow the getting-started tutorial’s basic Customer workflow:
- Sign in to the application if prompted.
- Open the Customer module, enter a customer number and name, then select Save.
- Select List to view the records you have created.
The tutorial then adds a Product entity and demonstrates its module after rerunning the application. This is a model-driven generated interface, not a claim that every application-specific screen or workflow has been designed for you. See the model reference and getting-started tutorial.
Rank #4
How persistence works as the model grows
In OpenXava 8.0, entities use Jakarta Persistence. An entity represents a persistent business concept; the persistence provider stores and retrieves its state. OpenXava manages the persistence context for application code, and its JPA appendix shows obtaining a manager with XPersistence.getManager() and describes framework-managed transactions.
As the domain becomes more than a single record type, the official course progresses from getting started into domain modeling, business logic, validation, references and collections, and JPA. Add relationships and rules in response to your domain needs rather than treating the initial entity as a complete application design. The official course outline provides that progression.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Best Value
Choose a database and development workflow
The quick start is a local learning setup; it does not decide which database your application should use. A database-specific setup depends on the database, driver, and project configuration. Before switching from the generated defaults, consult OpenXava’s database guides and match the JDBC driver and connection configuration to the chosen database.
You can also select an IDE workflow from the documentation. OpenXava’s documentation hub links to IDE, database, and other development guides. Use the generated application’s actual files as the source of truth for configuration paths; for example, the application reference documents application.xml and application assembly.
What remains before production
A successful local run proves that the learning example starts; it does not establish that the application is ready for public or business use. Production choices depend on the host, database, and security requirements, so use the dedicated production deployment documentation alongside the relevant hosting and database instructions.
- Choose and configure the production database and its driver.
- Set up deployment for the target hosting environment.
- Decide how users authenticate and which records or actions each role can access.
- Review environment-specific configuration and operational needs before exposing the application.
OpenXava’s documentation hub separates production deployment from the quick-start path, along with guides for different databases and IDEs. Treat those as environment-specific implementation work, not settings implied by the generated CRUD module.
Optional capabilities beyond basic CRUD
XavaPro is an optional commercial product, not a prerequisite for the basic OpenXava CRUD workflow. Its September 30, 2026 announcement describes compatibility with OpenXava 8.0, automatic REST API generation for JPA entities with OpenAPI and embedded Swagger UI, and mobile UI changes. See the official announcements for product details.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




