Foros de discusión

Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse project

thumbnail
I-A Kotopoulos, modificado hace 10 años.

Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse project

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
I have recently installed Liferay and sdk 6.2.0. I can successfully build,deploy and use JSF portlets. The problem starts when I add a second problem to the same eclipse portal project. The no longer seem to receive any events neither throw any kind of error either in the browser or in tomcat log. The same code is ok in a single portlet project. The problem looks similar to these thread https://www.liferay.com/community/forums/-/message_boards/message/32026655?_19_threadView=tree but still nothing I can figure out.

I have difficulty even in spotting the problem so any help would be valuable. thanks in advance
ioannis
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
When you wrote:

The problem starts when I add a second problem to the same eclipse portal project


Do you mean that simply adding another <portlet> entry to your WEB-INF/portlet.xml causes the problem?

Or do you mean that adding two JSF portlets to a portal page causes the problem?
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
Neil Griffin:
When you wrote:

... simply adding another <portlet> entry to your WEB-INF/portlet.xml causes the problem?


this is the problem. A single portlet on a page doesn't make a difference. It still not works
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
I would recommend that you download and deploy the war for the jsf2-ipc-pub-render-params-portlet (version 3.2.4-ga5-SNAPSHOT) from the snapshot repository.

The portlet.xml descriptor has two <portlet> elements inside it. Please let me know if it works OK in your environment.
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
Neil,
thank you for the response. I just deployed the war and it seems to work properly! I have the following error

SEVERE: Critical error during deployment: 
com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl.  If not using JSP or the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set.
	at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:645)
	at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:234)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4937)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)



but the behavior seems normal. What would you suggest for the error and what for my initial problem? I suppose something isn't set properly in my project.
thank you again
ioannis
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
I attach a version of my portlet.xml. It has some obvious differences in the used packages but they are all autogenerated. All of the included portlets are jsf portlets and I am using primefaces in two of them. All of them get deployed with no errors but the problem is as stated in my initial post.

Archivos adjuntos:

thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
When you wrote:

I have the following error ... It appears the JSP version of the container is older than 2.1


Are saying that the error occurs with the jsf2-ipc-pub-render-params portlet? Or are you saying that the error occurs with your own portlet?
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
It occurs with the jsf2-ipc-pub-render-params portlet
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Are you deploying the .war to the Liferay /deploy folder?

Also, are you deploying to Liferay+Tomcat or some other server besides Tomcat?
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
Yes I am deploying in Liferay's deploy folder and I am using Tomcat. You think my portlet.xml file is ok?
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Regarding the portlet.xml descriptor you attached, I noticed a reference to "org.portletfaces.bridge.GenericFacesPortlet"

This is a problem because we are not able to support the old PortletFaces Bridge project, since it does not support the JSR 329 standard. Please refer to Chapter 19 of the Liferay Faces Documentation titled "Migration Guide" for more info.

Regarding the "JSP version of the container is older than 2.1" error, are you sure that it is caused by the jsf2-ipc-pub-render-params portlet? Please remove all other portlets under tomcat/webapps and then restart Tomcat with only the jsf2-ipc-pub-render-params in order to make sure. According to this answer at stackoverflow.com by BalusC, this should only happen if you are deploying to an old server like Tomcat 6, or if your web.xml version is wrong. Also, this should not happen with the jsf2-ipc-pub-render-params-portlet because we use JBoss EL by default.
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
In the meantime I was facing some other issues so, sorry for my delay.
I studied the migration guide and I tried following the suggestion of using javax.portlet.faces.GenericFacesPortlet in portlet.xml and didn't notice any difference. In the rest of chapter 19 it is not very clear where the refactoring of the packages is needed. I would appreciate any further suggestions.
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Do the portletfaces jars still exist In your tomcat/webapps/portlet/WEB-INF/lib folder?
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
I never removed any jar from the folder. I also suppose I would get a build error in case anything was missing. In any case I think it would be useful if you could name me or give me a reference to the needed jars. Maybe with their versions too.. I didn't have similar problems with liferay 6.1
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro (Respuesta)

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Here are the jars that you need in WEB-INF/lib for a typical PrimeFaces portlet:

commons-fileupload-1.2.2.jar
commons-io-1.3.2.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.1.21.jar
jsf-impl-2.1.21.jar
liferay-faces-alloy-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-bridge-api-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-bridge-impl-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-util-3.2.4-ga5-SNAPSHOT.jar
primefaces-3.5.jar

It would be best to remove any others that are not needed, like the portletfaces jars.
Micael Ericsson, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Regular Member Mensajes: 169 Fecha de incorporación: 11/12/12 Mensajes recientes
Neil Griffin:
Here are the jars that you need in WEB-INF/lib for a typical PrimeFaces portlet:

commons-fileupload-1.2.2.jar
commons-io-1.3.2.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.1.21.jar
jsf-impl-2.1.21.jar
liferay-faces-alloy-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-bridge-api-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-bridge-impl-3.2.4-ga5-SNAPSHOT.jar
liferay-faces-util-3.2.4-ga5-SNAPSHOT.jar
primefaces-3.5.jar

It would be best to remove any others that are not needed, like the portletfaces jars.


I having problem to locate jboss-el-2.0.0.GA.jar. This has worked before but when I rebuild my portlet this dependency is not found.
I have the following in my pom.xml:
  <dependency>
            <groupid>org.jboss.seam</groupid>
            <artifactid>jboss-el</artifactid>
            <version>2.0.0.GA</version> 
            <exclusions>
                <exclusion>
                    <artifactid>el-api</artifactid>
                    <groupid>javax.el</groupid>
                </exclusion>
            </exclusions>
        </dependency>

This is the error I get.
Failed to execute goal on project TestPrimeFaces: Could not resolve dependencies for project se.trm.web:TestPrimeFaces:war:1.0-SNAPSHOT: Failure to find org.jboss.seam:jboss-el:jar:2.0.0.GA in http://repository.primefaces.org/ was cached in the local repository, resolution will not be reattempted until the update interval of PrimeFaces-maven-lib has elapsed or updates are forced -> [Help 1]


NetBeans add dependency feature suggests the following:
  <dependency>
            <groupid>org.jboss.spec.javax.el</groupid>
            <artifactid>jboss-el-api_2.2_spec</artifactid>
            <version>1.0.3.Final</version>
        </dependency>


Then builden works fine, but when I deploy I get the following error:
Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: It appears the JSP version of the container is
older than 2.1 and unable to locate the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If not using JSP or
the EL RI, make sure the context initialization parameter, com.sun.faces.expressionFactory, is properly set.
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:276)
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
You can find the jboss-el-2.0.0.GA.jar dependency here at the new Liferay Nexus Repository.

Also, we are investigating migrating our demos from JBoss-EL to the Unified EL in FACES-1892.
thumbnail
I-A Kotopoulos, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Junior Member Mensajes: 44 Fecha de incorporación: 14/01/14 Mensajes recientes
I just wanted to inform you that after downloading last week the liferay 6.2-ga2 version my problems where finally solved emoticon
thank you for your time
Ioannis-Aristotelis Kotopoulos
thumbnail
Neil Griffin, modificado hace 10 años.

RE: Problem with Liferay 6.2 and Primefaces in multiple portlet eclipse pro

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Congratulations! Thanks for letting us know. emoticon