Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8080005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:17:12+00:00 2026-06-05T16:17:12+00:00

I have a application that runs very well on JBoss using JSF 2. I

  • 0

I have a application that runs very well on JBoss using JSF 2. I saw the problems related with the JSF 2, WebSphere and Class Loader. At this time, I see the message “Initializing Mojarra 2.1.7 for the context ‘/medicao-web'”. Then, I think that the class loader is loading the correct JSF classes.

I have a index.jsp that is used to redirect to index.jsf. When I tried to request index.jsf, it makes a infinite loop and a lot of exceptions. In the stacktrace, there’s a “at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)”, then I think that it’s using the FacesServlet at some time. But I also see in the log that the problem related to the JSF is that it’s trying to read a JSP.

I also tried to request a different page, that there’s no JSP with the same name. After requesting arquivo.jsf, I get:

java.io.FileNotFoundException: JSPG0036E: Failed to find resource /arquivo.jsp
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.findWrapper(AbstractJSPExtensionProcessor.java:360)
    at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:331)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:325)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)
    at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:491)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:159)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3610)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:274)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:926)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)

This is my web.xml:

<?xml version="1.0"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>MedicaoCNI</display-name>
    <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>
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>primefaces.THEME</param-name>
        <param-value>medicao</param-value>
    </context-param>

    <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
</web-app>

And this is my faces-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
    <!-- <lifecycle>
        <phase-listener>org.cni.medicao.util.AuthenticationListener</phase-listener>
    </lifecycle> -->
    <navigation-rule>
        <from-view-id>/*</from-view-id>
        <navigation-case>
            <from-outcome>loginSucesso</from-outcome>
            <to-view-id>/usuario.jsf</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>loginFail</from-outcome>
            <to-view-id>/index.jsf</to-view-id>
            <redirect />
        </navigation-case>
        <navigation-case>
            <from-outcome>logoutSucesso</from-outcome>
            <to-view-id>/index.jsf</to-view-id>
            <redirect />
        </navigation-case>
    </navigation-rule>


</faces-config>

All my pages are in XHTML format. I also added a facelets dependency to my project. And I’m using maven.

I made some configurations to try making the class loader to load PARENT_LAST. I don’t know if it’s correct, but while the log says that it’s load the Mojarra 2.1.7, I think it’s ok.

I found a post related with mine, but it isn’t solved: JSF 2 Mojarra and Primefaces in WebSphere 7+

Thanks in advance.

UPDATE:

I tried to add the javax.faces.DEFAULT_SUFFIX context param to .xhtml. The result is that when I tried to open the arquivo.jsf, I see the source of the XHTML. Although the log is saying it’s initializing the Mojarra 2.1.7, I am feeling that there’s some conflict here.

This is my ear-plugin configuration of the ear’s maven module:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <version>5</version>
        <defaultLibBundleDir>lib</defaultLibBundleDir>
        <earSourceDirectory>${basedir}\src\main\application\META-INF\ibmconfig</earSourceDirectory>
    </configuration>
</plugin>

At \src\main\application\META-INF\ibmconfig, there’s the deployment.xml:

<appdeployment:Deployment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:appdeployment="http://www.ibm.com/websphere/appserver/schemas/5.0/appdeployment.xmi" xmi:id="Deployment_1241112964096">
  <deployedObject xmi:type="appdeployment:ApplicationDeployment" xmi:id="ApplicationDeployment_1241112964096" startingWeight="1" warClassLoaderPolicy="SINGLE">
    <classloader xmi:id="Classloader_1241112964096" mode="PARENT_LAST"/>
    <modules xmi:type="appdeployment:WebModuleDeployment" xmi:id="WebModuleDeployment_1241112964096" startingWeight="10000" uri="medicao-web.war">
      <classloader xmi:id="Classloader_1241112964097" mode="PARENT_LAST"/>
    </modules>
  </deployedObject>
</appdeployment:Deployment>

And in my web’s maven module, I have this dependencies:

<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>2.1.7</version>
</dependency>
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-impl</artifactId>
    <version>2.1.7</version>
</dependency>
<dependency>
    <groupId>com.sun.facelets</groupId>
    <artifactId>jsf-facelets</artifactId>
    <version>1.1.14</version>
</dependency>
<dependency>
    <groupId>jstl</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>
<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>3.2</version>
    <scope>compile</scope>
</dependency>

Is there something wrong? I’m new on WebSphere and I need to use it with JSF 2.

UPDATE:

I removed the jsf-facelets dependency, but it’s not working yet.
I exported an EAR to see if the deployment.xml is there, but it’s not being packaged within the EAR. Is there something wrong?

UPDATE:

Now, I’m following this tutorial: http://www.webspheretools.com/sites/webspheretools.nsf/docs/How%20to%20set%20the%20class%20loading%20policy%20to%20parent%20last%20using%20configuration%20files%20shipped%20within%20the%20EAR

My deployment.xml is under \META-INF\ibmconfig\cells\defaultCell\applications\
defaultApp\deployments\defaultApp, and my ear plugin’s configuration is:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ear-plugin</artifactId>
    <version>2.6</version>
    <configuration>
        <version>5</version>
        <defaultLibBundleDir>lib</defaultLibBundleDir>
    </configuration>
</plugin>

This way, the deployment.xml is being packaged when I export the EAR. My deployment.xml is the same as shown in the tutorial.

Anyway, when I deploy my application on WebSphere, it generates a new deployment.xml, ignoring mine. Then, it still loading parent first.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:17:14+00:00Added an answer on June 5, 2026 at 4:17 pm

    Well, all my configuration was ok.
    I tried installing the EAR using the console of WebSphere, and it read my deployment.xml. I think that there’s something wrong with the WebSphere 7 plugin developed by IBM. It’s not installing properly the application, then it’s ignoring the deployment.xml.

    Now my problem is related with IDE, since it’s terrible to manually install the application every time I change it, but this question is not about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Delphi 2009 application that runs a query over a database using
I have the following very simple application that compiles and runs fine: EDIT: changed
I have wcf service application which i host on IIS and runs very well.
I have a query in my application that runs very fast when there are
I have a bunch of *.TBC files from a very old application that runs
I have an application that runs on a shared hosting website - it is
I have an application that runs through the rounds in a tournament, and I
I have an application that runs on a client's server built on a SQL
I have an application that runs the a command as below: <command> <switches> >&
I use node.js and socket.io. I have an application that runs on the IP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.