I am developing a GWT application. It uses RPC to collect information from the internal system. He does this using the jar library, lets call it alpha.jar. We use this jar in many applications, so it works great, and btw built it using ANT, outside of the eclipse.
Some classes in the alpha.jar LOG4J2 links, as well as many other external jars, so when we run the application, we pass the class path to all of these and everything works fine . Please note that this is not a simple beginner problem. Alpha.jar works as it should, including calls to Log4J.
Problem:
In Eclipse, I have this GWT application project, as well as the Alpha.jar project (with source code, of course). The server side should initialize alpha objects and communicate with the alpha system.
When this is done in GWT, adding a link to the build path to the Alpha project, my GWT application works fine.
When instead of linking to the project, I include (in war / WEB-INF / lib) the alpha.jar file and start the application, I get an error in the header when the first instance of the class from alpha.jar.
There are no particularities in how alpha.jar is created, so basically it should be the same as the project in eclipse, right?
Please note the following:
*) Alphabetically dependent banks are also at war / WEB -INF / lib. log4j2-core, log4j-api, as well as many others (e.g. Apache)
*) If I delete alpha.jar (and the code that calls it), and instead just add code called LOG4J2, this code also works great!
Why am I getting this strange error while using JAR ?? Pay attention also to NoClassDefFoundError, it is not more widespread exception ClassNotFoundException. Pls see what are the reasons and what are the differences between NoClassDefFoundError and ClassNotFoundException?
If you need more information, let me know.