掲示板

Cannot import LoginUtil

thumbnail
12年前 に M. Garcia によって更新されました。

Cannot import LoginUtil

Regular Member 投稿: 107 参加年月日: 11/05/17 最新の投稿
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
12年前 に jelmer kuperus によって更新されました。

RE: Cannot import LoginUtil (回答)

Liferay Legend 投稿: 1191 参加年月日: 10/03/10 最新の投稿
That class is located in portal-impl.jar, these are classes internal to liferay and not part of its public api
thumbnail
7年前 に chirag soni によって更新されました。

RE: Cannot import LoginUtil

New Member 投稿: 2 参加年月日: 13/05/15 最新の投稿
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
12年前 に Pooja P Joshi によって更新されました。

RE: Cannot import LoginUtil (回答)

New Member 投稿: 10 参加年月日: 09/11/18 最新の投稿
portal-impl classes are not accessible from plugins. You can access portal-service and portal-kernel only.

Thanks,
-Pooja
thumbnail
12年前 に M. Garcia によって更新されました。

RE: Cannot import LoginUtil

Regular Member 投稿: 107 参加年月日: 11/05/17 最新の投稿
Well, thank you =)