GateIn Portlet Container
  1. GateIn Portlet Container
  2. GTNPC-19

No portlet info section in portlet.xml leads to display a portlet error

    Details

    • Type: Bug Bug
    • Status: Open Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      declare a portlet info section

      Show
      declare a portlet info section
    • Estimated Difficulty:
      Low
    • Similar Issues:
      Show 10 results 

      Description

      java.util.MissingResourceException: Can't find resource for bundle org.gatein.common.i18n.ParentChildResourceBundle, key javax.portlet.title
      at java.util.ResourceBundle.getObject(ResourceBundle.java:325)
      at java.util.ResourceBundle.getString(ResourceBundle.java:285)
      at javax.portlet.GenericPortlet.getTitle(GenericPortlet.java:261)
      at javax.portlet.GenericPortlet.render(GenericPortlet.java:232)
      at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:569)
      at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
      at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
      at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:506)
      at org.gatein.pc.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)

      followed by

      java.lang.NullPointerException
      at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:293)
      at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:61)
      at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:148)
      at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:368)
      at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:358)

        Activity

        Hide
        Matt Wringe
        added a comment -

        for the portlet 2.0 xsd, that xml fragment is valid.

        <sequence>
        ..
        <element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/>
        <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/>
        ..
        </sequence>

        For the portlet 1.0 case, then yes your argument seems valid. I don't think we should be adding the portlet-title if the portlet-section exists but doesn't specify the title. The current implementation does this, and it is probably the incorrect behaviour. It should be up to the portlet developer to configure the portlet title. Although I don't want think we want to change this behaviour as it could break backwards compatibility with current portlets.

        We can't throw the error at deploy time, it has to be done at runtime. The portlet itself can specify the title, the deployment descriptors are valid if no resource-bundle or portlet-title section is specified.

        Show
        Matt Wringe
        added a comment - for the portlet 2.0 xsd, that xml fragment is valid. <sequence> .. <element name="resource-bundle" type="portlet:resource-bundleType" minOccurs="0"/> <element name="portlet-info" type="portlet:portlet-infoType" minOccurs="0"/> .. </sequence> For the portlet 1.0 case, then yes your argument seems valid. I don't think we should be adding the portlet-title if the portlet-section exists but doesn't specify the title. The current implementation does this, and it is probably the incorrect behaviour. It should be up to the portlet developer to configure the portlet title. Although I don't want think we want to change this behaviour as it could break backwards compatibility with current portlets. We can't throw the error at deploy time, it has to be done at runtime. The portlet itself can specify the title, the deployment descriptors are valid if no resource-bundle or portlet-title section is specified.
        Hide
        Matt Wringe
        added a comment -

        going through old jira issues assigned to me, is this something we still care about? or can it be closed as wont fix?

        Show
        Matt Wringe
        added a comment - going through old jira issues assigned to me, is this something we still care about? or can it be closed as wont fix?
        Hide
        Julien Viet
        added a comment -

        I will bring this to the EG for the Portlet 3.0.

        Show
        Julien Viet
        added a comment - I will bring this to the EG for the Portlet 3.0.
        Hide
        Vlastislav Ramik
        added a comment -

        I've got this issue when I tried to write portlet using localized title

        <resource-bundle>com.foo.myApp.QuotePortlet</resource-bundle>
        

        instead of

        <portlet-info>
            <title>Stock Quote Portlet</title>
            <short-title>Stock</short-title>
            <keywords>finance,stock market</keywords>
        </portlet-info>
        

        as described in jsr286, PLT.6.2 Portlet Resource Bundle. If I understood correctly with this error it doesn't meet jsr286 specification. Is there any progress with this issue?

        Show
        Vlastislav Ramik
        added a comment - I've got this issue when I tried to write portlet using localized title <resource-bundle>com.foo.myApp.QuotePortlet</resource-bundle> instead of <portlet-info> <title>Stock Quote Portlet</title> <short-title>Stock</short-title> <keywords>finance,stock market</keywords> </portlet-info> as described in jsr286, PLT.6.2 Portlet Resource Bundle. If I understood correctly with this error it doesn't meet jsr286 specification. Is there any progress with this issue?
        Hide
        Julien Viet
        added a comment -

        The portlet spec will issue an errata for Portlet 2.0 : see the issue here https://java.net/jira/browse/PORTLETSPEC3-14

        Show
        Julien Viet
        added a comment - The portlet spec will issue an errata for Portlet 2.0 : see the issue here https://java.net/jira/browse/PORTLETSPEC3-14

          People

          • Assignee:
            Matt Wringe
            Reporter:
            Julien Viet
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated: