I want to update my application which is using the quite old 2.0.11 version of struts2.
However, that seems to be everything, but not easy...
What do I have to do in order to update the struts2 version?
I tried to simply replace the struts2-core-2.0.11.jar with the new one, but then the start of the tomcat fails with this error:
23.08.2011 16:30:57 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.logging.Logger
I don't understand what causes this error.
The only thing I can imagine is that updating the struts2 core lib also requires an update of other libs.
But how shall I now which one I need?
ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
posted 8 years ago
I got the tomcat starting again.
But that was now very much experimenting instead of knowing what I do :-)
Therefore I would be very glad to know where I can see which libs I need in case of updating struts2. Otherwise I will probably open a similar thread in several month ;-)
For others who have the same problem. I did the following:
- Replace struts2-core-2.0.11.jar with struts2-core-2.2.3.jar
- Replace xwork-2.0.4.jar with xwork-core-2.2.3.jar
- Add commons-fileupload-1.2.2.jar
unfortunately I have another problem, which I assume has something to do with the update of the xwork lib.
After this line here
ActionContext context = ActionContext.getContext();
context is null and therefore I get NullPointerExceptions if I try to access it.
Since the ActionContext is provided by the xwork2 lib which I updated, I am wondering if I have to take anything else into account?
Funny..., in the API (xworks API you can find the following paragraph:
public static ActionContext getContext()
Returns the ActionContext specific to the current thread.
the ActionContext for the current thread, is never null.