java.lang.UnsupportedOperationException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After upgrading to 6.2 and using a different JVM, dynamic rendering of Asset Publisher portlet fails with: 08:13:54,652 ERROR [RuntimePageImpl-332][IncludeTag:129] Current URL /verloning-voordelen-onkosten generates exception: com.liferay.portal.kernel.search.SearchException: java.lang.UnsupportedOperationException java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at com.liferay.portlet.assetpublisher.util.AssetSearcher.addSearchAnyCategories(AssetSearcher.java:200) at com.liferay.portlet.assetpublisher.util.AssetSearcher.addSearchAssetCategoryIds(AssetSearcher.java:241) at com.liferay.portal.kernel.search.BaseIndexer.getFullQuery(BaseIndexer.java:235) at com.liferay.portal.kernel.search.BaseIndexer.search(BaseIndexer.java:487) at com.liferay.portlet.asset.util.AssetUtil.search(AssetUtil.java:590) at com.liferay.portlet.asset.util.AssetUtil.search(AssetUtil.java:535) at org.apache.jsp.html.portlet.asset_005fpublisher.view_jsp._jspService(view_jsp.java:1859) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295) at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83) at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3807) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) Based on the exception thrown, it seems that an immutable collection is created and at subsequent renderings we try to add elements to it, hence the unsupported operation exception. The service methods mostly return immutable collections, getSubcategoryIds() is no exception. The code above is broken in a sense that it shouldn't assign the result getSubcategoryIds() to a variable which will be manipulated afterwards.
    via by Istvan Dezsi,
  • abstractlist protobuf java
    via Stack Overflow by AxelF
    ,
  • javfx error on tableview filter
    via Stack Overflow by user3808438
    ,
    • java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:148) at java.util.AbstractList.add(AbstractList.java:108) at com.liferay.portlet.assetpublisher.util.AssetSearcher.addSearchAnyCategories(AssetSearcher.java:200) at com.liferay.portlet.assetpublisher.util.AssetSearcher.addSearchAssetCategoryIds(AssetSearcher.java:241) at com.liferay.portal.kernel.search.BaseIndexer.getFullQuery(BaseIndexer.java:235) at com.liferay.portal.kernel.search.BaseIndexer.search(BaseIndexer.java:487) at com.liferay.portlet.asset.util.AssetUtil.search(AssetUtil.java:590) at com.liferay.portlet.asset.util.AssetUtil.search(AssetUtil.java:535) at org.apache.jsp.html.portlet.asset_005fpublisher.view_jsp._jspService(view_jsp.java:1859) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78) at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53) at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295) at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192) at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83) at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3807) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

    Users with the same issue

    osvzs
    2 times, last one,
    jf-ast
    1 times, last one,
    Alireza Mohamadi
    1 times, last one,
    tvrmsmith
    1 times, last one,
    sriharshakiran
    1 times, last one,
    7 more bugmates