Project

General

Profile

Actions

Incident #6577

closed

Workspace portlet tries to retrieve information about a JackRabbit Role and receives an error

Added by Massimiliano Assante over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Other
Target version:
Start date:
Jan 24, 2017
Due date:
Jan 27, 2017
% Done:

100%

Estimated time:
Infrastructure:
Production

Description

I see that the HL returns this user and the Workspace tries to get its information, but the exception should be managed properly. Either the HL does not return these users or Workspace does not print the stack trace on ERROR, it should print a WARN with a message at least.

18:05:05,186 ERROR [http-bio-9090-exec-85][LiferayUserManager:437] Failed to fetch user by username = d4science.research-infrastructures.eu-D4Research-OpenAIRE-Connect_Coordination-Manager
com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=20154, screenName=d4science.research-infrastructures.eu-d4research-openaire-connect_coordination-manager}
    at com.liferay.portal.service.persistence.UserPersistenceImpl.findByC_SN(UserPersistenceImpl.java:4272)
    at com.liferay.portal.service.impl.UserLocalServiceImpl.getUserByScreenName(UserLocalServiceImpl.java:2778)
    at sun.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
    at com.sun.proxy.$Proxy621.getUserByScreenName(Unknown Source)
    at com.liferay.portal.service.UserLocalServiceWrapper.getUserByScreenName(UserLocalServiceWrapper.java:2333)
    at sun.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
    at com.sun.proxy.$Proxy622.getUserByScreenName(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor635.invoke(Unknown Source)
    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.$Proxy107.getUserByScreenName(Unknown Source)
    at com.liferay.portal.service.UserLocalServiceUtil.getUserByScreenName(UserLocalServiceUtil.java:2204)
    at org.gcube.vomanagement.usermanagement.impl.LiferayUserManager.getUserByUsername(LiferayUserManager.java:434)
    at org.gcube.vomanagement.usermanagement.impl.LiferayUserManager.getUserByScreenName(LiferayUserManager.java:451)
    at org.gcube.portlets.user.workspace.server.util.UserUtil.getUserFullName(UserUtil.java:59)
    at org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder.buildGxtInfoContactFromPortalLogin(GWTWorkspaceBuilder.java:641)
    at org.gcube.portlets.user.workspace.server.GWTWorkspaceBuilder.buildGxtInfoContactsFromPortalLogins(GWTWorkspaceBuilder.java:621)
    at org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl.getListUserSharedByFolderSharedId(GWTWorkspaceServiceImpl.java:1766)
    at org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl.checkNotifyAddItemToShare(GWTWorkspaceServiceImpl.java:743)
    at org.gcube.portlets.user.workspace.server.GWTWorkspaceServiceImpl.createFolder(GWTWorkspaceServiceImpl.java:985)

Actions #1

Updated by Francesco Mangiacrapa over 8 years ago

  • Assignee changed from Francesco Mangiacrapa to Massimiliano Assante

Hi Massimiliamo,

following the stack trace the point where it is printed the exception:

"18:05:05,186 ERROR [http-bio-9090-exec-85][LiferayUserManager:437] Failed to fetch user by username = d4science.research-infrastructures.eu-D4Research-OpenAIRE-Connect_Coordination-Manager"

is here:

    /**
     * {@inheritDoc}
     */
    @Override
    public GCubeUser getUserByUsername(String username) throws UserManagementSystemException, UserRetrievalFault {
        User toGet = null;
        GCubeUser toReturn = null;
        try {
            //_log.debug("Trying to fetch user by username = " + username);
            toGet = UserLocalServiceUtil.getUserByScreenName(ManagementUtils.getCompany().getCompanyId(), username);
            toReturn = mapLRUser(toGet);
        } catch (PortalException e) {
            _log.error("Failed to fetch user by username = " + username, e);
            throw new UserRetrievalFault("User not existing", e);
        } catch (SystemException e) {
            _log.error("Failed to fetch user by username = " + username, e);
            throw new UserManagementSystemException(e.getMessage(), e);
        }
        return toReturn;
    }

which is part of LiferayUserManager.class
You must change that method in order to print a simple "WARNING" and not the whole stack

Actions #2

Updated by Massimiliano Assante over 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

you right, my fault #6594 fix the issue

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)