1 Reply Latest reply on Apr 11, 2008 5:22 PM by Nick Belaevski

    Facelets-RichFaces-Portlet-JBoss Portal - Deployment excepti

    Benoît Chery Newbie

      Hi all, I have some exceptions when i deploy my portlet with richfaces 3.2.0 and facelets on JBoss portal 2.6.4.
      I tried several sample configurations but all my tests failed.

      Thank you for taking time to read my config.

      Here is the list of jars in my lib directory :
      - a4j-portlet-1.1.1.jar
      - ajax4jsf-1.1.1.jar
      - commons-beanutils.jar
      - commons-digester.jar
      - commons-el.jar
      - commons-lang.jar
      - jsf-facelets.jar
      - richfaces-api-3.2.0.GA.jar
      - richfaces-impl-3.2.0.GA.jar
      - richfaces-ui-3.2.0.GA.jar

      My web.xml :

      <?xml version="1.0"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">

      <description>SamplePortlet</description>

      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>

      <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>org.ajax4jsf.portlet.application.FaceletPortletViewHandler</param-value>
      </context-param>
      <filter>
      <display-name>Ajax4jsf Filter</display-name>
      <filter-name>ajax4jsf</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>
      </filter>

      <filter-mapping>
      <filter-name>ajax4jsf</filter-name>
      <servlet-name>FacesServlet</servlet-name>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>

      <context-param>
      <param-name>org.richfaces.LoadStyleStrategy</param-name>
      <param-value>ALL</param-value>
      </context-param>




      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.SKIP_COMMENTS</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.VIEW_MAPPINGS</param-name>
      <param-value>*.xhtml</param-value>
      </context-param>

      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>


      <listener>
      <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
      </listener>

      <servlet>
      <servlet-name>FacesServlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
      <servlet-name>FacesServlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>

      <login-config>
      <auth-method>BASIC</auth-method>
      </login-config>
      </web-app>


      faces-config.xml :
      <!DOCTYPE faces-config PUBLIC
      "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

      <faces-config>

      <application>
      <view-handler>
      org.ajax4jsf.portlet.application.PortletViewHandler
      </view-handler>
      <state-manager>
      org.ajax4jsf.portlet.application.PortalStateManager
      </state-manager>


      </application>
      <factory>
      <faces-context-factory>
      org.ajax4jsf.portlet.context.FacesContextFactoryImpl
      </faces-context-factory>
      </factory>


      <render-kit>
      <renderer>
      <description>
      override the viewroot
      </description>
      <component-family>javax.faces.ViewRoot</component-family>
      <renderer-type>javax.faces.ViewRoot</renderer-type>
      <renderer-class>org.ajax4jsf.portlet.renderkit.portlet.PortletAjaxViewRootRenderer</renderer-class>
      </renderer>
      </render-kit>


      </faces-config>


      portlet.xml :
      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/portlet"
      xmlns="http://java.sun.com/xml/ns/portlet">
      <portlet>
      <portlet-name>SamplePortlet</portlet-name>
      <portlet-class>
      javax.portlet.faces.GenericFacesPortlet
      </portlet-class>

      <init-param>
      <name>javax.portlet.faces.defaultViewId.view</name>
      <value>/jsf/Sample.xhtml</value>
      </init-param>
      <portlet-info>
      <title>Enrollment Portlet</title>
      </portlet-info>

      <supports>
      <mime-type>text/html</mime-type>
      <portlet-mode>VIEW</portlet-mode>
      </supports>
      </portlet>
      </portlet-app>


      portlet-instances.xml :

      <?xml version="1.0" standalone="yes"?>
      <deployments>
      <deployment>
      <instance>
      <instance-id>SamplePortletInstance</instance-id>
      <portlet-ref>SamplePortlet</portlet-ref>
      </instance>
      </deployment>
      </deployments>


      helloworld-object.xml :
      <?xml version="1.0" encoding="UTF-8"?>
      <deployments>
      <deployment>
      <if-exists>overwrite</if-exists>
      <parent-ref>default.default</parent-ref>
      <window>
      <window-name>SamplePortletWindow</window-name>
      <instance-ref>SamplePortletInstance</instance-ref>
      <region>center</region>
      <height>1</height>
      </window>
      </deployment>
      </deployments>

      The errors (i cut the parts that don't seem to be important) :
      14:12:58,287 INFO [TomcatDeployer] deploy, ctxPath=/helloworldjsfrichfacesportlet, warUrl=.../tmp/deploy/tmp5293helloworldjsfrichfacesportlet-exp.war/
      14:12:59,013 ERROR [Digester] End event threw exception
      java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
      at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:208)
      at org.apache.commons.digester.Rule.end(Rule.java:228)
      at org.apache.commons.digester.Digester.endElement(Digester.java:1067)
      at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      at org.apache.commons.digester.Digester.parse(Digester.java:1591)
      at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:186)
      at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:131)
      at org.ajax4jsf.framework.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:202)
      at org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:549)
      at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1036)
      |
      |
      |
      |
      |
      |
      |
      |
      14:12:59,022 ERROR [STDERR] javax.faces.FacesException: org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory
      14:12:59,023 ERROR [STDERR] at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:556)
      14:12:59,023 ERROR [STDERR] at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:448)
      14:12:59,023 ERROR [STDERR] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
      14:12:59,023 ERROR [STDERR] at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:1036)
      |
      |
      |
      |
      |
      |
      |
      |
      14:12:59,034 ERROR [STDERR] Caused by: javax.faces.FacesException: java.lang.IllegalArgumentException: argument type mismatch
      14:12:59,034 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:193)
      14:12:59,034 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:131)
      14:12:59,034 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:202)
      14:12:59,034 ERROR [STDERR] at org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
      14:12:59,034 ERROR [STDERR] ... 100 more
      14:12:59,035 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: argument type mismatch
      14:12:59,035 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
      14:12:59,035 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)
      14:12:59,035 ERROR [STDERR] at org.apache.commons.digester.Digester.endElement(Digester.java:1070)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      14:12:59,035 ERROR [STDERR] at org.apache.commons.digester.Digester.parse(Digester.java:1591)
      14:12:59,037 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:186)
      14:12:59,037 ERROR [STDERR] ... 103 more
      14:12:59,038 ERROR [[/helloworldjsfrichfacesportlet]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener