[gatein-issues] [JBoss JIRA] Commented: (GTNPORTAL-2017) Can't retrieve site ids

Matt Wringe (JIRA) jira-events at lists.jboss.org
Sun Aug 14 18:02:02 EDT 2011


    [ https://issues.jboss.org/browse/GTNPORTAL-2017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620944#comment-12620944 ] 

Matt Wringe commented on GTNPORTAL-2017:
----------------------------------------

ignore the error message in the previous comment (that is actually caused when the siteName is null, and should be considered user error).

The real issue happens when we try and use getSite with a PORTAL site id.

This will work:
Id siteId = gateIn.siteId(Site.PORTAL, siteName);
gateIn.getPortal(siteId);

But this will not:
Id siteID = gateIn.siteId(Site.PORTAL, siteName);
gateIn.getSite(siteID, Site.PORTAL);

17:53:26,573 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: Unknown Site type: portal
17:53:26,573 ERROR [STDERR] 	at org.gatein.portal.api.impl.GateInImpl.getSite(GateInImpl.java:582)
17:53:26,573 ERROR [STDERR] 	at org.gatein.api.rest.resource.handler.SitesHandler.getPortalSiteResource(SitesHandler.java:113)
17:53:26,573 ERROR [STDERR] 	at org.gatein.api.rest.service.SitesService.getSite(SitesService.java:122)
17:53:26,573 ERROR [STDERR] 	... 47 more


> Can't retrieve site ids
> -----------------------
>
>                 Key: GTNPORTAL-2017
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-2017
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Java API
>            Reporter: Matt Wringe
>
> can't retrieve a portal site id. When trying to call this:
> gateIn.siteId(Site.PORTAL, siteName);
> Will fail with:
> 17:46:40,128 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: Wrong number of components: 1 for Context 'Site'. Was expecting at most 3 values for components: type, name, page, ; among which 'type, name' are required. Got: [portal]
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.id.GenericContext.validate(GenericContext.java:317)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.id.GenericContext.internalCreate(GenericContext.java:171)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.id.GenericContext.internalCreate(GenericContext.java:140)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.id.GenericContext.create(GenericContext.java:115)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.portal.api.impl.GateInImpl.siteId(GateInImpl.java:655)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.rest.resource.handler.SitesHandler.getPortalSiteResource(SitesHandler.java:112)
> 17:46:40,128 ERROR [STDERR] 	at org.gatein.api.rest.service.SitesService.getSite(SitesService.java:122)
> 17:46:40,128 ERROR [STDERR] 	... 47 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list