Forums de discussion

Cannot import LoginUtil

thumbnail
M. Garcia, modifié il y a 12 années.

Cannot import LoginUtil

Regular Member Publications: 107 Date d'inscription: 17/05/11 Publications récentes
Hello,

I'm developping a portlet that would display a link to connect as a user and explore the portal (for demo purpose).

Here's the import line causing the error (hilighted by Eclipse) :
import com.liferay.portlet.login.util.LoginUtil;


I have this error when deploying :
java.lang.Error: Unresolved compilation problems:
 The import com.liferay.portlet.login cannot be resolved
 LoginUtil cannot be resolved


I have developped several portlets with no such import errors, this seems to be a Build Path issue but all other imports work from com.liferay*.

Thanks for enlightening me ! =)

PS : Liferay 6.0.6
thumbnail
jelmer kuperus, modifié il y a 12 années.

RE: Cannot import LoginUtil (Réponse)

Liferay Legend Publications: 1191 Date d'inscription: 10/03/10 Publications récentes
That class is located in portal-impl.jar, these are classes internal to liferay and not part of its public api
thumbnail
chirag soni, modifié il y a 7 années.

RE: Cannot import LoginUtil

New Member Publications: 2 Date d'inscription: 15/05/13 Publications récentes
So Suppose I want to adding role when user creating account, how i can achieve that functionality?

Currently I created struts action hook but LoginUtil class not import in my Custom class.

Can you please help me with this.

Thanks in Advanceemoticon
Pooja P Joshi, modifié il y a 12 années.

RE: Cannot import LoginUtil (Réponse)

New Member Publications: 10 Date d'inscription: 18/11/09 Publications récentes
portal-impl classes are not accessible from plugins. You can access portal-service and portal-kernel only.

Thanks,
-Pooja
thumbnail
M. Garcia, modifié il y a 12 années.

RE: Cannot import LoginUtil

Regular Member Publications: 107 Date d'inscription: 17/05/11 Publications récentes
Well, thank you =)