I’m currently working through the tutorial found on the Apache Struts website.
Currently, whenever I press submit on the form, or when I click the Bruce Philips hyperlink, I get a NoSuchMethodError
.
javax.servlet.ServletException: Filter execution threw an exception root cause java.lang.NoSuchMethodError: ognl.SimpleNode.isEvalChain(Lognl/OgnlContext;)Z com.opensymphony.xwork2.ognl.OgnlUtil.isEvalExpression(OgnlUtil.java:224) com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:215) com.opensymphony.xwork2.ognl.OgnlValueStack.trySetValue(OgnlValueStack.java:187) com.opensymphony.xwork2.ognl.OgnlValueStack.setValue(OgnlValueStack.java:174) com.opensymphony.xwork2.ognl.OgnlValueStack.setParameter(OgnlValueStack.java:152) ....
I’m not too sure what the issue is either and I believe I’ve included everything the tutorial states. I’ve tried including the dependency in my pom.xml
, but that makes no difference either.
<?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>Struts2PracticeSite</groupId> <artifactId>Struts2PracticeSite</artifactId> <packaging>war</packaging> <version>0.0.1</version> <build> <finalName>Struts2PracticeSite</finalName> </build> <dependencies> <dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-core</artifactId> <version>2.3.8</version> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.14</version> </dependency> </dependencies> </project>
Any ideas on how I would fix this problem?
Advertisement
Answer
Problem found… Turns out my server version is too old to handle struts 2. I was previously using Geronimo version 2.0.2, and it now runs fine on GlassFish 3.1.2.