facebook

Error while deploying the JSF App on JBoss

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #264387 Reply

    pmohanan
    Member

    Hi…All,

    I deployed a very simple web application (which worked successfully in Tomcat
    without any configuration changes) to JBoss App server 4.0 & here is the
    error it gives. How should I fix this.

    Regards,

    P

    ERROR [UIComponentTag] Faces context not found. getResponseWriter will
    fail. Check if the FacesServlet has been initialized at all in your
    web.xml.
    18:05:24,264 ERROR [[jsp]] Servlet.service() for servlet jsp threw
    exception
    java.lang.NullPointerException
    at
    javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
    at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
    at
    org.apache.jsp.eClaimsLogin_jsp._jspx_meth_f_view_0(eClaimsLogin_jsp.java:597)
    at org.apache.jsp.eClaimsLogin_jsp._jspService(eClaimsLogin_jsp.java:465)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    at
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt\
    erChain.java:252)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.\
    java:173)
    at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java\
    :672)
    at
    org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc\
    her.java:463)
    at
    org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j\
    ava:398)
    at
    org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav\
    a:301)
    at
    com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    at
    com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
    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(ApplicationFilt\
    erChain.java:252)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.\
    java:173)
    at
    org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9\
    6)
    at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt\
    erChain.java:202)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.\
    java:173)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2\
    13)
    at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1\
    78)
    at
    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociatio\
    nValve.java:175)
    at
    org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
    at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107\
    )
    at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    at
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConne\
    ction(Http11BaseProtocol.java:664)
    at
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:52\
    7)
    at
    org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.j\
    ava:112)
    at java.lang.Thread.run(Thread.java:595)

    #264457 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    The trick will be figuring out what is different between Tomcat and JBoss. For example, if JBoss ships it’s own JSF libraries, that might be what is causing the problem ( a conflict with your own libraries).

    #264480 Reply

    pmohanan
    Member

    Got it working finally…

    Here are the steps :

    1. Delete jbossweb-tomcat55.sar/jsf-lib (Has MyFaces JSF implementation)
    2. Make the following changes in web.xml :
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    3. Now deploy & the URL should read :
    http://domain:port/<context>/page.jsf

    Regards,

    Praveen Mohanan

    JBoss 4.04 / MyEclipseIde 5.1

    #264481 Reply

    Riyad Kalla
    Member

    Very nice find Praveen and thank you for posting your findings to help out others.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Error while deploying the JSF App on JBoss

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