Reputation: 1081
i have done self study on learning struts 2. i have used one code available in internet.It is working fine after i got lot of struggle on selecting only the jar files versions that suggested by the author.
i am not having any knowledge on web programming.why different versions of the jar files are not supported.How to resolve this issue for future learning.
the example is taken from http://java.dzone.com/articles/struts2-tutorial-part-27
i have done some study on maven.will it resolve the issues.(i guess it is)
i have seen xwork jar file in the given tutorial.But in the latest versions of the struts 2 this jar file has been changed to xwork-core.
i have done execution with the following replacement. 1)xwork-2.0.6.jar (or) xwork-core2.3.1.1.jar 2)freemarker-2.3.18 3)ognl-3.0.3.jar 4)struts2-core-2.3.18 5)commons-logging-1.1.1.jar
i got errors with the two cases.
the error is
java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger;
IS THERE ANY IN DEPTH REASON FOR THIS>
Thank you all..
Upvotes: 0
Views: 631
Reputation: 160171
You cannot randomly upgrade single jar files without upgrading their dependencies: upgrade all the jars.
To solve this problem in the future, (a) look at the jars shipped in the distro, (b) use Maven or similar and stop doing dependency management by hand--it's not worth it, and it's difficult.
Upvotes: 2