Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vikas Kadam
Unable to resolve variable: with LiferayFaces 3.0.1
January 25, 2013 4:32 AM
Answer

Vikas Kadam

Rank: New Member

Posts: 22

Join Date: June 15, 2011

Recent Posts

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
Neil Griffin
RE: Unable to resolve variable: with LiferayFaces 3.0.1
January 29, 2013 12:52 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

Lines 70-72 look like this:

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


You should only be seeing this output if the logger is enabled. Do you have log4j.jar in your deployed WEB-INF/lib folder?
Vikas Kadam
RE: Unable to resolve variable: with LiferayFaces 3.0.1
January 30, 2013 12:22 AM
Answer

Vikas Kadam

Rank: New Member

Posts: 22

Join Date: June 15, 2011

Recent Posts

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
Neil Griffin
RE: Unable to resolve variable: with LiferayFaces 3.0.1
January 30, 2013 8:01 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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
Vikas Kadam
RE: Unable to resolve variable: with LiferayFaces 3.0.1
January 31, 2013 12:31 AM
Answer

Vikas Kadam

Rank: New Member

Posts: 22

Join Date: June 15, 2011

Recent Posts

Thanks Neil,
After long discussion yesterday, we omitted that jar. Thanks for your approval also! emoticon

Kind regards,
Vikas
Neil Griffin
RE: Unable to resolve variable: with LiferayFaces 3.0.1
January 31, 2013 8:26 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

My pleasure Vikas. I'm glad it's working for you now. Thanks for using Liferay Faces. emoticon