(Java&Maven)
I have two projects built with maven. One of them includes the other.
The new requirement that I have done is working in the original (common) project, but, even the simplest call to this functionality from the upper project results with an error (in current case with ClassNotFoundException, but this can be any time of error).
Here is one of the thing that should be done when you don't have the clue - check dependencies. By using maven it is possible to have a mess with them if you do not use exclusions within dependency tags. This way you can get two versions of the same JAR downloaded, and the older version used - so you got the class not found exception.
Useful tool is within Eclipse Galileo: open pom.xml and check all items within Dependency Hierarchy. From there you can build a list with duplicated and conflicted versions of JARs, and a list of exclusions you need to set in same pom.xml file.
After altering pom.xml file, check the hierarchy again - you should have one position in the hierarchy for each resolved dependency (or at least positions within same library in the hierarchy without any conflicts).
Subscribe to:
Post Comments (Atom)
Popular Posts
-
(Archiva 1.1.3 with default Derby database) Many times I have had this problem. It's time to note the solution here, so I would not wa...
-
(within JadaSite 2.03 using Apache Valocity 1.5) I got a lot of Permission denied stacktraces for velocity.log within my catalina.out . ...
-
Problem: You cannot find out which log4j.properties file is used. Try running VM with parameter -Dlog4j.debug You'll get info about log4...
No comments:
Post a Comment