-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description
When executing the Oxalis-NG standalone script (/oxalis-ng/bin-standalone/run-docker.sh) via docker exec, the application fails to initialize with a NoClassDefFoundError for Apache HttpClient classes. The error occurs during the initialization of the main class network.oxalis.ng.Main, indicating that required dependencies are not available on the classpath.
Error Message:
Error: Unable to initialize main class network.oxalis.ng.Main
Caused by: java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest
This suggests that the standalone script's classpath configuration is missing the Apache HttpClient library (httpclient), which is required by Oxalis-NG for HTTP operations.
Reproduce
- Start Oxalis-NG container using Docker image
norstella/oxalis-ng:1.2.0 - Write a valid PEPPOL document (SBDH XML) to the outbound directory:
/oxalis-ng/outbound/{document_id}.xml - Execute the standalone script via docker exec:
docker exec oxalis-ap /oxalis-ng/bin-standalone/run-docker.sh -f /oxalis-ng/outbound/{document_id}.xml - Observe the
NoClassDefFoundErrorin the command output
Example command:
docker exec oxalis-ap /oxalis-ng/bin-standalone/run-docker.sh -f /oxalis-ng/outbound/46a1ab0e-a38b-476f-8000-0b22c1dcf897.xmlExpected Output:
The script should successfully process the document and send it via the PEPPOL network.
Actual Output:
Error: Unable to initialize main class network.oxalis.ng.Main
Caused by: java.lang.NoClassDefFoundError: org/apache/http/client/methods/HttpUriRequest
Expected behavior
The standalone script should:
- Successfully initialize the
network.oxalis.ng.Mainclass - Load all required dependencies, including Apache HttpClient
- Process the document and send it via the PEPPOL network
- Return exit code 0 on success
The classpath should include all necessary JAR files, including:
httpclient-*.jar(Apache HttpClient)- All other Oxalis-NG dependencies
Oxalis-NG version
**Version:** `1.2.0`. (also tried with version 1.1.0)
**Docker Image:** `norstella/oxalis-ng:1.2.0`JDK version
Not explicitly set (using default from Docker image)Additional Info
Environment
- JDK Version: Not explicitly set (using default from Docker image)
- Container Runtime: Docker
- Execution Method: Via
docker execfrom external service
Context
This issue occurs when integrating Oxalis-NG with an external gateway service that invokes the standalone script programmatically. The gateway writes PEPPOL documents to the outbound directory and then executes the standalone script to trigger document transmission.
Workaround Attempts
- Verified that the document XML is valid and properly formatted
- Confirmed that the file path is correct and accessible within the container
- Checked that the Oxalis container is running and healthy
- tried using 1.1.0
Related Configuration
The issue appears to be related to how the standalone script (run-docker.sh) constructs the Java classpath. The script may need to explicitly include Apache HttpClient JAR files or ensure they are available in the expected location.