Fernando. It should work with 1.2.7. If it doesn't.. Please lot a bug. It will not work with any JSF 1.1 implementation. They have their own bridge which is not compliant with the JSR.. Both JSR bridge specs are for JSF 1.2 only.

Fernando Lozano wrote:
Hi,

This time using Thunderbird, hoping the configuration files are now readable.

It's funny because my app works fine if I replate myfaces jars by Sun RI jars. It worked with Sun RI 1.2_09-b02-FCS but not with myfaces 1.1.2, 1.1.7 nor 1.2.7.

That is, myfaces portlet bridge seems to work fine with Sun RI (Mojarra) but not with MyFaces itself.

Please, if it's a configuration error, someone help me! My employee has a "corporate standard" of using MyFaces so using Mojarra instead will not solve the issue. :-(

PS: Found I can left out all jars except jsf and portlet-bridge. Commons, jstl, etc are already included with exo-pc 2.0.5 and although the releases are different from the ones included with myfaces everything seems to work, except myfaces with the portlet-bridge. But the app works fine with myfaces outside the portal (without jars and configs for the bridge, so deployment works).


[]s Fernando Lozano


> Hi there, I'm using MyFaces 1.2.7 and myfaces-portlet-bridge 1.0.0-beta. I can't deploy a simple app that runs fine on Tomcat outside the eXo PC 2.0.5, using the tomcat bundle they provide on their web site.

> I think I did all right according to MyFaces docs and eXo docs, which are sighly differentent, so I made two tries. Here's the deployment errors:

> 30/07/2009 16:21:30 org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/hora-mundo-jsf]
> 30/07/2009 16:21:30 org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive hora-mundo-jsf.war
> [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value true > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value false > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value false > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value true > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value true > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value true [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value 2 > [INFO] MyfacesConfig - No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value false > [INFO] MyfacesConfig - Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now. > [INFO] MyfacesConfig - Starting up Tomahawk on the MyFaces-JSF-Implementation > [INFO] FacesConfigurator - Reading standard config META-INF/standard-faces-config.xml
> [INFO] portletcontainer - DEPLOYING PORTLET APPLICATION: hora-mundo-jsf
> [INFO] portletcontainer - The portlet.xml file valid portlet spec 1
> [INFO] portletcontainer - -- read: 1 portlets
> [INFO] portletcontainer - Registering portlets: [HoraMundialJSF]
> [INFO] portletcontainer - DEPLOYED PORTLET APPLICATION SUCCESSFUL: hora-mundo-jsf > 30/07/2009 16:21:31 org.apache.catalina.core.StandardContext start > SEVERE: Error listenerStart 30/07/2009 16:21:31 org.apache.catalina.core.StandardContext start
> SEVERE: Context [/hora-mundo-jsf] startup failed due to previous errors
> [INFO] portletcontainer - UNDEPLOY PORTLET APPLICATION: hora-mundo-jsf
> [INFO] DefaultLifecycleProviderFactory - No ExternalContext using fallback LifecycleProvider. > [INFO] DefaultLifecycleProviderFactory - Using LifecycleProvider org.apache.myfaces.config.annotation.AllAnnotationLifecycleProvider

> You see, not very informative. Which listener failed to start? why?

> Here's my configuration files. It's a simple world clock app, and I intent to change the edit form (time zone and colors) into the portlet edit mode. I already have a struts version of this app working fine, and a pure-portlet (with JSTL) also working fine.

> --------- faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
    xmlns="http://java.sun.com/xml/ns/javaee";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";
    version="1.2">

<managed-bean>
<managed-bean-name>HoraMundial</managed-bean-name>
<managed-bean-class>
        exemplo.HoraMundial
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>

<navigation-rule>
<from-view-id>/view.jsp</from-view-id>
<navigation-case>
<from-outcome>edit</from-outcome>
<to-view-id>/edit.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>help</from-outcome>
<to-view-id>/help.jsp</to-view-id>
</navigation-case>
</navigation-rule>

<navigation-rule>
<from-view-id>/edit.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/view.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/view.jsp</to-view-id>
</navigation-case>
</navigation-rule>

</faces-config>

> ------ web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/javaee"; xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; id="WebApp_ID" version="2.5">

<display-name>hora-mundo-jsf</display-name>

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>

<listener>
<listener-class>
org.exoplatform.services.portletcontainer.impl.servlet.PortletApplicationListener
</listener-class>
</listener>

<servlet>
<servlet-name>PortletWrapper</servlet-name>
<servlet-class>
org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>PortletWrapper</servlet-name>
<url-pattern>/PortletWrapper</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

> -------- portlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";>

<portlet>
<description>Hora Mundial JSF</description>
<portlet-name>hora-mundo-jsf</portlet-name>
<display-name>Hora Mundial JSF</display-name>
<portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>

<init-param>
<name>javax.portlet.faces.defaultViewId.view</name>
<value>/view.faces</value>
</init-param>

<supports>
<mime-type>text/html</mime-type>
</supports>
<supported-locale>en</supported-locale>

<portlet-info>
<title>Hora Mundial JSF</title>
<short-title>Hora Mundial JSF</short-title>
</portlet-info>
</portlet>

</portlet-app>

> ------------ contents of WEB-INF/lib
commons-codec-1.3.jar
jstl.jar
myfaces-api-1.2.7.jar
myfaces-impl-1.2.7.jar
portlet-bridge-api-1.0.0-beta.jar
portlet-bridge-impl-1.0.0-beta.jar

> See I tried with both the standard GenericFacesPortlet (as myfaces-portlet-bridge states) and MyfacesGenericPortlet (as eXo docs state). Both with same result.

> Some commons provided with myfaces are already included in eXo, so I left them out of WEB-INF/lib.

> Thanks in advance for any hint.

> []s, Fernando Lozano


Reply via email to