PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-26280

Connecting (producer) LR EE 6.1 via WSRP to (consumer) EE 6.0 SP1 causes NPE on producer side

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.0.X EE, 6.1.10 EE GA1
    • Fix Version/s: None
    • Component/s: WSRP
    • Labels:
      None
    • Fix Priority:
      4
    • Similar Issues:
      Show 4 results 

      Description

      This is similar to LPS-24889 but in the reverse direction.

      Steps to reproduce:

      1. Set up a WSRP producer for the Currency Converter portlet in Liferay 6.1 EE GA1
      2. Set up a WSRP consumer in Liferay 6.0 EE SP1 and add the portlet to the home page
      3. A NullPointerException is reported in the producer when viewing the page
      [V2MarkupServiceImpl:104] java.lang.NullPointerException
      java.lang.NullPointerException
              at com.liferay.wsrp.bind.V2MarkupServiceImpl.addHeaders(V2MarkupServiceImpl.java:219)
              at com.liferay.wsrp.bind.V2MarkupServiceImpl.doGetMarkup(V2MarkupServiceImpl.java:236)
              at com.liferay.wsrp.bind.V2MarkupServiceImpl.getMarkup(V2MarkupServiceImpl.java:96)
      

      Note: If the consumer is set up in either EE 6.0 SP2 or EE 6.1 GA1 then the WSRP portlet works

      The following code change to the wsrp-portlet source (wsrp-portlet-src-6.1.10.1-ee-ga1-20120308105411784.zip)
      makes the producer accept old-style WSRP requests from the consumer:

      In ExtensionUtil, change the getNameAttribute() method to:

      	public static String getNameAttribute(MessageElement messageElement) {
      		Iterator<String> itr = messageElement.getNamespacePrefixes();
      
      		String namespacePrefix = itr.next();
      
      		String namespaceURI = messageElement.getNamespaceURI(namespacePrefix);
      
      		String name = messageElement.getAttributeNS(namespaceURI, NAME);
      		
      		// LPS-26280: Backwards-compatibility with EE 6.0 SP1
      		if (name == null) {
      			return messageElement.getName();
      		}
      		return name;
      	} 
      

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 5 days ago

                Development

                  Structure Helper Panel