Fórumok

Unable to resolve variable: with LiferayFaces 3.0.1

thumbnail
Vikas Kadam, módosítva 11 év-val korábban

Unable to resolve variable: with LiferayFaces 3.0.1

New Member Bejegyzések: 22 Csatlakozás dátuma: 2011.06.15. Legújabb bejegyzések
Hi,

We are migrating from PortletFaces 2,0 to LiferayFaces 3.0.1. The application is working fine but the log has been filled with thousands of statements
[http-9080-6][2013-01-24 08:45:48,370] com.liferay.faces.portal.el.ExtELResolver.resolveVariable(ExtELResolver.java:71) -
Unable to resolve variable (variable_name) value=null

After observation I came to know that these all statements are for the binding attribute for the JSF components. I'm using the simple binding construct for binding like #{foo} and it was working fine. I per my understanding, by using such construct it get put in the default EL scope during building of the view tree and the context doesn't try to find the property(UI component instance) of the backing bean to bind this component.

We are using
Liferay EE 6.0
JSF 2.0 (jsf-impl-2.1.2.jar, jsf-api-2.1.2jar)
LiferayFaces 3.0.1 (liferay-faces-portal-3.0.1-ga2.jar, liferay-faces-bridge-impl-3.0.1-ga2.jar, liferay-faces-bridge-api-3.0.1-ga2.jar)

Is there any way we can resolve this or suppress this?

Kind Regards,
Vikas
thumbnail
Neil Griffin, módosítva 11 év-val korábban

RE: Unable to resolve variable: with LiferayFaces 3.0.1

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Lines 70-72 look like this:


			if (logger.isDebugEnabled()) {
				logger.debug("Unable to resolve variable [" + varName + "] value=" + value);
			}


You should only be seeing this output if the logger is enabled. Do you have log4j.jar in your deployed WEB-INF/lib folder?
thumbnail
Vikas Kadam, módosítva 11 év-val korábban

RE: Unable to resolve variable: with LiferayFaces 3.0.1

New Member Bejegyzések: 22 Csatlakozás dátuma: 2011.06.15. Legújabb bejegyzések
Thanks Neil! I have been waiting for your reply since last week. emoticon

Yes, I'm using log4j and the required jar is available in the deployed WEB-INF/lib folder.
I'm using the simple binding construct to get the component id in javascript and not binding the component instance to any
UIComponent type of property/variable in the backing bean.

As per my understanding, the PortletFaces used org.portletfaces.bridge.el.ELResolverImpl.class to resolve EL.
The same class is avialable in the bridge-impl jar at com.liferay.faces.bridge.el.ELResolverImpl.class

This debug statement is originated from com.liferay.faces.portal.el.ExtELResolver.class which is from liferay-faces-portal-3.0.1-ga2.jar.
I tried with removing this jar, and now there are no debug statements as it might using the ELResolverImpl.class from bridge-impl.

I have read "Liferay Faces Portal is a JAR that JSF developers can add as a dependency to their portlet WAR
projects in order to utilize Liferay-specific utilities and UI components."

There are only 2 LiferayFaces jars in lib now;
liferay-faces-bridge-api-3.0.1-ga2 and liferay-faces-bridge-impl-3.0.1-ga2 (as we are not uisng alloy also).

We are not using any liferay specific UI so can we ommit this liferay-faces-portal jar while migration?

Would you please clarify/correct me and provide the significance of the LiferayFaces jars in PortletFaces to LiferayFaces migration?

Kind Regards,
Vikas
thumbnail
Neil Griffin, módosítva 11 év-val korábban

RE: Unable to resolve variable: with LiferayFaces 3.0.1

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Hi Vikas,

Vikas Kadam:
We are not using any liferay specific UI so can we ommit this liferay-faces-portal jar while migration?

Sure, you can omit the liferay-faces-portal.jar dependency. It's optional. The ExtELResolver the comes with the liferay-faces-portal.jar dependency is only necessary for resolving the i18n keyword, which lets you utilize all of the internationalized language key translations that ship with Liferay Portal. For more info, see this wiki article: Internationalizing JSF Portlets.

Would you please clarify/correct me and provide the significance of the LiferayFaces jars in PortletFaces to LiferayFaces migration?

I think your understanding of the migration is correct.

Kind Regards,

Neil
thumbnail
Vikas Kadam, módosítva 11 év-val korábban

RE: Unable to resolve variable: with LiferayFaces 3.0.1

New Member Bejegyzések: 22 Csatlakozás dátuma: 2011.06.15. Legújabb bejegyzések
Thanks Neil,
After long discussion yesterday, we omitted that jar. Thanks for your approval also! emoticon

Kind regards,
Vikas
thumbnail
Neil Griffin, módosítva 11 év-val korábban

RE: Unable to resolve variable: with LiferayFaces 3.0.1

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
My pleasure Vikas. I'm glad it's working for you now. Thanks for using Liferay Faces. emoticon