[gatein-issues] [JBoss JIRA] (GTNPORTAL-3267) MOP import resource

Nick Scavelli (JIRA) jira-events at lists.jboss.org
Wed Sep 25 10:58:03 EDT 2013


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

Nick Scavelli commented on GTNPORTAL-3267:
------------------------------------------

Can I ask what coding is being done for this ? From my perspective this bug is fixed in 3.6. Is this for work to port it to 3.5 branch ?
                
> MOP import resource
> -------------------
>
>                 Key: GTNPORTAL-3267
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-3267
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Java API
>    Affects Versions: 3.5.6.Final
>            Reporter: Boubaker Khanfir
>            Assignee: Hai Nguyen
>             Fix For: 3.7.0.Final
>
>   Original Estimate: 4 hours
>  Remaining Estimate: 4 hours
>
> MOP resource management is based on a custom marshaller/unmarshaller (org.exoplatform.portal.mop.management.binding.xml.*).
> I had used the mop managed resource in a custom case:
> * Create a new site.
> * Add PortalBody in a container.
> * Export site using GateIN management.
> * Re-import exported site.
> => Exception:
> {code}
> Operation exception for operation import-resource and address /mop [org.gatein.management.cli<pool-4-thread-1>]
> org.gatein.management.api.exceptions.OperationException: Exception reading data for import.
>         at org.exoplatform.portal.mop.management.operations.MopImportResource.execute(MopImportResource.java:198) ~[exo.portal.component.portal-3.5.x-PLF-SNAPSHOT.jar:3.5.x-PLF-SNAPSHOT]
>         at org.gatein.management.core.api.controller.SimpleManagementController.execute(SimpleManagementController.java:100) ~[gatein-management-core-1.1.0.Final.jar:1.1.0.Final]
> ...
> Caused by: org.staxnav.StaxNavException: Unexpected element 'page-body' at [row,col]:[167,21]
>         at org.gatein.common.xml.stax.navigator.Exceptions.unexpectedElement(Exceptions.java:45) ~[exo.portal.component.common-3.5.x-PLF-SNAPSHOT.jar:3.5.x-PLF-SNAPSHOT]
>         at org.exoplatform.portal.mop.management.binding.xml.AbstractMarshaller.unmarshalContainer(AbstractMarshaller.java:171) ~[exo.portal.component.portal-3.5.x-PLF-SNAPSHOT.jar:3.5.x-PLF-SNAPSHOT]
>         at org.exoplatform.portal.mop.management.binding.xml.SiteLayoutMarshaller.unmarshalPortalConfig(SiteLayoutMarshaller.java:216) ~[exo.portal.component.portal-3.5.x-PLF-SNAPSHOT.jar:3.5.x-PLF-SNAPSHOT]
>         at org.exoplatform.portal.mop.management.binding.xml.SiteLayoutMarshaller.unmarshal(SiteLayoutMarshaller.java:80) ~[exo.portal.component.portal-3.5.x-PLF-SNAPSHOT.jar:3.5.x-PLF-SNAPSHOT]
>         ... 40 common frames omitted
> {code}
> To fix this I used the *default* MOP marshaller:
> {code}
> import org.exoplatform.portal.config.model.ModelUnmarshaller;
> // ...
>       public PortalConfig unmarshal(InputStream inputStream) throws BindingException {
>         try {
>           return ModelUnmarshaller.unmarshall(PortalConfig.class, inputStream).getObject();
>         } catch (Exception e) {
>           throw new BindingException(e);
>         }
>       }
> //...
>       public Page.PageSet unmarshal(InputStream inputStream) throws BindingException {
>         try {
>           return ModelUnmarshaller.unmarshall(Page.PageSet.class, inputStream).getObject();
>         } catch (Exception e) {
>           throw new BindingException(e);
>         }
>       }
> //...
>       public PageNavigation unmarshal(InputStream inputStream) throws BindingException {
>         try {
>           return ModelUnmarshaller.unmarshall(PageNavigation.class, inputStream).getObject();
>         } catch (Exception e) {
>           throw new BindingException(e);
>         }
>       }
> // ...
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the gatein-issues mailing list