NullPointerException accessing friendly URL

Technote (troubleshooting)


Problem

You request a friendly URL and Portal does not serve the requested page.

Symptom

During a request for a friendly URL, WebSphere Portal writes the following to SystemOut.log:

Servlet       E com.ibm.wps.engine.Servlet handleException EJPEJ0070E: An exception occurred while processing the request.
                                 java.lang.NullPointerException
at com.ibm.wps.model.metadata.content.ContentMetaDataModelImpl.getCacheKey(ContentMetaDataModelImpl.java:114)
...
at com.ibm.wps.resolver.utils.Helper.setPathInfo(Helper.java:1469)
at com.ibm.wps.resolver.friendly.cor.FriendlyResolver.resolvePathInfo(FriendlyResolver.java:543)
... com.ibm.wps.resolver.portal.ResolvedPreprocessor.handleResolution(ResolvedPreprocessor.java:447)
...
at com.ibm.wps.engine.Servlet.doGet(Servlet.java:516)



Cause

The friendly URL resovled to an inactive page.

Diagnosing the problem

Assuming the test case of requesting:

http://portal.com/wps/portal/friendlyurl1

Export the configuration by using ExportRelease as input to XMLAccess. Search for:


<parameter name="com.ibm.portal.friendly.name" type="string" update="set"><![CDATA[friendlyurl1]]></parameter>

Also, inspect the export for:

<url-mapping-context ... label="friendlyurl1" ...

You may also recreate the problem with these traces enabled:

com.ibm.wps.resolver.*=all:com.ibm.wps.engine.*=all

The selection-node in the following handleResolution trace message indicates the objectid of the content-node to which the friendly URL resolves. This may help expedite your review of the exported configuration:


ResolvedPrepr 2 com.ibm.wps.resolver.portal.ResolvedPreprocessor handleResolution State after resolution: [...
<root>
<state type="navigational">
<selection selection-node="6_IHCC18K0G89IE0IB4GGI3F2GA8"/>
</state>
</root>
]
...
Servlet       E com.ibm.wps.engine.Servlet handleException EJPEJ0070E: An exception occurred while processing the request.
                                 java.lang.NullPointerException
at com.ibm.wps.model.metadata.content.ContentMetaDataModelImpl.getCacheKey(ContentMetaDataModelImpl.java:114)


Resolving the problem

First, ensure only a single page resolves to this friendly URL. In other words, make sure that there are no conflicts between multiple friendly URL definitions or between a friendly URL definition and a URL mapping definition.

Second, ensure that whichever page resolves to this friendly URL is active:

<content-node action="update" active="true" ...>
...
<parameter name="com.ibm.portal.friendly.name" type="string" update="set"><![CDATA[friendlyurl1]]></parameter>
...
</content-node>

You may activate pages via the Manage Pages portlet or XMLAccess.

Key point: An inactive page may not share a friendly URL with an active page. In such cases, the friendly URL could resolve to the inactive page, resulting in this NullPointerException.


Related information

Requirement for unique friendly URLs


Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

WebSphere Portal

Software version:

6.1, 7.0

Operating system(s):

AIX, IBM i, Linux, Solaris, Windows, i5/OS, z/OS

Software edition:

Enable, Express, Extend, Hypervisor Edition, Server

Reference #:

1499362

Modified date:

2011-06-07

Translate my page

Machine Translation

Content navigation