Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Adi Schlemm
Big trouble with JSF2 CDI Portlet Example
17 janvier 2014 15:09
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Hi
I'm running jboss-EAP 6.2 with Liferay-Portal 6.2.
If i deploy the Demo JSF2 CDI Portlet (3.1.3-ga4 (Liferay 6.1.x))
i got the following 2 errors.
- First com.sun.faces.config.Configurelistener already configured for this context, but the Demo has
no call in it's config-files for com.sun.faces.config.Configurelistener.
- Second, an IllegalArgumentException occurs for WELD with the message: cannot pass null expressionFactory
What is wrong there?
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
17 janvier 2014 15:37
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

Until we have our 3.2 release in production, you will need to Build Liferay Faces From Source but with "git checkout 3.2.x"

In order to build the jsf2-cdi-portlet for use with JBoss, do this:

1cd liferay-faces/demos/bridge/jsf2-cdi-portlet
2mvn -P jboss clean install
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
18 janvier 2014 03:34
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Hi Neil

I have in the moment no maven.
Do you mean i must compile the sources new?

I use my liferay as a war (runs correct, not ROOT context ).
Must i use for all demos a jboss-web.xml?
My deploying shows no errors, but i can not set a context where the
demo can run.
In the jboss-web.xml it is set to
<jboss-web>
<context-root>/all</context-root>
</jboss-web>


but under http://localhost:8080/all there is nothing.

(Use JBOSS-EAP-6.2, Liferay-Portal-6.2 (as war) and java 1.7.0_45)
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
21 janvier 2014 14:36
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

The Liferay Faces project is built with Maven, and we use Maven Profiles in order to build portlet WARs for different servers.

So in order to build a version of the jsf2-cdi-portlet for JBoss, you would need to build it with the "-P jboss" option on the mvn command line.

We provide demos like the jsf2-cdi-portlet in order to help you know what files and/or descriptors are necessary in order to make a portlet work properly.
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
22 janvier 2014 05:56
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Thanks for your hints.

The liferay example has 2 jsf-jars and one weld-jar.
Conflicts that not with jboss jsf-and-weld jars?
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
22 janvier 2014 07:11
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

If you build the jsf2-cdi-portlet from source with "mvn clean package -P jboss" then the two Mojarra/JSF jars and the weld jar should not appear in the WAR under the target/ folder. Those dependencies are provided by JBoss. For more details, please read the Developing JSF Portlets with CDI wiki article and make sure that you upgrade both Mojarra and Weld in JBoss.
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
25 janvier 2014 17:27
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Thanks for your help
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
29 janvier 2014 16:05
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Now it looks better, but ich think in faces-config.xml for the CDI-faces example
there was references to a message bundle "i18nFaces" and
resource bundle "i18n" what is not in the example.
Is there something what i need, what is not in the Example?
Also the taglib "http://liferay.com/faces/aui" is not matching for the
example. Is this a new taglib?
My Portlet looks not good für pime faces (see attachment).
What can it be?
Pièces jointes: myportlet.doc (33,0k)
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
30 janvier 2014 09:33
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

Hi Adi,

The jsf2-cdi-portlet/src/main/webapp/WEB-INF/faces-config.xml descriptor mentions both i18n and i18nFaces. Those files are provided here, but only for the default language (English in this demo):

Also, thanks for the screenshot -- I do have one concern though. It shows "Weld Servlet (Uber Jar) 1.1.10.Final" which means that WEB-INF/lib/weld-servlet.jar is probably in your deployed WAR. That jar shouldn't be there when deploying on JBoss. It's only necessary for servlet containers like Tomcat and Jetty.

Kind Regards,

Neil
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
30 janvier 2014 18:03
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Hi Neil

Thanks for your help, I have added the property-files.
Jboss has its own weld classes, so i have not deployed some weld stuff.
But i must change the weld to version 1.1.10 in jboss, the original delivered weld classes
from jboss does not correct run with this example.
Now the example looks better, but can't see the prime faces working.

My deployed jar's are:

cdi-portlet-bridge-shared-6.2.0.1.jar
commons-fileupload-1.2.2.jar
commons-io-1.3.2.jar
jboss-el-2.0.0.GA.jar
liferay-faces-alloy-3.1.3-ga4.jar
liferay-faces-bridge-api-3.1.3-ga4.jar
liferay-faces-bridge-impl-3.1.3-ga4.jar
liferay-faces-util-3.1.3-ga4.jar
primefaces-3.5.jar
Pièces jointes: Liferay-Test.doc (32,5k)
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
31 janvier 2014 07:16
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

Hi Adi,

The deployed jars in WEB-INF/lib look correct, except that the following:

cdi-portlet-bridge-shared-6.2.0.1.jar

Should be upgraded to:

cdi-portlet-bridge-shared-6.2.0.2.jar

Please provide more detail of what you mean by:
but can't see the prime faces working.


Do you see any error messages in the web page or in the JBoss Log?

Neil
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
31 janvier 2014 12:18
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Hi Neil

In my portlet i can't see the look and feel from prime faces.
I mean the prime faces components are not visible in my example, button's an so...
The attachment looks very better.

Where i can find the cdi-portlet-bridge-shared-6.2.0.2.jar ?

Adi
Attachement

Pièces jointes: PrimeFaces.jpg (23,6k)
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
31 janvier 2014 12:27
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

You can specify version 6.2.0.2 by changing the value of the <version> element in the pom.xml descriptor of the project. The jar is available in Maven Central.

Regarding what you wrote:
prime faces components are not visible in my example


Have you changed any of the standard JSF component tags (using the h: namespace prefix) in the view to use the PrimeFaces p: namespace prefix?
Adi Schlemm
RE: Big trouble with JSF2 CDI Portlet Example
1 février 2014 09:15
Réponse

Adi Schlemm

Rang: New Member

Publications: 16

Date d'inscription: 17 janvier 2014

Publications Récentes

Hi Neil

Awfulemoticon, it works. Thanks!

Adi
Neil Griffin
RE: Big trouble with JSF2 CDI Portlet Example
1 février 2014 09:48
Réponse

Neil Griffin

LIFERAY STAFF

Rang: Liferay Legend

Publications: 2366

Date d'inscription: 26 juillet 2005

Publications Récentes

I'm glad to hear that it is working now. Thanks for using Liferay Faces emoticon