⚠️ Before You Start

This setup guide reflects the actual requirements and common issues. Don't expect a modern containerized setup - this is a traditional Java enterprise application.

Prerequisites - The Real List

Required Software
# What you actually need installed
Java 8 (OpenJDK or Oracle)
Maven 3.6+
JBoss EAP 7.0 (not WildFly)
SQL Server (or Docker equivalent)
IDE with Maven support (IntelliJ recommended)
Git

🚫 Java Version Warning

This will NOT work with Java 11+ out of the box. The codebase uses Java 8 features and some legacy dependencies.

Version Compatibility Matrix

Component Required Version Notes
Java 8 (1.8.0_281+) Java 11+ not supported
Maven 3.6+ 3.8+ preferred
JBoss EAP 7.0 WildFly won't work
SQL Server 2016+ Docker version OK

The Actual Setup Process

Step 1: Get the Code

Clone Repository
git clone https://gitlab.com/redpinholdings/productengineering/ngop/dione/Dione.git
cd Dione/Development/Codebase

Step 2: Build Reality Check

Maven Build Commands
# This WILL fail the first time
mvn clean install

# Common first-time failures:
# 1. Missing artifactory access
# 2. Database connection issues  
# 3. Test failures
# 4. Missing external dependencies

# What actually works:
mvn clean install -Dmaven.test.skip=true

💡 Pro Tip

Always use -Dmaven.test.skip=true for your first build. Get the basic compilation working before dealing with test setup.

Database Setup

The database setup is more complex than documented. Here's the actual order:

Schema Installation Order

  1. Core Schema: schema/base_schema.sql
  2. Customer Data: schema/customer_master.sql
  3. Organization Seeds: Pick one:
    • schema/cd_seed.sql (Currencies Direct)
    • schema/tor_seed.sql (TorFX)
  4. Incremental Updates: schema/ngop_incremental_script.sql
Database Setup Commands
-- Create database
CREATE DATABASE NGOP;
GO

-- Use the database
USE NGOP;
GO

-- Run schema files in order
:r schema/base_schema.sql
:r schema/customer_master.sql
:r schema/cd_seed.sql
:r schema/ngop_incremental_script.sql

Docker SQL Server Option

Docker Setup
# Run SQL Server in Docker
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=YourStrong@Passw0rd" \
   -p 1433:1433 --name sql-server-dione \
   -d mcr.microsoft.com/mssql/server:2019-latest

# Connect and create database
sqlcmd -S localhost -U SA -P "YourStrong@Passw0rd" -Q "CREATE DATABASE NGOP"

IDE Setup - What Actually Works

IntelliJ IDEA (Recommended)

📂

Project Import

Import as Maven project, set Project SDK to Java 8

🔧

Required Plugins

Spring Framework, JPA/Hibernate plugins

⚙️

Configuration

Enable annotation processing, configure JBoss EAP 7.0

🔧 IntelliJ Configuration Steps

  1. File → New → Project from Existing Sources
  2. Select pom.xml in Development/Codebase
  3. Project Settings → Project SDK → Java 8
  4. Settings → Build → Compiler → Annotation Processors → Enable
  5. Run/Debug Configurations → Add JBoss/WildFly Server

Common IDE Issues

  • Annotation processing must be enabled for JPA entities
  • Spring configuration can be complex to navigate
  • Multiple Maven modules need individual configuration

Running the Application

JBoss EAP Configuration

standalone.xml - Datasource Configuration
<!-- In standalone.xml -->
<datasource jndi-name="java:jboss/datasources/NGOPMSSQLDS" 
            pool-name="NGOPMSSQLDS">
    <connection-url>jdbc:sqlserver://localhost:1433;databaseName=NGOP</connection-url>
    <driver>sqlserver</driver>
    <security>
        <user-name>your_user</user-name>
        <password>your_password</password>
    </security>
</datasource>

Deployment Steps

  1. Build with mvn clean package -Dmaven.test.skip=true
  2. Deploy WAR files to JBoss
  3. Start JBoss
  4. Cross your fingers
  5. Check logs for the inevitable issues
Deployment Commands
# Build the application
mvn clean package -Dmaven.test.skip=true

# Copy WAR files to JBoss deployments
cp customer_portal/target/CustomerPortal.war $JBOSS_HOME/standalone/deployments/
cp services/business/target/DioneBusinessServices.war $JBOSS_HOME/standalone/deployments/

# Start JBoss
$JBOSS_HOME/bin/standalone.sh

Common Issues & Solutions

Build Failures

🚫 Missing Artifactory Access

Solution: Update settings.xml with proper credentials or use offline mode

🚫 Test Failures

Solution: Always use -Dmaven.test.skip=true for initial setup

🚫 External Dependencies

Solution: Some dependencies are in internal repos - contact team for access

Runtime Issues

Common Error Fixes
# JNDI datasource not found
# Fix: Check datasource configuration in standalone.xml

# Spring context initialization failed
# Fix: Verify all dependency JARs are deployed

# Cache connection errors
# Fix: Set infinispan.client.hotrod.enable=false for local dev

# External service timeouts
# Fix: Update service URLs in ngop.properties for local environment

🎯 Success Indicators

You'll know setup is successful when:

  • JBoss starts without errors
  • Customer Portal loads at http://localhost:8080/CustomerPortal
  • Business Services WSDL is accessible
  • Database connections work

📝 Chapter Quiz

Test your understanding of the local development setup with these questions:

Question 1: What is the recommended approach for running tests during initial setup?

Question 2: Which file contains the critical configuration properties for Dione?

Question 3: What is the correct way to start JBoss for local development?