May 06

How to Diagnose the Awful Websphere Portal EJPPG0003E Error

Tag: development,java,jsf,portlet,webspherepmularien @ 9:09 pm

If you have done Websphere Portal 5.1 development, you have probably seen this error (among many others) at some point in your development lifecycle:

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

Let me tell you that this error can be caused 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 problems.

But let’s say you do that, and you’re still getting the error – what then? (I’m assuming, by the way, that you are running inside RAD with the Websphere Portal UTE.)

As near as I can figure out, this error is thrown when you try to access a portlet and the backing application (usually a WAR within an EAR) doesn’t initialize itself properly. If you read into this, it basically means this error can be caused by a wide variety of issues with the underlying application.

First, make sure that you have console logging enabled in your server configuration. To do this, open your server configuration, click on the “Portal” tab (far right), and ensure the “Enable console logging” box is checked.

Next, when you attempt to access your portlet, you should (hopefully!) see an error appear in the console log. If you do, have a look at it, and hopefully it will be obvious what’s wrong.

If it’s not obvious, or if you get the infamous PortletExeption, you may have to enlist the help of a debugger. I would suggest the following steps:

  1. Restart the server in Debug mode
  2. When the server starts up, set a Java Exception Breakpoint for Throwable
  3. Attempt to hit the offending servlet or portlet

If the servlet is throwing an error that ends up being reported as EJPPG0003E, you’ll see the debugger stop at the exception in question. I personally have seen this error caused by various JSF configuration errors (with portlets using JSF), and classloader issues (missing MANIFEST.MF entries, classloader configuration issues, PARENT_LAST vs PARENT_FIRST, etc).

Hope this helps someone! If you have any other suggestions for diagnosing this error, please share!

One Response to “How to Diagnose the Awful Websphere Portal EJPPG0003E Error”

  1. Peter Grape says:

    One cause can be that RAD is adding unnecessay files to the portlet application which collides with the already loaded JAR files in the Portal,I have found out that when using JSF and webservices calls RAD adds common-logging and common-digester which already is used in the Portal and by removing these files from the created WAR file will solve a lot of the problems caused.
    The only way to fix this permanently is to remove the webapps library and add the required files manually to the project.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">