java.lang.NullPointerException

Liferay Issues | Marco Abamonga | 3 years ago
  1. 0

    *ISSUE* Although you are setting Asset Publisher to only display items that match certain custom user profile attributes, all assets still display for Users that have left the custom user field blank. *STEPS TO REPRODUCE* (1) Create Custom attribute for User (e.g. Location) (2) Make sure to set permissions so that users can view the attribute (3) Create Vocabulary ("Location") *in the global scope*. (4) Add categories to vocabulary (e.g. "Chicago") (5) Set "Chicago" to location user attribute for User 1. Do not set a location for User 2. (6) Create and Categorize content with "Chicago" from location vocabulary. (7) Add asset publisher and specify "Location" as the user profile attribute to personalize upon (8) Sign in as User 1, he will see the article categorized as Chicago. (9) Sign in as User 2, he will also see the article *Note: Workaround for QA: This issue is affected by LPS-43872, to avoid this issue we need to add a web content using the asset publisher.* *Note: When Test Test searches for the location 'Chicago', the AP portlet crashes and the following stacktrace is thrown:* {code} 14:58:35,329 ERROR [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'][IncludeTag:129] Current URL /web/guest/wc-page?p_auth=hl0dS1Dk&p_p_id=86&p_p_lifecycle=1&p_p_state=pop_up&p_p_mode=view&_86_struts_action=%2Fportlet_configuration%2Fedit_configuration&_86_returnToFullPageURL=%2Fweb%2Fguest%2Fwc-page&_86_portletResource=101_INSTANCE_uXOt5mimCgSA&_86_previewWidth= generates exception: java.lang.RuntimeException: java.lang.NullPointerException java.lang.NullPointerException at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains(ExpandoColumnPermissionImpl.java:71) at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil.contains(ExpandoColumnPermissionUtil.java:59) at com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.getData(ExpandoValueServiceImpl.java:122) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175) at com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(ExpandoValueServiceUtil.java:107) at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:208) at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:199) at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.addUserAttributes(AssetPublisherImpl.java:270) at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.addUserAttributes(AssetPublisherUtil.java:82) at com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor.processAssetEntryQuery(CustomUserAttributesAssetEntryQueryProcessor.java:40) at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.processAssetEntryQuery(AssetPublisherImpl.java:1102) at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.processAssetEntryQuery(AssetPublisherUtil.java:266) 14:58:35,735 ERROR [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'][IncludeTag:129] Current URL /web/guest/wc-page generates exception: java.lang.RuntimeException: java.lang.NullPointerException java.lang.NullPointerException at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains(ExpandoColumnPermissionImpl.java:71) at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil.contains(ExpandoColumnPermissionUtil.java:59) at com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.getData(ExpandoValueServiceImpl.java:122) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115) at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62) at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56) at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111) at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175) at com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(ExpandoValueServiceUtil.java:107) at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:208) at com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:199) at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.addUserAttributes(AssetPublisherImpl.java:270) at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.addUserAttributes(AssetPublisherUtil.java:82) at com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor.processAssetEntryQuery(CustomUserAttributesAssetEntryQueryProcessor.java:40) at com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.processAssetEntryQuery(AssetPublisherImpl.java:1102) at com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.processAssetEntryQuery(AssetPublisherUtil.java:266) {code}

    Liferay Issues | 3 years ago | Marco Abamonga
    java.lang.NullPointerException
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains()
    2. Liferay Portal Service
      ExpandoColumnPermissionUtil.contains
      1. com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionImpl.contains(ExpandoColumnPermissionImpl.java:71)
      2. com.liferay.portlet.expando.service.permission.ExpandoColumnPermissionUtil.contains(ExpandoColumnPermissionUtil.java:59)
      2 frames
    3. Liferay Portal Impl
      ServiceBeanAopProxy.invoke
      1. com.liferay.portlet.expando.service.impl.ExpandoValueServiceImpl.getData(ExpandoValueServiceImpl.java:122)
      2. com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      3. com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      4. com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
      5. com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      6. com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      7. com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      8. com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
      9. com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      10. com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      10 frames
    4. Liferay Portal Service
      ExpandoValueServiceUtil.getData
      1. com.liferay.portlet.expando.service.ExpandoValueServiceUtil.getData(ExpandoValueServiceUtil.java:107)
      1 frame
    5. Liferay Portal Impl
      ExpandoBridgeImpl.getAttribute
      1. com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:208)
      2. com.liferay.portlet.expando.model.impl.ExpandoBridgeImpl.getAttribute(ExpandoBridgeImpl.java:199)
      2 frames
    6. Liferay Portal Service
      AssetPublisherUtil.processAssetEntryQuery
      1. com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.addUserAttributes(AssetPublisherImpl.java:270)
      2. com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.addUserAttributes(AssetPublisherUtil.java:82)
      3. com.liferay.portlet.assetpublisher.util.CustomUserAttributesAssetEntryQueryProcessor.processAssetEntryQuery(CustomUserAttributesAssetEntryQueryProcessor.java:40)
      4. com.liferay.portlet.assetpublisher.util.AssetPublisherImpl.processAssetEntryQuery(AssetPublisherImpl.java:1102)
      5. com.liferay.portlet.assetpublisher.util.AssetPublisherUtil.processAssetEntryQuery(AssetPublisherUtil.java:266)
      5 frames