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

About these ads

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

  1. 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. 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.

  3. @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.

  4. @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.

  5. 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

  6. 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.

  7. 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…

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s