This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opennlp-sandbox.git
The following commit(s) were added to refs/heads/main by this push:
new 8315378 gRPC Server: Fix java.lang.NoClassDefFoundError for Log4j
Logger
8315378 is described below
commit 8315378488703010befdc32c4d946a2a0fdeb4fa
Author: Richard Zowalla <[email protected]>
AuthorDate: Tue Mar 25 15:48:29 2025 +0100
gRPC Server: Fix java.lang.NoClassDefFoundError for Log4j Logger
Explicitly add log4j-api and log4j-core modules as runtime dependencies
when running via the main method of the OpenNLPGrpcServer class to resolve
missing class error.
(cherry picked from commit 9a23c73df244a6cabb54ad13ab262c66f0324bca)
---
opennlp-grpc/opennlp-grpc-service/pom.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/opennlp-grpc/opennlp-grpc-service/pom.xml
b/opennlp-grpc/opennlp-grpc-service/pom.xml
index 4ca5558..d3f4eed 100644
--- a/opennlp-grpc/opennlp-grpc-service/pom.xml
+++ b/opennlp-grpc/opennlp-grpc-service/pom.xml
@@ -65,6 +65,20 @@
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j2.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>