dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: [RESOLVED] JSP exception report

  1. #1
    Join Date
    Nov 2010
    Posts
    37

    [RESOLVED] JSP exception report

    I'm getting the following error message when I call a couple of JSPs. This looks for all the world like a classpath issue to me, but I've tried rebuilding my classpath and /lib folder several times to no avail, and Google searches aren't yielding anything specific. Any ideas?

    This is in the broswer.

    Code:
    HTTP Status 500 - 
    
    --------------------------------------------------------------------------------
    
    type Exception report
    
    message 
    
    description The server encountered an internal error () that prevented it from fulfilling this request.
    
    exception 
    
    org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
    
    
    root cause 
    
    javax.servlet.ServletException: java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:850)
    	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    	org.apache.jsp.CommentPage_jsp._jspService(CommentPage_jsp.java:128)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
    
    
    root cause 
    
    java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    	org.apache.struts2.components.Property.start(Property.java:162)
    	org.apache.struts2.views.freemarker.tags.CallbackWriter.onStart(CallbackWriter.java:73)
    	freemarker.core.Environment.visit(Environment.java:296)
    	freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
    	freemarker.core.Environment.visit(Environment.java:210)
    	freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
    	freemarker.core.Environment.visit(Environment.java:210)
    	freemarker.core.MixedContent.accept(MixedContent.java:92)
    	freemarker.core.Environment.visit(Environment.java:210)
    	freemarker.core.Environment.include(Environment.java:1483)
    	freemarker.core.Include.accept(Include.java:169)
    	freemarker.core.Environment.visit(Environment.java:210)
    	freemarker.core.MixedContent.accept(MixedContent.java:92)
    	freemarker.core.Environment.visit(Environment.java:210)
    	freemarker.core.Environment.process(Environment.java:190)
    	freemarker.template.Template.process(Template.java:237)
    	org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157)
    	org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
    	org.apache.struts2.components.UIBean.end(UIBean.java:513)
    	org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
    	org.apache.jsp.CommentPage_jsp._jspx_meth_s_005flabel_005f0(CommentPage_jsp.java:210)
    	org.apache.jsp.CommentPage_jsp._jspx_meth_s_005fform_005f0(CommentPage_jsp.java:159)
    	org.apache.jsp.CommentPage_jsp._jspService(CommentPage_jsp.java:111)
    	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
    This is in the console.
    Code:
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    	at org.apache.struts2.components.Property.start(Property.java:162)
    	at org.apache.struts2.views.freemarker.tags.CallbackWriter.onStart(CallbackWriter.java:73)
    	at freemarker.core.Environment.visit(Environment.java:296)
    	at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130)
    	at freemarker.core.Environment.visit(Environment.java:210)
    	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
    	at freemarker.core.Environment.visit(Environment.java:210)
    	at freemarker.core.MixedContent.accept(MixedContent.java:92)
    	at freemarker.core.Environment.visit(Environment.java:210)
    	at freemarker.core.Environment.include(Environment.java:1483)
    	at freemarker.core.Include.accept(Include.java:169)
    	at freemarker.core.Environment.visit(Environment.java:210)
    	at freemarker.core.MixedContent.accept(MixedContent.java:92)
    	at freemarker.core.Environment.visit(Environment.java:210)
    	at freemarker.core.Environment.process(Environment.java:190)
    	at freemarker.template.Template.process(Template.java:237)
    	at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:157)
    	at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
    	at org.apache.struts2.components.UIBean.end(UIBean.java:513)
    	at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
    	at org.apache.jsp.CommentPage_jsp._jspx_meth_s_005flabel_005f0(CommentPage_jsp.java:210)
    	at org.apache.jsp.CommentPage_jsp._jspx_meth_s_005fform_005f0(CommentPage_jsp.java:159)
    	at org.apache.jsp.CommentPage_jsp._jspService(CommentPage_jsp.java:111)
    	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Unknown Source)

  2. #2
    Join Date
    Nov 2010
    Posts
    37

    Re: JSP exception report

    It might help if I posted the JSP code itself, as well as the custom tag that it references.

    Here is the JSP.
    Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ page import="java.io.*"%>
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <%@ taglib prefix="myTag" uri="commentsTag"%>
    <html>
    <head>
    <title>Granada High School Class of 1986 Comment Page</title>
    <style type="text/css">
    p {
    	text-align: justify;
    }
    </style>
    </head>
    <body>
    <center>
    <h1>Granada High School Class of 1986 Comment Page</h1>
    </center>
    <%@ include file="menu.jsp" %><br>
    <p>This page is a place where you can share memories from high
    school, what you're doing these days, comments about this web site (good
    or bad), etc. The comments will appear at the bottom of the page.</p>
    <s:form action="ProcessComment" method="post">
    	<table>
    		<tr>
    			<td><s:label name="name" value="Name" /><s:textfield
    				name="name" maxlength="30" /></td>
    		</tr>
    		<tr>
    			<td><s:label name="message" value="Message" /><s:textarea
    				name="message" rows="5" cols="50" /></td>
    		</tr>
    		<tr>
    			<td><s:submit type="button" value="submit" label="Submit" /></td>
    			<td>&nbsp;</td>
    		</tr>
    	</table>
    </s:form>
    <br>
    <myTag:comments />
    <%@ include file="footer.jsp" %>
    </body>
    </html>
    Here is the tag.
    Code:
    package tags;
    
    import java.io.IOException;
    
    import java.util.Iterator;
    import java.util.List;
    
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspWriter;
    import javax.servlet.jsp.PageContext;
    import javax.servlet.jsp.tagext.SimpleTagSupport;
    
    import model.Comment;
    
    import org.hibernate.HibernateException;
    import org.hibernate.Query;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    
    public class Comments extends SimpleTagSupport {
    	@SuppressWarnings("unchecked")
    	public void doTag() throws JspException, IOException {
    		Transaction tx = null;
    		SessionFactory sessionFactory = new Configuration().configure()
    				.buildSessionFactory();
    		Session session = sessionFactory.openSession();
    		try {
    			tx = session.beginTransaction();
    			Query myQuery = session.createQuery("from Comment");
    			List<Comment> commentList = (List<Comment>) myQuery.list();
    			PageContext pageContext = (PageContext) getJspContext();
    			JspWriter out = pageContext.getOut();
    			out.println("<table>");
    			Iterator<Comment> iterator = (Iterator<Comment>) commentList.iterator();
    			while (iterator.hasNext()) {
    				Comment comment = (Comment) iterator.next();
    				out.println("<tr>");
    				out.println("<td>");
    				out.println("<b>Name:</b> " + comment.getName() + "<br>");
    				out.println("<b>Date:</b> " + comment.getDate() + "<br>");
    				out.println("<b>Comment:</b> " + comment.getComment() + "<br>");
    				out.println("</td>");
    				out.println("</tr>");
    				out.println("<tr><td>&nbsp;</td></tr>");
    			}
    			out.println("</table>");
    
    		} catch (HibernateException e) {
    			e.printStackTrace();
    			if (tx != null && tx.isActive())
    				tx.rollback();
    			throw e;
    		}
    	}
    }

  3. #3
    Join Date
    Feb 2008
    Posts
    966

    Re: JSP exception report

    I don't see any references in your code to the error at all. I do not see anywhere in the code where you are referencing "ValueStack.findValue()". Can you search your project and see if you are calling that anywhere? Maybe the error is being thrown from somewhere else. Is the error below coming from the catalina.out file, or some log4j file?

  4. #4
    Join Date
    Nov 2010
    Posts
    37

    Re: JSP exception report

    ValueStack.findValue() is not being called anywhere in my project, and I can't find any catalina.out file or some log4j file, either.

  5. #5
    Join Date
    Feb 2008
    Posts
    966

    Re: JSP exception report

    Sorry, I made an assumption about your server. What container are you using to deploy your JSP pages: Glassfish, jboss, Tomcat? If you aren't using one, where did you get the log information that you posted?

    How is your project set up, are you using maven or ant to build it? What are your dependencies? There could be conflicting dependencies, or mismatched versions.

    Are you using Site mesh in your project? If so, post up your sitemesh.xml and your decorators.xml files.
    Last edited by ProgramThis; January 5th, 2011 at 11:50 AM.

  6. #6
    Join Date
    Nov 2010
    Posts
    37

    Re: JSP exception report

    Quote Originally Posted by ProgramThis View Post
    Sorry, I made an assumption about your server. What container are you using to deploy your JSP pages: Glassfish, jboss, Tomcat? If you aren't using one, where did you get the log information that you posted?
    I am using Tomcat and launching from within Eclipse. The information comes from the browser window and the console.

    Quote Originally Posted by ProgramThis View Post
    How is your project set up, are you using maven or ant to build it? What are your dependencies? There could be conflicting dependencies, or mismatched versions.
    When I make corrections, I go to Project > Clean within Eclipse, and I have it set up to get rid of old files and compile new ones. As far as dependencies go, I'm not sure what you mean by that. Are we talking about what jar files I'm using?

    Quote Originally Posted by ProgramThis View Post
    Are you using Site mesh in your project? If so, post up your sitemesh.xml and your decorators.xml files.
    No, no Site mesh.

  7. #7
    Join Date
    Feb 2008
    Posts
    966

    Re: JSP exception report

    Quote Originally Posted by FHSerkland@gmail.com View Post
    I am using Tomcat and launching from within Eclipse. The information comes from the browser window and the console.
    Ok, then I was right. You should have an /apps/ folder somewhere where your apache tomcat is installed. When you use eclipse to do this, it creates a temporary directory under "workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" that holds your deployment files. The console in eclipse is generally your catalina.out, but your log files will be elsewhere, somewhere under the tmp0 (or some other number) directory.

    Quote Originally Posted by FHSerkland@gmail.com View Post
    When I make corrections, I go to Project > Clean within Eclipse, and I have it set up to get rid of old files and compile new ones. As far as dependencies go, I'm not sure what you mean by that. Are we talking about what jar files I'm using?
    Dependencies are you you set up (yes, they are usually JAR files) as external classes, not part of the SDK, that are used in your project. If you have downloaded any JARs and placed them into a LIB folder, or are accessing them it would be helpful to know which ones.

    Quote Originally Posted by FHSerkland@gmail.com View Post
    No, no Site mesh.
    Well, according to your error message you are, or at least your project thinks it is. Why don't you paste your web.xml and any other xml files you have for your project in here so we can see what is going on.

    Also, please check your project dependencies by right clicking on the project, going to properties and then selecting (on the left hand side) Java Build and looking at the included libraries.

  8. #8
    Join Date
    Nov 2010
    Posts
    37

    Re: JSP exception report

    Quote Originally Posted by ProgramThis View Post
    Why don't you paste your web.xml and any other xml files you have for your project in here so we can see what is going on.

    Also, please check your project dependencies by right clicking on the project, going to properties and then selecting (on the left hand side) Java Build and looking at the included libraries.
    I'm going to put all my xmls here. They may not all have something to do with this, but better too much information than not enough, right?

    web.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
    	xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    	<display-name>Granada High School Class of 1986</display-name>
    	<filter>
    		<filter-name>struts2</filter-name>
    		<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    	</filter>
    	<filter-mapping>
    		<filter-name>struts2</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
    	<listener>
    		<listener-class>configuration.ConfigurationListener</listener-class>
    	</listener>
        <welcome-file-list>
             <welcome-file>home.jsp</welcome-file>
        </welcome-file-list>
        <servlet>
        	<servlet-name>ProcessPoll1</servlet-name>
        	<servlet-class>action.ProcessPoll1</servlet-class>
        </servlet>
    </web-app>
    struts-config.xml
    Code:
    <!DOCTYPE struts-config PUBLIC 
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" 
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    	<action-mappings>
    		<action path="action.ProcessComment" type="action.ProcessComment">
    			<forward name="success" path="/CommentPage.jsp" redirect="true" />
    			<forward name="failure" path="/CommentPage.jsp" redirect="true" />
    		</action>
    		<action path="/action.ProcessPoll1" type="action.ProcessPoll1">
    			<forward name="success" path="/PollPageResult.jsp" redirect="true" />
    			<forward name="failure" path="/PollPageResult.jsp" redirect="true" />
    		</action>
    		<action path="/action.ProcessPoll2" type="action.ProcessPoll2">
    			<forward name="success" path="/PollPageResult.jsp" redirect="true" />
    			<forward name="failure" path="/PollPageResult.jsp" redirect="true" />
    		</action>
    	</action-mappings>
    	<controller nocache="true" />
    </struts-config>
    hibernate.cfg.xml
    Code:
    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
       "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
    
    <hibernate-configuration>
    	<session-factory>
    		<property name="connection.url">jdbc:mysql://localhost/ghs86</property>
    		<property name="connection.username">root</property>
    		<property name="connection.password"></property>
    		<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
    		<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
    		<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
    		<property name="current_session_context_class">thread</property>    <!-- this will show us all sql statements -->
    		<property name="hibernate.show_sql">true</property>  <!-- mapping files -->
    		<mapping resource="Comment.hbm.xml" />
    		<mapping resource="Poll1.hbm.xml" />
    		<mapping resource="Poll2.hbm.xml" />
    	</session-factory>
    </hibernate-configuration>
    Comment.hbm.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
    <hibernate-mapping>
        <class name="model.Comment" table="comments">
            <id name="id" column="id" type="java.lang.Integer">
            	<generator class="native" />
            </id>
            <property name="date" column="comment_date" type="java.lang.String" />
            <property name="name" column="name" type="java.lang.String" />
            <property name="comment" column="comment" type="java.lang.String" />
        </class>
    </hibernate-mapping>
    Poll1.hbm.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
    <hibernate-mapping>
        <class name="model.Poll1" table="poll1">
            <id name="id" column="id" type="java.lang.Integer">
            	<generator class="assigned"/>
            </id>
            <property name="yes" column="yes" type="java.lang.Integer"/>
            <property name="no" column="no" type="java.lang.Integer"/>
        </class>
    </hibernate-mapping>
    Poll2.hbm.xml
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
    <hibernate-mapping>
        <class name="model.Poll2" table="poll2">
            <id name="id" column="id" type="java.lang.Integer">
            	<generator class="assigned"/>
            </id>
            <property name="job" column="job" type="java.lang.Integer"/>
            <property name="married" column="married" type="java.lang.Integer"/>
             <property name="school" column="school" type="java.lang.Integer"/>
            <property name="crazy" column="crazy" type="java.lang.Integer"/>
        </class>
    </hibernate-mapping>
    Commonslog jars:
    commons-io-1.4.jar
    commons-io-1.4-javadoc.jar
    commons-io-1.4-sources.jar

    Hibernate jars:
    ant-1.6.5.jar
    antlr-2.7.5h3.jar
    asm-1.4.3.jar
    cglib-2.0.2.jar
    commons-collections-3.2.jar
    commons-logging-1.1.1.jar
    dom4j-1.6.1.jar
    ehcache-1.3.0.jar
    hinernate-3.0.5.jar
    jta.1.0.1B.jar
    log4j-1.2.14.jar

    JRE System Library jars:
    resources.jar
    rt.jar
    jsse.jar
    jce.jar
    charests.jar
    dnsns.jar
    localedata.jar
    sunjce_provider.jar
    sunmscapi.jar
    sunpkcs11.jar

    JSTL jars:
    jstl-api-1.2.jar
    jstl-impl-1.2.jar

    mysql jars:
    jdbc2_0-stdext.jar
    jta-spec1_0_1.jar
    mysql-connector-java-5.0.8-bin.jar

    Struts2 jar jars:
    commons-fileupload-1.2.1.jar
    commons-logging-1.0.4.jar
    freemarker-2.3.16.jar
    javassist-3.9.0.GA.jar
    ognl-2.7.3.jar
    oro-2.0.8.jar
    struts2-core-2.2.1.jar
    struts2-tiles-plugin-2.2.1.jar
    xwork-2.1.2.jar
    xwork-core-2.1.6.jar

    Commonslog jars:
    annotations-api.jar
    catalina.jar
    catalina-ant.jar
    catalina-ha.jar
    catalina-tribes.jar
    el-api.jar
    jasper-el.jar
    jasper-jdt.jar
    servlet-api.jar
    tomcat-coyote.jar
    tomcat-dbcp.jar
    tomcat-i18n-es.jar
    tomcat-i18n-fr.jar
    tomcat-i18n-ja.jar

  9. #9
    Join Date
    Feb 2008
    Posts
    966

    Re: JSP exception report

    Ok, I think the problem is that you are having a JAR version mismatch.

    You are using:
    xwork-2.1.2.jar
    xwork-core-2.1.6.jar

    Which come from Opensymphony. From their site:
    XWork is an command-pattern framework that is used to power Struts 2 as well as other applications. XWork provides an Inversion of Control container, a powerful expression language, data type conversion, validation, and pluggable configuration.
    One thing that I noticed that you are missing as a requirement is the "ongl" JAR file.

    They have a list of mandatory dependencies that must be there for the most recent version (and specific version of these jars that must be present)
    Mandatory dependencies

    Libraries Version Scope
    commons-logging 1.0.3 Runtime
    ognl 2.6.9 Runtime
    spring-mock 1.2.6 Test
    junit 3.8.1 Test
    mockobjects-core 0.09 Test
    easymock 2.0 Test
    Please check that you have the correct JAR files and versions. I can't find on their site which version of Struts2 is supported.

    I would check out all of your dependencies first, make sure you have the right version because the error you are getting:

    java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    Indicates that there is a problem with the opensymphony, and usually you get a "NoSuchMethodError" when you have the wrong JAR file for something. Maybe you should roll your version of XWork back to a previous version and try that.

  10. #10
    Join Date
    Nov 2010
    Posts
    37

    Re: JSP exception report

    I removed xwork-2.1.2.jar, and the JSP came up as intended. Thank you for your help.

  11. #11
    Join Date
    Feb 2008
    Posts
    966

    Re: [RESOLVED] JSP exception report

    I am glad that you were able to get this resolved, and thank you for posting your solution.

  12. #12
    Join Date
    Jun 2016
    Posts
    1

    Re: [RESOLVED] JSP exception report

    I am using xwork-2.1.2.jar, and excluded xwork-core transtive dependency from struts2-core, still not be able to resolve the issue, getting the following error in log4j.log:

    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|javax.servlet.jsp.jspException=java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.ValueStack.findValue(Ljava/lang/String;Ljava/lang/Class;Z)Ljava/lang/Object;
    at org.apache.struts2.components.Property.start(Property.java:141)
    at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:53)
    at jsp_servlet._WEB_45_INF._jsp.__login._jsp__tag3(__login.java:396)
    at jsp_servlet._WEB_45_INF._jsp.__login._jspService(__login.java:236)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:416)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:326)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
    at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
    at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
    at com.erac.app.presentation.util.ActivityLogger.intercept(ActivityLogger.java:67)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
    at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
    at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.erac.app.presentation.security.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:53)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.erac.app.presentation.util.HibernateSessionInterceptor.intercept(HibernateSessionInterceptor.java:55)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
    at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
    at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)

    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|struts.actionMapping=org.apache.struts2.dispatcher.mapper.ActionMapping@54bab062
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|struts.request_uri=/app/homeFromAppsec.action
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|struts.valueStack=com.opensymphony.xwork2.ognl.OgnlValueStack@2c921d63
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|struts.view_uri=/WEB-INF/jsp/login.jsp
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|weblogic.servlet.forward.target_servlet_path=/WEB-INF/jsp/login.jsp
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|weblogic.servlet.jsp=true
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|weblogic.servlet.network_channel.port=7001
    2016-06-10 12:57:57,779|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|
    Session scope:
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|user=com.erac.app.domain.security.User@e9d7e5b
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|
    Application scope:
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|freemarker.Configuration=freemarker.template.Configuration@5d28fdc
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|headerUtil=com.erac.app.presentation.util.HeaderUtil@42e2b780
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|javax.servlet.context.tempdir=C:\snapshotviews\e872st_DeviA_app_ant2maven_view1\app_vob\app\app\app-ear\target\deploy\app7001\servers\admin7001\tmp\_WL_user\app\ia5nyy\public
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|org.springframework.web.context.WebApplicationContext.ROOT=org.springframework.web.context.support.XmlWebApplicationContext@7373a2e3: display name [Root WebApplicationContext]; startup date [Fri Jun 10 12:57:06 CDT 2016]; parent: applicationContext-main
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|static=/app/include/201606101255
    2016-06-10 12:57:57,780|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|weblogic.servlet.WebAppComponentMBean=weblogic.management.configuration.WebAppComponentMBeanImpl@132e58c0([app7001]/Applications[app]/WebAppComponents[/app])
    2016-06-10 12:57:57,781|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|weblogic.servlet.WebAppComponentRuntimeMBean=weblogic.servlet.internal.WebAppRuntimeMBeanImpl@4f99cda6
    2016-06-10 12:57:57,781|INFO|dev||/app/homeFromAppsec.action|[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'|com.erac.app.presentation.util.ErrorPageSupport|</pre>


    Please provide any suggestions, Thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)