May 06 2008
How to Diagnose the Awful Websphere Portal EJPPG0003E Error
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:
- Restart the server in Debug mode
- When the server starts up, set a Java Exception Breakpoint for Throwable
- 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!


