You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2011/06/16 09:57:47 UTC

[jira] [Created] (SLING-2104) UnsupportedOperationException in DefaultPortletPreferencesService.store

UnsupportedOperationException in DefaultPortletPreferencesService.store
-----------------------------------------------------------------------

                 Key: SLING-2104
                 URL: https://issues.apache.org/jira/browse/SLING-2104
             Project: Sling
          Issue Type: Bug
          Components: General
            Reporter: Antonio Sanso


Step to reproduce:

- go in the edit mode of a portlet
- remove one preference

==> result in this stacktrace
Caused by: java.lang.UnsupportedOperationException: remove
	at org.apache.jackrabbit.core.LazyItemIterator.remove(LazyItemIterator.java:267)
	at org.apache.sling.portal.container.internal.services.DefaultPortletPreferencesService.store(DefaultPortletPreferencesService.java:242)
	at org.apache.pluto.container.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:278)
	at org.apache.pluto.container.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:249)

The problem is the #PropertyIterator.remove call that will call the remove of on of the implementation of PropertyIterator that is [0] in tihs case. From the API of [0]:
 
public void remove()

    Specified by:
        remove in interface Iterator

    Throws:
        UnsupportedOperationException - always since removal is not implemented.


[0] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/jcr2spi/LazyItemIterator.html

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

        

[jira] [Resolved] (SLING-2104) UnsupportedOperationException in DefaultPortletPreferencesService.store

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-2104.
-------------------------------------

    Resolution: Fixed
      Assignee: Carsten Ziegeler

Thanks for your patch, Antonio - I've applied it in revision 1140101

> UnsupportedOperationException in DefaultPortletPreferencesService.store
> -----------------------------------------------------------------------
>
>                 Key: SLING-2104
>                 URL: https://issues.apache.org/jira/browse/SLING-2104
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>            Reporter: Antonio Sanso
>            Assignee: Carsten Ziegeler
>         Attachments: SLING-2104.patch
>
>
> Step to reproduce:
> - go in the edit mode of a portlet
> - remove one preference
> ==> result in this stacktrace
> Caused by: java.lang.UnsupportedOperationException: remove
> 	at org.apache.jackrabbit.core.LazyItemIterator.remove(LazyItemIterator.java:267)
> 	at org.apache.sling.portal.container.internal.services.DefaultPortletPreferencesService.store(DefaultPortletPreferencesService.java:242)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:278)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:249)
> The problem is the #PropertyIterator.remove call that will call the remove of on of the implementation of PropertyIterator that is [0] in tihs case. From the API of [0]:
>  
> public void remove()
>     Specified by:
>         remove in interface Iterator
>     Throws:
>         UnsupportedOperationException - always since removal is not implemented.
> [0] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/jcr2spi/LazyItemIterator.html

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

        

[jira] [Commented] (SLING-2104) UnsupportedOperationException in DefaultPortletPreferencesService.store

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050280#comment-13050280 ] 

Antonio Sanso commented on SLING-2104:
--------------------------------------

I just realized I have pasted the wrong API link. Apologies this should be the right one:

http://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/core/LazyItemIterator.html#remove%28%29

> UnsupportedOperationException in DefaultPortletPreferencesService.store
> -----------------------------------------------------------------------
>
>                 Key: SLING-2104
>                 URL: https://issues.apache.org/jira/browse/SLING-2104
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>            Reporter: Antonio Sanso
>         Attachments: SLING-2104.patch
>
>
> Step to reproduce:
> - go in the edit mode of a portlet
> - remove one preference
> ==> result in this stacktrace
> Caused by: java.lang.UnsupportedOperationException: remove
> 	at org.apache.jackrabbit.core.LazyItemIterator.remove(LazyItemIterator.java:267)
> 	at org.apache.sling.portal.container.internal.services.DefaultPortletPreferencesService.store(DefaultPortletPreferencesService.java:242)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:278)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:249)
> The problem is the #PropertyIterator.remove call that will call the remove of on of the implementation of PropertyIterator that is [0] in tihs case. From the API of [0]:
>  
> public void remove()
>     Specified by:
>         remove in interface Iterator
>     Throws:
>         UnsupportedOperationException - always since removal is not implemented.
> [0] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/jcr2spi/LazyItemIterator.html

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

        

[jira] [Updated] (SLING-2104) UnsupportedOperationException in DefaultPortletPreferencesService.store

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2104:
---------------------------------

    Attachment: SLING-2104.patch

attaching simple patch that uses #Property.remove rather than #PropertyIterator.remove

> UnsupportedOperationException in DefaultPortletPreferencesService.store
> -----------------------------------------------------------------------
>
>                 Key: SLING-2104
>                 URL: https://issues.apache.org/jira/browse/SLING-2104
>             Project: Sling
>          Issue Type: Bug
>          Components: General
>            Reporter: Antonio Sanso
>         Attachments: SLING-2104.patch
>
>
> Step to reproduce:
> - go in the edit mode of a portlet
> - remove one preference
> ==> result in this stacktrace
> Caused by: java.lang.UnsupportedOperationException: remove
> 	at org.apache.jackrabbit.core.LazyItemIterator.remove(LazyItemIterator.java:267)
> 	at org.apache.sling.portal.container.internal.services.DefaultPortletPreferencesService.store(DefaultPortletPreferencesService.java:242)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.internalStore(PortletPreferencesImpl.java:278)
> 	at org.apache.pluto.container.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:249)
> The problem is the #PropertyIterator.remove call that will call the remove of on of the implementation of PropertyIterator that is [0] in tihs case. From the API of [0]:
>  
> public void remove()
>     Specified by:
>         remove in interface Iterator
>     Throws:
>         UnsupportedOperationException - always since removal is not implemented.
> [0] http://jackrabbit.apache.org/api/1.4/org/apache/jackrabbit/jcr2spi/LazyItemIterator.html

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