0

I have created a simple demo rest service which queries Ethereum to get basic information. I am using the Web3j library version 5.0.0 https://mvnrepository.com/artifact/org.web3j/core/5.0.0

I have added the library to the project using Maven. Built the project which compiles successfully and trying to debug it. I am using GlassFish 6.2.51 for my application server.

Any ideas why I am getting the below error?

[2023-02-09 11:44:19,706] Artifact demoapi:war exploded: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/web3j/protocol/Web3jService.

skomisa
  • 16,436
  • 7
  • 61
  • 102
CathalMF
  • 9,705
  • 6
  • 70
  • 106
  • 1
    Seems like the dependency is not included in your WAR file. Can you share your `pom.xml` file? Important parts are dependencies and their *scope* and plugin configuration (i.e. `maven-war-plugin`) – Tasos P. Mar 03 '23 at 16:45

1 Answers1

0

Try to delete target directory with maven clean, and deploy app again

Yahor
  • 3
  • 2