Skip to content

Commit 9a23c73

Browse files
committed
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.
1 parent 9dafc78 commit 9a23c73

File tree

1 file changed

+14
-0
lines changed
  • opennlp-grpc/opennlp-grpc-service

1 file changed

+14
-0
lines changed

opennlp-grpc/opennlp-grpc-service/pom.xml

+14
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,20 @@
6565
<scope>runtime</scope>
6666
</dependency>
6767

68+
<dependency>
69+
<groupId>org.apache.logging.log4j</groupId>
70+
<artifactId>log4j-core</artifactId>
71+
<version>${log4j2.version}</version>
72+
<scope>runtime</scope>
73+
</dependency>
74+
75+
<dependency>
76+
<groupId>org.apache.logging.log4j</groupId>
77+
<artifactId>log4j-api</artifactId>
78+
<version>${log4j2.version}</version>
79+
<scope>runtime</scope>
80+
</dependency>
81+
6882
<dependency>
6983
<groupId>org.junit.jupiter</groupId>
7084
<artifactId>junit-jupiter-api</artifactId>

0 commit comments

Comments
 (0)