Bug 793784 (JBEPP-854) - Portlet's context-root cannot contain slashes
Summary: Portlet's context-root cannot contain slashes
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-854
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: Portal
Version: 5.1.0.GA
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 5.1.1.CR01
Assignee: hfnukal@redhat.com
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard: context epp5 portlet
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-16 00:18 UTC by Bruno Machado
Modified: 2012-02-28 16:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-19 14:50:54 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GTNPORTAL-1834 0 Major Resolved Portlet's context-root cannot contain slashes 2012-08-08 23:08:52 UTC
Red Hat Issue Tracker JBEPP-854 0 Minor Closed Portlet's context-root cannot contain slashes 2012-08-08 23:08:52 UTC

Description Bruno Machado 2011-03-16 00:18:38 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000006kBBVIA2&sfdc.override=1
Steps to Reproduce: And this is also how the error can be reproduced, using $EPP_HOME/portletbridge/examples/seamEAR.ear:

1. Explode seamEAR.ear
2. Change context-root to contain a slash '/':

  <module>
    <web>
      <web-uri>seamBookingPortlet.war</web-uri>
      <context-root>/portalBookingDemo/demo</context-root>
    </web>
  </module>

3. Deploy the application
4. Start the server
5. Import all applications
6. Add the seamBookingPortlet to a new page:

11:59:46,926 ERROR [STDERR] org.gatein.pc.api.NoSuchPortletException: No such portlet /portalBookingDemo.demo
11:59:46,926 ERROR [STDERR]     at org.gatein.pc.portlet.container.ContainerPortletInvoker.getPortlet(ContainerPortletInvoker.java:99)

(If instead of importing all applications you try to add just the SeamBookingPortlet to a category, this already fails with a java.lang.NullPointerException.)
Workaround: Workaround Exists
Workaround Description: Current workaround: Change context-root to not contain slashes
project_key: JBEPP

I've tried to use a context-root with a slash "/" in a JSR-286 Hello World Portlet and it throws the following exception when trying to add it to a new page:

11:59:46,926 ERROR [STDERR] org.gatein.pc.api.NoSuchPortletException: No such portlet /portalBookingDemo.demo
11:59:46,926 ERROR [STDERR]     at org.gatein.pc.portlet.container.ContainerPortletInvoker.getPortlet(ContainerPortletInvoker.java:99)

Changing context-root to not contain slashes has fixed the problem.

Problem happens when using slashes "/" in:

- application.xml of an .ear file
  <module>
    <web>
      <web-uri>seamBookingPortlet.war</web-uri>
      <context-root>/portalBookingDemo/demo</context-root>
    </web>
  </module>

Changing it to <context-root>/portalBookingDemo-demo</context-root> fixes the problem

- jboss-web.xml of a .war file
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
   <context-root>/MySamplePortlet/SamplePortlet</context-root>
</jboss-web> 

Changing it to <context-root>/MySamplePortlet.SamplePortlet</context-root> fixes the problem.

Comment 1 Thomas Heute 2011-03-16 07:51:20 UTC
Link: Added: This issue is related to GTNPORTAL-434


Comment 2 Thomas Heute 2011-03-16 07:51:56 UTC
Link: Added: This issue is related to GTNPORTAL-1834


Comment 3 Thomas Heute 2011-03-16 07:52:14 UTC
Link: Removed: This issue is related to GTNPORTAL-434 


Comment 4 Bruno Machado 2011-03-17 16:03:46 UTC
Help Desk Ticket Reference: Added: https://c.na7.visual.force.com/apex/Case_View?id=500A0000006kBBVIA2&sfdc.override=1


Comment 5 Bruno Machado 2011-03-23 20:24:16 UTC
Steps to Reproduce: Removed: And this is also how the error can be reproduced, using $EPP_HOME/portletbridge/examples/seamEAR.ear:

1. Explode seamEAR.ear
2. Change context-root to contain a slash '/':

  <module>
    <web>
      <web-uri>seamBookingPortlet.war</web-uri>
      <context-root>/oag/ade</context-root>
    </web>
  </module>

3. Deploy the application
4. Start the server
5. Import all applications
6. Add the seamBookingPortlet to a new page:

11:59:46,926 ERROR [STDERR] org.gatein.pc.api.NoSuchPortletException: No such portlet /oag.ade
11:59:46,926 ERROR [STDERR]     at org.gatein.pc.portlet.container.ContainerPortletInvoker.getPortlet(ContainerPortletInvoker.java:99)

(If instead of importing all applications you try to add just the SeamBookingPortlet to a category, this already fails with a java.lang.NullPointerException.) Added: And this is also how the error can be reproduced, using $EPP_HOME/portletbridge/examples/seamEAR.ear:

1. Explode seamEAR.ear
2. Change context-root to contain a slash '/':

  <module>
    <web>
      <web-uri>seamBookingPortlet.war</web-uri>
      <context-root>/portalBookingDemo/demo</context-root>
    </web>
  </module>

3. Deploy the application
4. Start the server
5. Import all applications
6. Add the seamBookingPortlet to a new page:

11:59:46,926 ERROR [STDERR] org.gatein.pc.api.NoSuchPortletException: No such portlet /portalBookingDemo.demo
11:59:46,926 ERROR [STDERR]     at org.gatein.pc.portlet.container.ContainerPortletInvoker.getPortlet(ContainerPortletInvoker.java:99)

(If instead of importing all applications you try to add just the SeamBookingPortlet to a category, this already fails with a java.lang.NullPointerException.)


Comment 6 hfnukal@redhat.com 2011-07-08 16:47:07 UTC
Needs new PC version which is bets now so postponed.
Backporting is possible.

Comment 7 hfnukal@redhat.com 2011-07-19 14:50:54 UTC
Upgrading PC is not necessary for this fix.

Comment 8 hfnukal@redhat.com 2011-07-19 14:50:54 UTC
Release Notes Text: Added: When slashes were used in context path of portlet, it caused error.


Comment 9 Scott Mumford 2011-08-09 04:40:45 UTC
Release Notes Docs Status: Added: Documented as Resolved Issue
Release Notes Text: Removed: When slashes were used in context path of portlet, it caused error. Added: In previous versions of JBoss Enterprise Portal Platform, an error would be encountered when slashes were used in the context path of a portlet. This issue has been corrected in this release.


Comment 10 hfnukal@redhat.com 2011-09-07 16:19:08 UTC
Security: Removed: RHT+eXo Added: Public



Note You need to log in before you can comment on or make changes to this bug.