Liferay : How to get user profilePicURL without ThemeDisplay in serviceImpl classes?
<p>I want to get a user's profilePicURL in a web-service call.
<br>I just have a userId of that User.
<br>This is what I am trying</p>

<pre><code>public String getProfilePicURL(long userId) throws SystemException,
        PortalException {
    String url = "";

    ServiceContext serviceContext = ServiceContextThreadLocal
            .getServiceContext();
    ThemeDisplay themeDisplay = serviceContext.getThemeDisplay();

    User user = UserLocalServiceUtil.getUser(userId);

    try {
        url = user.getPortraitURL(themeDisplay);
    } catch (PortalException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } finally {
        return url;
    }
}
</code></pre>

<p>When I did <code>System.out.println(themeDisplay)</code>, it came out as <code>null</code>
<br>I don't know any other way of achieving this.
<br><br>What should I change ? </p>