Foros de discusión

Liferau 7 PortletProps not work

Montej Shah, modificado hace 7 años.

Liferau 7 PortletProps not work

Junior Member Mensajes: 48 Fecha de incorporación: 18/02/15 Mensajes recientes
Hi all,
I have created portlet in liferay 7.
I have used below code in controller.
PortletProps.get("subject.list.id")


This code require com.liferay.util.java module.
I have import the com.liferay.util.java-2.2.2.jar as module in liferay 7.
Also add dependency as below in my maven project.

<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>com.liferay.util.java</artifactId>
<version>2.2.2</version>
<scope>provided</scope>
</dependency>


When i add portlet in to page it give below error.

12:37:42,138 ERROR [http-nio-8080-exec-5][status_jsp:950] com.liferay.portal.kernel.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.liferay.util.portlet.PortletProps


How to resolve this?
Is there any other way to get properties from liferay 7's portlet.properties file?
thumbnail
Tejas Kanani, modificado hace 7 años.

RE: Liferau 7 PortletProps not work

New Member Mensaje: 1 Fecha de incorporación: 23/12/16 Mensajes recientes
Montej,

Were you able to pass through the issue you were facing while using
PortletProps.get("subject.list.id")
?
If yes, would you please share the solution for it here ?

Thanks.
thumbnail
Aravinth Kumar, modificado hace 6 años.

RE: Liferau 7 PortletProps not work

Regular Member Mensajes: 152 Fecha de incorporación: 26/06/13 Mensajes recientes
Hi,
If you solved this issue already can you please post your solution over here. Do anyone have same type of issue ?

Thanks in Advance.

Regards,
Aravinth
mahesh gade, modificado hace 6 años.

RE: Liferau 7 PortletProps not work

Junior Member Mensajes: 44 Fecha de incorporación: 5/12/13 Mensajes recientes
Hi friends ,

Any one have found the solution for this issue.

Thanks.
thumbnail
mouli siripurapu, modificado hace 6 años.

RE: Liferau 7 PortletProps not work

New Member Mensajes: 5 Fecha de incorporación: 10/02/14 Mensajes recientes
Add this line into bnd.bnd file:
Include-Resource: \
@com.liferay.util.java-2.0.1.jar


Update the dependency in bulid.gradle file
compileOnly group: "com.liferay.portal", name: "com.liferay.util.java", version: "2.0.1"

And then Refresh->Depoly....