Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.0.12 EE, 6.1.0 CE RC1
-
I'm trying to add a consumer for a producer deployed in Webcenter. The Webcenter runs on a remote machine. Liferay is running on my local machine.
Description
Steps:
1. Add a consumer using the producer WSDL obtained in Webcenter
2. Click on Actions. There is no Manage Portlet option.
3. Click on Edit Registration
Error on screen to the effect that the remote WSRP portlet is unavailable.
A Null Pointer Exception is thrown and Tomcat log shows the following entry.
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /a
dmin/edit_consumer_registration.jsp at line 120
117:
118: List resultRows = searchContainer.getResultRows();
119:
120: for (int i = 0; i < propertyDescriptions.length; i++) {
121: PropertyDescription propertyDescription = propertyDescriptions;
122:
123: String fullyQualifiedName = propertyDescription.getName().toString();
Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrappe
r.java:510)
Looking at edit-consumer_registration.jsp (liferay-portal-6.0.6\tomcat-6.0.29\webapps\wsrp-portlet\admin), turns out their is no checking for when the propertyDescriptions array is null. It is initialised properly but if Inband registration is supported, it gets overwritten by a value which can be null.
[Excerpt from edit-consumer_registration.jsp]
PropertyDescription[] propertyDescriptions = new PropertyDescription[0];
if (supportsInbandRegistration) {
propertyDescriptions = wsrpConsumerManager.getPropertyDescriptions();
}
This corresponds to Liferay forum post
http://www.liferay.com/community/forums/-/message_boards/message/11071120
The problem can be easily rectified by
- either a null check on the array
- or changing the WSRPConsumerManager so that it does not return a null value.