October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Build a Java CRUD Application with OpenXava 8.0

Create a browser-based Java CRUD module with OpenXava: generate the Maven project, define a Customer entity, run the app, and explore the generated interface.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Change into the generated directory: cd yourapp.
  2. Build and launch the application: mvn package exec:java.
  3. When startup completes, open http://localhost:8080/yourapp in 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:

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;
}
  • @Entity marks the class as persistent.
  • @Id identifies the primary key; this example uses number.
  • @Column sets column-length constraints for the two fields.
  • @Required makes 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.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

With the application running, follow the getting-started tutorial’s basic Customer workflow:

  1. Sign in to the application if prompted.
  2. Open the Customer module, enter a customer number and name, then select Save.
  3. 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.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.