facebook

Compilation errors opening JSF files in a browser

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #211758 Reply

    I am getting a similar error to the person who posted the following issue:
    JSP Compile s with Struts and JBoss/Tomcat 5 on Debian. But this time, it is with Java Server Faces. (Please excuse the cross-posting, but there was no response to my previous post.)
    I am running MyEclipse Version 3.7.200 and using JBoss 3.2.5 (build: CVSTag=JBoss_3_2_5 date=200406251954).
    I edited this JSF file and then redeployed it in JBoss using Packaged Archive mode:
    ==========================================
    Code:
    <%@ taglib uri=”http://java.sun.com/jsf/html&#8221; prefix=”h” %>
    <%@ taglib uri=”http://java.sun.com/jsf/core&#8221; prefix=”f” %>
    <html>
    <head>
    <title>Select Language</title>
    </head>
    <body>
    <h2>Please select your language</h2>
    <f:view>
    <h:form id=”selectLanguage”>
    <br>Language:
    <h:selectOneMenu>
    <f:selectItem itemValue=”en” itemLabel=”English”/>
    <f:selectItem itemValue=”de” itemLabel=”German”/>
    </h:selectOneMenu>
    <br>
    <h:commandButton type=”submit”
    value=”Submit” action=”success”/>
    </h:form>
    </f:view>
    </body>
    </html>

    ==========================================
    When I call it in the browser, this error occurs in the JBoss log, which I can only fix by restarting JBoss and repeatedly redeploying the JSF project until it starts working again:
    =============
    2004-08-06 09:21:42,629 ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    org.apache.jasper.JasperException: Unable to compile class for JSP

    An error occurred at line: 9 in the jsp file: /selectLanguage2.jsp
    Generated servlet error:
    C:\coding\jboss\server\default\work\jboss.web\localhost\news\org\apache\jsp\selectLanguage2_jsp.java:108: _jspx_meth_h_form_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.selectLanguage2_jsp cannot be applied to (com.sun.faces.taglib.jsf_core.ViewTag,javax.servlet.jsp.PageContext)
    if (_jspx_meth_h_form_0(_jspx_th_f_view_0, _jspx_page_context))
    ^

    An error occurred at line: 10 in the jsp file: /selectLanguage2.jsp
    Generated servlet error:
    C:\coding\jboss\server\default\work\jboss.web\localhost\news\org\apache\jsp\selectLanguage2_jsp.java:139: _jspx_meth_h_selectOneMenu_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.selectLanguage2_jsp cannot be applied to (com.sun.faces.taglib.html_basic.FormTag,javax.servlet.jsp.PageContext)
    if (_jspx_meth_h_selectOneMenu_0(_jspx_th_h_form_0, _jspx_page_context))
    ^

    An error occurred at line: 10 in the jsp file: /selectLanguage2.jsp
    Generated servlet error:
    C:\coding\jboss\server\default\work\jboss.web\localhost\news\org\apache\jsp\selectLanguage2_jsp.java:144: _jspx_meth_h_commandButton_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.selectLanguage2_jsp cannot be applied to (com.sun.faces.taglib.html_basic.FormTag,javax.servlet.jsp.PageContext)
    if (_jspx_meth_h_commandButton_0(_jspx_th_h_form_0, _jspx_page_context))
    ^

    An error occurred at line: 12 in the jsp file: /selectLanguage2.jsp
    Generated servlet error:
    C:\coding\jboss\server\default\work\jboss.web\localhost\news\org\apache\jsp\selectLanguage2_jsp.java:167: _jspx_meth_f_selectItem_0(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.selectLanguage2_jsp cannot be applied to (com.sun.faces.taglib.html_basic.SelectOneMenuTag,javax.servlet.jsp.PageContext)
    if (_jspx_meth_f_selectItem_0(_jspx_th_h_selectOneMenu_0, _jspx_page_context))
    ^

    An error occurred at line: 12 in the jsp file: /selectLanguage2.jsp
    Generated servlet error:
    C:\coding\jboss\server\default\work\jboss.web\localhost\news\org\apache\jsp\selectLanguage2_jsp.java:171: _jspx_meth_f_selectItem_1(javax.servlet.jsp.tagext.JspTag,javax.servlet.jsp.PageContext) in org.apache.jsp.selectLanguage2_jsp cannot be applied to (com.sun.faces.taglib.html_basic.SelectOneMenuTag,javax.servlet.jsp.PageContext)
    if (_jspx_meth_f_selectItem_1(_jspx_th_h_selectOneMenu_0, _jspx_page_context))
    ^
    5 errors

    at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
    at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
    at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:142)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at com.softculture.utilities.http.NoCacheFilter.doFilter(NoCacheFilter.java:3Cool
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
    ==============================

    – System Setup ——————————-
    Operating System and version: Windows XP SP1
    Eclipse version: 3.0.0
    Eclipse build id: 200406251208
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 8
    MyEclipse version: 3.7.200
    Eclipse JDK version: 1.4.2_05
    Application Server JDK version: 1.4.2_05
    Are there any exceptions in the Eclipse log file? No

    #211772 Reply

    Riyad Kalla
    Member

    Kenneth,
    These build errors are indicative of incorrect libraries, notice how the “cannot be applied to” is listing off incompatible method arguments showing what was generated and what was expected? I’m not sure how you eventually get this to work as it seems to me, once its broken, its broken for good…

    Maybe for sanity sake you could try and pull down JBoss 4.0RC1 and see if it works? I’d hate to troubleshoot all day long to find out its just a flaky library dependency.

    Also are you using JSF 1.0 or 1.1?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Compilation errors opening JSF files in a browser

You must be logged in to post in the forum log in