Fórum

PortalUtil class not found when moving to Liferay 7

Erik Bruchez, modificado 7 Anos atrás.

PortalUtil class not found when moving to Liferay 7

New Member Postagens: 4 Data de Entrada: 24/07/14 Postagens Recentes
I have a portlet which deploys in Liferay all the way until 6.2, but in Liferay 7 I get:

25-Aug-2016 23:54:51.073 SEVERE [http-nio-9090-exec-1] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception
java.lang.ClassNotFoundException: com.liferay.portal.util.PortalUtil cannot be found by proxy-portlet_7.0.2
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:394)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.orbeon.private.orbeon.oxf.portlet.liferay.FormRunnerAuthFilter$.amendRequestWithUser(FormRunnerAuthFilter.scala:97)


The call is from our own portlet filter which makes use of com.liferay.portal.util.PortalUtil.

I checked the API modules page, and Breaking Changes part of the doc, but I don't see anything indicating that the class is no longer present.

Due to OSGi, do I need to somehow indicate in a portlet descriptor that I need PortalUtil? Or should I use another API?
thumbnail
Juan Gonzalez, modificado 7 Anos atrás.

RE: PortalUtil class not found when moving to Liferay 7

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi Erik, PortalUtil had been moved to:

com.liferay.portal.kernel.util


package, as you can see here:

https://github.com/liferay/liferay-portal/blob/7.0.2-ga3/portal-kernel/src/com/liferay/portal/kernel/util/PortalUtil.java
Erik Bruchez, modificado 7 Anos atrás.

RE: PortalUtil class not found when moving to Liferay 7

New Member Postagens: 4 Data de Entrada: 24/07/14 Postagens Recentes
Thanks, I will give that a try!