Fórum
Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
Shiva Prasad Gaddameedi, modificado 8 Anos atrás.
Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
New Member Postagens: 6 Data de Entrada: 01/09/15 Postagens Recentes
Hello,
Getting the following error while trying to deploy the portlet in Liferay portal. I'm using the GlassFish server 4.1 and Maven and netbeans portlet pack 3.0. Any body have idea on how to fix this error and what versions we need to use for liferay-faces, JSF, primefaces and liferay.portal
java.lang.UnsupportedOperationException
at javax.faces.context.ExternalContext.getClientWindow(ExternalContext.java:1500)
at javax.faces.context.ExternalContextWrapper.getClientWindow(ExternalContextWrapper.java:530)
at com.sun.faces.renderkit.StateHelper.writeClientWindowField(StateHelper.java:315)
at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:278)
at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:126)
at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:113)
at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:473)
The following are the dependencies I'm using in my portlet:
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>liferay-faces-bridge-impl</artifactId>
<version>3.2.4-ga5</version>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>liferay-faces-portal</artifactId>
<version>3.2.4-ga5</version>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>util-java</artifactId>
<version>6.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.21</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.21</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<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>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
<type>jar</type>
</dependency>
Thanks,
Shiva Prasad
at
Getting the following error while trying to deploy the portlet in Liferay portal. I'm using the GlassFish server 4.1 and Maven and netbeans portlet pack 3.0. Any body have idea on how to fix this error and what versions we need to use for liferay-faces, JSF, primefaces and liferay.portal
java.lang.UnsupportedOperationException
at javax.faces.context.ExternalContext.getClientWindow(ExternalContext.java:1500)
at javax.faces.context.ExternalContextWrapper.getClientWindow(ExternalContextWrapper.java:530)
at com.sun.faces.renderkit.StateHelper.writeClientWindowField(StateHelper.java:315)
at com.sun.faces.renderkit.ServerSideStateHelper.writeState(ServerSideStateHelper.java:278)
at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:126)
at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:113)
at com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:473)
The following are the dependencies I'm using in my portlet:
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>liferay-faces-bridge-impl</artifactId>
<version>3.2.4-ga5</version>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>liferay-faces-portal</artifactId>
<version>3.2.4-ga5</version>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>portal-service</artifactId>
<version>6.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.liferay.portal</groupId>
<artifactId>util-java</artifactId>
<version>6.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.21</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.21</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<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>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
<type>jar</type>
</dependency>
Thanks,
Shiva Prasad
at
Neil Griffin, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
GlassFish 4.1 includes Mojarra 2.2, which is why you don't need to specify jsf-api or jsf-impl as a dependency that is to be included in your portlet WAR. The error regarding ExternalContext.getClientWindow() indicates that you are indeed using JSF 2.2, since the client window concept was added with JSF 2.2. Therefore you need to use a version of Liferay Faces that is compatible with JSF 2.2. We recently released version 4.2.5-ga6 which will fulfill this requirement. Please see the Liferay Faces Version Scheme for more info.
Shiva Prasad Gaddameedi, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
New Member Postagens: 6 Data de Entrada: 01/09/15 Postagens Recentes
Hello Griffin,
Thank you very much for your solution, I tried to change the Liferay Faces version to 4.2.5-ga6 as you suggested but I end-up getting many errors and I don't have idea on how to fix those. I also tried by creating brand new portlet with simple message but I'm seeing the same errors.
I have been working on the same issue from past two weeks and not finding any useful information in on-line. Can you please help me out with sample project or any developer guide. I am attaching my server log file.
Thanks,
Shiva Prasad
Thank you very much for your solution, I tried to change the Liferay Faces version to 4.2.5-ga6 as you suggested but I end-up getting many errors and I don't have idea on how to fix those. I also tried by creating brand new portlet with simple message but I'm seeing the same errors.
I have been working on the same issue from past two weeks and not finding any useful information in on-line. Can you please help me out with sample project or any developer guide. I am attaching my server log file.
Thanks,
Shiva Prasad
Anexos:
Juan Gonzalez, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Hi Shiva,
did you change your jsf-api and jsf-impl dependencies to use JSF 2.2 and set them as provided, as Neil said?
Do you have the jar containing this class in your WAR file?
Do you have liferay-faces-util as a dependency in your project?
Additionally, did you remove your previous deployment? Sometimes not doing this causes liferay-faces jar files from different versions to coexist.
did you change your jsf-api and jsf-impl dependencies to use JSF 2.2 and set them as provided, as Neil said?
java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager
Do you have the jar containing this class in your WAR file?
Caused by: java.lang.NoClassDefFoundError: Lcom/liferay/faces/util/logging/Logger;
Do you have liferay-faces-util as a dependency in your project?
Additionally, did you remove your previous deployment? Sometimes not doing this causes liferay-faces jar files from different versions to coexist.
Shiva Prasad Gaddameedi, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
New Member Postagens: 6 Data de Entrada: 01/09/15 Postagens Recentes
Hello Juan,
Yes, I tried the changes what you mentioned above but this time I am receiving following error which is complaining about com.liferay.util.spring.transaction.TransactionManagerClp.init() Method.
The lifecycle method [init] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void com.liferay.util.spring.transaction.TransactionManagerClp.init() throws java.lang.ClassNotFoundException] of type [METHOD]
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375)
at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:217)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
Thanks,
Shiva Prasad
Yes, I tried the changes what you mentioned above but this time I am receiving following error which is complaining about com.liferay.util.spring.transaction.TransactionManagerClp.init() Method.
The lifecycle method [init] must not throw a checked exception. Related annotation information: annotation [@javax.annotation.PostConstruct()] on annotated element [public void com.liferay.util.spring.transaction.TransactionManagerClp.init() throws java.lang.ClassNotFoundException] of type [METHOD]
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375)
at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:217)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
Thanks,
Shiva Prasad
Shiva Prasad Gaddameedi, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
New Member Postagens: 6 Data de Entrada: 01/09/15 Postagens Recentes
Hello Neil,
Can you please suggest solution to the issue which I am having with liferay-faces-util, liferay-faces-bridge-impl 4.2.5-ga6 and JSF 2.2.
Thanks,
Shiva Prasad
Can you please suggest solution to the issue which I am having with liferay-faces-util, liferay-faces-bridge-impl 4.2.5-ga6 and JSF 2.2.
Thanks,
Shiva Prasad
Neil Griffin, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Hi Shiva,
Please provide us with a directory listing of everything you see under glassfish-4.1/glassfish/domains/domain1/your-deployment/WEB-INF/lib
Thank you,
Neil
Please provide us with a directory listing of everything you see under glassfish-4.1/glassfish/domains/domain1/your-deployment/WEB-INF/lib
Thank you,
Neil
Shiva Prasad Gaddameedi, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
New Member Postagens: 6 Data de Entrada: 01/09/15 Postagens Recentes
Hi Neil,
Here is the list of jar files I have in my-deployment/WEB-INF/lib directory.
commons-io-2.2.jar
commons-logging-1.2.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.2.12.jar
jsf-impl-2.2.12.jar
liferay-faces-bridge-api-4.2.5-ga6.jar
liferay-faces-bridge-impl-4.2.5-ga6.jar
liferay-faces-portal-4.2.5-ga6.jar
liferay-faces-util-4.2.5-ga6.jar
log4j.jar
log4j-extras.jar
spring-beans-4.2.1.RELEASE.jar
spring-core-4.2.1.RELEASE.jar
spring-tx-4.2.1.RELEASE.jar
util-bridges.jar
util-java.jar
util-taglib.jar
Thanks,
Shiva Prasad
Here is the list of jar files I have in my-deployment/WEB-INF/lib directory.
commons-io-2.2.jar
commons-logging-1.2.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.2.12.jar
jsf-impl-2.2.12.jar
liferay-faces-bridge-api-4.2.5-ga6.jar
liferay-faces-bridge-impl-4.2.5-ga6.jar
liferay-faces-portal-4.2.5-ga6.jar
liferay-faces-util-4.2.5-ga6.jar
log4j.jar
log4j-extras.jar
spring-beans-4.2.1.RELEASE.jar
spring-core-4.2.1.RELEASE.jar
spring-tx-4.2.1.RELEASE.jar
util-bridges.jar
util-java.jar
util-taglib.jar
Thanks,
Shiva Prasad
Juan Gonzalez, modificado 8 Anos atrás.
RE: Error in using Liferay Portlet on Glassfish4.1 with (JSF2.1)
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens RecentesShiva Prasad Gaddameedi:
Here is the list of jar files I have in my-deployment/WEB-INF/lib directory.
commons-io-2.2.jar
commons-logging-1.2.jar
jboss-el-2.0.0.GA.jar
jsf-api-2.2.12.jar
jsf-impl-2.2.12.jar
liferay-faces-bridge-api-4.2.5-ga6.jar
liferay-faces-bridge-impl-4.2.5-ga6.jar
liferay-faces-portal-4.2.5-ga6.jar
liferay-faces-util-4.2.5-ga6.jar
log4j.jar
log4j-extras.jar
spring-beans-4.2.1.RELEASE.jar
spring-core-4.2.1.RELEASE.jar
spring-tx-4.2.1.RELEASE.jar
util-bridges.jar
util-java.jar
util-taglib.jar
So, seems you didn't remove jsf--api and jsf-impl. You should do that (configuring your pom.xml properly).
Additionally, I wouldn't use that Spring version, as Liferay is using 3.0.7. You have a good example of jsf2-spring portlet here:
https://github.com/liferay/liferay-faces/tree/master/demos/bridge/jsf2-spring-portlet
Juan Gonzalez, modificado 8 Anos atrás.
Moved to Liferay Faces category
Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
Moved to Liferay Faces category