Hello,
I'm currently trying to upgrade my company's application from
JBoss 4.2 to JBoss 7.1.1.Final. I have gotten most areas to work except for a section of code that is using <
jsp:useBean>. The error that i'm getting is:
2013-03-27 14:00:22: ERROR ApplicationDispatcher->invoke: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 2 in the jsp file: /ChooseReport.jsp
orderreportgateway cannot be resolved to a type
1: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
2: <jsp:useBean id="reportList" scope="request" class="orderreportgateway.beans.ReportListBean" />
3: <html>
4: <head>
5: <link rel="stylesheet" type="text/css" href="/images/newEclipse.css">
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:446)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:607)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:312)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:253)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:840)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:622)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:560)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:488)
at OrderReportGateway.forward(OrderReportGateway.java:441)
at OrderReportGateway.chooseReport(OrderReportGateway.java:370)
at OrderReportGateway.process(OrderReportGateway.java:138)
at OrderReportGateway.doGet(OrderReportGateway.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
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:368)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
at java.lang.Thread.run(Thread.java:662)
My bean is located in the package "orderreportgateway.beans". My jsp is located in the root web folder. My file structure is as follows:
JSP:
Project.war -> ChooseReport.jsp
Bean:
Project.war -> WEB-INF -> classes -> orderreportgateway -> beans -> ReportListBean.class
I have all ready tried changing class="" to type="". I have also made sure that my bean has a default constructor that doesn't have any input parameters. My bean is not in the default package either. I don't understand why it is telling my that my first package name can't be resolved to a type. I don't think that it should be trying to validate it as a type since it is a package. When I redeploy this exact same code in JBoss 4.2, it works perfectly.
I guess another thing i should mention is that my JBoss 4.2 server is justing
Java 5 and my JBoss 7.1.1.Final server is using Java 6. The JBoss 4.2 server is running on both Windows 7 (my development instance) and Unix. My JBoss 7.1.1.Final server is only running on Windows 7 (my development instance) until I get the last few problems solved. Then it will be moved to Unix.
My JSP is as follows (ChooseReport.jsp)
My bean is as follows (ReportListBean.java)
Any help would be greatly appreciated.