Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-59161

PortalLDAPUtil generates NullPointerException while debug is on

    Details

      Description

      PortalLDAPUtil generates NullPointerException while debug is on.

      10:32:28,091 ERROR [[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'][LDAPAuth:341] Problem accessing LDAP server
      java.lang.NullPointerException
              at javax.naming.directory.BasicAttributes.get(BasicAttributes.java:161)
              at com.liferay.portal.security.ldap.PortalLDAPUtil.getGroupAttributes(PortalLDAPUtil.java:229)
              at com.liferay.portal.security.ldap.PortalLDAPUtil.getGroupAttributes(PortalLDAPUtil.java:201)
              at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroup(PortalLDAPImporterImpl.java:760)
              at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importGroups(PortalLDAPImporterImpl.java:851)
              at com.liferay.portal.security.ldap.PortalLDAPImporterImpl.importLDAPUser(PortalLDAPImporterImpl.java:242)
              at com.liferay.portal.security.ldap.PortalLDAPImporterUtil.importLDAPUser(PortalLDAPImporterUtil.java:57)
              at com.liferay.portal.security.auth.LDAPAuth.authenticate(LDAPAuth.java:314)
              at com.liferay.portal.security.auth.LDAPAuth.authenticate(LDAPAuth.java:392)
              at com.liferay.portal.security.auth.LDAPAuth.authenticateByScreenName(LDAPAuth.java:97)
              at com.liferay.portal.security.auth.AuthPipeline._authenticate(AuthPipeline.java:231)
              at com.liferay.portal.security.auth.AuthPipeline.authenticateByScreenName(AuthPipeline.java:50)
              at com.liferay.portal.service.impl.UserLocalServiceImpl.authenticate(UserLocalServiceImpl.java:5478)
              at com.liferay.portal.service.impl.UserLocalServiceImpl.authenticateByScreenName(UserLocalServiceImpl.java:1107)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              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.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
              at com.sun.proxy.$Proxy173.authenticateByScreenName(Unknown Source)
              at com.liferay.portal.service.UserLocalServiceUtil.authenticateByScreenName(UserLocalServiceUtil.java:1313)
              at com.liferay.portlet.login.util.LoginUtil.getAuthenticatedUserId(LoginUtil.java:137)
              at com.liferay.portlet.login.util.LoginUtil.login(LoginUtil.java:219)
              at com.liferay.portlet.login.action.LoginAction.login(LoginAction.java:202)
              at com.liferay.portlet.login.action.LoginAction.processAction(LoginAction.java:93)
              at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:166)
              at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:218)
              at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
              at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
              at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:597)
              at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:628)
              at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:308)
              at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:389)
              at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:107)
              at com.liferay.portlet.SecurityPortletContainerWrapper.processAction(SecurityPortletContainerWrapper.java:109)
              at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:75)
              at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:115)
              at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:386)
              at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:200)
              at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:95)
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
              at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:168)
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
              at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
              at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:574)
              at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:551)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
              at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
              at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
              at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
              at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
              at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
              at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
              at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
      

      and related code

      		if (_log.isDebugEnabled()) {
      			for (String attributeId : mappedGroupAttributeIds) {
      				Attribute attribute = attributes.get(attributeId); // LINE 229
      
      				if (attribute == null) {
      					continue;
      				}
      
      				_log.debug("LDAP group attribute " + attribute.toString());
      			}
      		}
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              beck.liu Beck Liu
              Reporter:
              sampsa.sohlman Sampsa Sohlman (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 4 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 Alpha 4