0
votes

I'm trying to transfer our server from local linux box to a cloud hosting service. The original server uses Apache Tomcat Version 6.0.24 and Java version 1.6.0_17. The new server uses Apache Tomcat Version 6.0.29 and Java version 1.6.0_22.

All my other webapps work fine, this however is the only one that uses JSF. It was developed about 3 years ago using some silly drag and drop UI and the code is quite ugly to look through. Currently I am also in the process of converting the app to one that doesn't use JSF, and just uses Spring and jsp and if I redirect to those pages that I've converted specifically they work fine. Note that this error doesn't occur on my local machine either. The error that I'm getting is:

Exception Details: org.apache.jasper.el.JspELException /UserMainPage.jsp(25,95) '#{UserMainPage.DIMainPanel1}' Cannot convert #{UserMainPage.DIMainPanel1} of type class java.lang.String to class javax.faces.component.UIComponent

Possible Source of Error: Class Name: org.apache.jasper.el.JspValueExpression File Name: JspValueExpression.java Method Name: getValue Line Number: 107

Stack Trace:

org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:107) com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:229) javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:211) javax.faces.webapp.UIComponentClassicTagBase.createChild(UIComponentClassicTagBase.java:476) javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:660) javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1126) com.sun.faces.taglib.html_basic.PanelGridTag.doStartTag(PanelGridTag.java:344) org.apache.jsp.UserMainPage_jsp._jspx_meth_h_005fpanelGrid_005f0(UserMainPage_jsp.java:1016) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fpanelGroup_005f0(UserMainPage_jsp.java:833) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fpanelLayout_005f0(UserMainPage_jsp.java:758) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005ftab_005f0(UserMainPage_jsp.java:712) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005ftabSet_005f0(UserMainPage_jsp.java:656) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fform_005f0(UserMainPage_jsp.java:582) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fbody_005f0(UserMainPage_jsp.java:534) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fhtml_005f0(UserMainPage_jsp.java:361) org.apache.jsp.UserMainPage_jsp._jspx_meth_ui_005fpage_005f0(UserMainPage_jsp.java:317) org.apache.jsp.UserMainPage_jsp._jspx_meth_f_005fview_005f0(UserMainPage_jsp.java:275) org.apache.jsp.UserMainPage_jsp._jspService(UserMainPage_jsp.java:243) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:408) com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:442) com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:115) com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:225) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) java.lang.Thread.run(Thread.java:662)

This is the section of the jsp that it's complaining about:

<h:panelGrid binding="#{UserMainPage.DIMainPanel1}" border="0" cellpadding="0" cellspacing="0" columns="2" id="DIMainPanel1" style="height:38px" width="671">

I've exhausted myself over this one. Anyone have an idea what the problem might be?

1
have you tried having a look at the generated JSP code?Will
Yeah, it's just chain panelGrids trying to dynamically generate a table.zclark

1 Answers

1
votes

This problem was caused from a JSF version difference that showed up when switching to the latest version of apache2. I had to add deferredSyntaxAllowedAsLiteral="false" and isELIgnored="false" to the page directive to force parsing the "${...}" strings. This can be done either in the web-xml or on individual .jsp files in the page directive.