EJPPG0003E: ServletContext lookup for /.CreditCounterPartyReviewLog returned the portal context. It has to be a different one.

I’m working on a Portlet project right now. It helps a group over at TransAlta keep their financial obligations and exposures in check. I like the application…it has great business value, terrific customer participation…a great project.

A second developer was introduced to the project recently. He brought the portlets down from CVS and tried running them on his workstation. The received the following error:

2006.08.23 13:37:49.064 E com.ibm.wps.pe.om.definition.impl.WebApplicationDefinitionImpl getServletContext
EJPPG0003E: ServletContext lookup for /.CreditCounterPartyReviewLog returned the portal context. It has to be a different one.

hmmm, what does that mean? He created an EAR file to associate the project with…ahh, but wait! When Rational Application Developer associates Web Modules with an EAR, it doesn’t give it a context root. It tries using the context root for the Portal itself (uh oh) and then throws the exception found above. Fixing it, as my good friend from IBM Thomas Young discovered, is quite simple. Open the EAR, find the module reference and click ‘Refesh’ located beside the Context Root field.

ReDeploy and run…Right Side, not cropped

12 Responses to “EJPPG0003E: ServletContext lookup for /.CreditCounterPartyReviewLog returned the portal context. It has to be a different one.”

  1. Prabhakar Mariyappan Says:

    I created a simple portal application, i built the application using ANT scripts, and i deployed into the WebSphere Portal server. While running application i got the same error what u mentioned above :

    ” com.ibm.wps.pe.om.definition.impl.WebApplicationDefinitionImpl getServletContext
    EJPPG0003E: ServletContext lookup for /wps/PA_1_0_1I1 returned the portal context. It has to be a different one. ”

    But, u mentioned some solution, but i couldnt follow u, Pls tell me the proper solution.

    Thanks in advance,
    Prabhakar Mariyappan.

  2. Pär Says:

    Oh my God! Thanks for this tip! I was about to go insane trying to figure out what the hell was wrong with my Portal UTE.

    Cheers!

  3. Ton Says:

    Same here - just “portlet not available” and this logmessage. This tip saves my day, thanks!
    @prabhakar: see the screenshot; to get here open the EAR project for your portlet, doubleclick application.xml (in META-INF) then under “modules” click on the .war file where your portlet lives. Look to the right to see the Context root and “Refresh” button.

  4. Ton Says:

    @prabhakar 2: I see now that you deployed into a server. Check the application.xml in the META-INF directory and make sure the element has the correct value.

  5. Jim Says:

    Right problem, right symptoms, but this tip did not work for me. Still get the same error. Any other ideas?

  6. Felix Says:

    @Jim: A little late, but maybe it helps someone else: Try to change the classloader settings of your server for that specific application. Switching between “parent first” and “parent last” helps some times.

  7. Jessica Says:

    Oh holy hay-zeus. Thank you. I know that WPS sometimes gets its knickers in a twist about new EARs, but I usually solved it (blindly) by recreating the EAR and rebuilding. This always worked for me until today - reading the “real” reason has saved me hours and a large loss of hair. J

  8. onkar Says:

    i tried ur trick but it hasnt worked in my case. also one more thing i dont get the project text box below the context root.

  9. Jayakumar V Says:

    Yes this Refresh module Context root in RAD solved this Servlet Context problem. Thanks.

  10. mado Says:

    I tried the ‘tricks’ the way they’re described above, but nothing happened. So I refreshed the EAR- and the Servers-Project in the RAD Project Explorer (rightclick on project - refresh).

    ReDeploy and run…

  11. Vaibhav Says:

    Thanks a lot!!!!! it worked for me also!!!!

  12. It’s Only Software » How to Diagnose the Awful Websphere Portal EJPPG0003E Error Says:

    [...] by about a hundred different things. If the issue is actually a context issue, you can follow Jamie Mcllroy’s great instructions to try to resolve context root-type [...]

Leave a Reply