3 Replies Latest reply on Oct 9, 2007 2:43 AM by Dmitriy Slokva

    RichFaces 3.1.1 + JBoss 4.2 (JBoss portal 2.6.1) errors

    Dmitriy Slokva Newbie

      Hi, everybody!
      I'm trying to deploy my web application with Richfaces libs into JBoss (this app needed as portlet), but got this error:

      09:23:18,267 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-portal-2.6.1.GA/server/sop/deploy/nat.ear/
      09:23:20,103 INFO [TomcatDeployer] deploy, ctxPath=/accPersonal, warUrl=.../tmp/deploy/tmp53287accPersonal-exp.war/
      09:23:22,084 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:597)
       at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
       at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:217)
       at org.apache.commons.digester.Rule.end(Rule.java:253)
       at org.apache.commons.digester.Digester.endElement(Digester.java:1222)
       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)
      


      scrolling down...

      09:23:22,101 ERROR [STDERR] at org.jboss.Main.boot(Main.java:200)
      09:23:22,101 ERROR [STDERR] at org.jboss.Main$1.run(Main.java:508)
      09:23:22,101 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      09:23:22,102 ERROR [STDERR] Caused by: java.lang.reflect.InvocationTargetException
      09:23:22,102 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      09:23:22,102 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      09:23:22,102 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      09:23:22,102 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      09:23:22,102 ERROR [STDERR] at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:549)
      09:23:22,102 ERROR [STDERR] ... 141 more
      09:23:22,102 ERROR [STDERR] Caused by: javax.faces.FacesException: java.lang.IllegalArgumentException: argument type mismatch
      09:23:22,103 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:193)
      09:23:22,103 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:131)
      09:23:22,103 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:202)
      09:23:22,103 ERROR [STDERR] at org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
      09:23:22,103 ERROR [STDERR] ... 146 more
      09:23:22,103 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException: argument type mismatch
      09:23:22,103 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
      09:23:22,103 ERROR [STDERR] at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
      09:23:22,103 ERROR [STDERR] at org.apache.commons.digester.Digester.endElement(Digester.java:1225)
      09:23:22,103 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
      09:23:22,103 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
      09:23:22,103 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      09:23:22,103 ERROR [STDERR] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      09:23:22,103 ERROR [STDERR] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      09:23:22,104 ERROR [STDERR] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      09:23:22,104 ERROR [STDERR] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      09:23:22,104 ERROR [STDERR] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      09:23:22,104 ERROR [STDERR] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      09:23:22,104 ERROR [STDERR] at org.apache.commons.digester.Digester.parse(Digester.java:1765)
      09:23:22,104 ERROR [STDERR] at org.ajax4jsf.framework.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:186)
      09:23:22,104 ERROR [STDERR] ... 149 more
      09:23:22,110 ERROR [[/accPersonal]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      javax.faces.FacesException: org.ajax4jsf.framework.renderer.ChameleonRenderKitFactory
       at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:556)
      



      deploying application - EAR, inside one JAR and one WAR:
      server/sop/deploy/nat.ear/META-INF/application.xml:
      
      <application>
       <display-name>SOP Application</display-name>
       <module>
       <ejb>accPersonal.jar</ejb>
       </module>
       <module>
       <web>
       <web-uri>accPersonal.war</web-uri>
       <context-root>/accPersonal</context-root>
       </web>
       </module>
      </application>
      


      inside server\sop\deploy\nat.ear\accPersonal.war\WEB-INF\lib\:

      WEB-INF\lib\a4j-portlet-1.1.1.jar
      WEB-INF\lib\ajax4jsf-1.1.1.jar
      WEB-INF\lib\richfaces-impl-3.1.1-GA.jar
      WEB-INF\lib\richfaces-ui-3.1.1-GA.jar
      


      inside server/sop/lib -
      richfaces-api-3.1.1-GA.jar
      


      it in server/lib folder (in examples this library is in WEB-INF/lib folder), because while server starting this error occured:
      10:10:29,333 ERROR [[/accPersonal]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      java.lang.NoClassDefFoundError: org/richfaces/model/TreeNode
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
       at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
      


      when server starting without library
      nat.ear\accPersonal.war\WEB-INF\lib\ajax4jsf-1.1.1.jar

      all is OK, but when accessing to my portlet exception occurred:

      java.lang.NoClassDefFoundError: org/ajax4jsf/framework/ajax/AjaxContext
       at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:173)
       at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
       at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
       at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRender(PortletContainerImpl.java:483)
       at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:405)
       at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
       at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
      



      My deploy\nat.ear\accPersonal.war\WEB-INF\portlet.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <portlet-app 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"
       version="1.0">
       <portlet>
       <portlet-name>SOPAccMenu</portlet-name>
       <portlet-class>org.ajax4jsf.portlet.AjaxFacesPortlet</portlet-class>
       <init-param>
       <name>default-view</name>
       <value>/WEB-INF/accpersonal/jsp/menu.jsp</value>
       </init-param>
      
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
      
       <supported-locale>en</supported-locale>
       <supported-locale>ru</supported-locale>
       <supported-locale>kz</supported-locale>
       <resource-bundle>accpersonal</resource-bundle>
      
       <portlet-info>
       <title>SOP Accounting personal</title>
       <short-title>SOP_AP</short-title>
       </portlet-info>
       </portlet>
      </portlet-app>
      


      My deploy\nat.ear\accPersonal.war\WEB-INF\faces-config.xml
      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC
       "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
       "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
      <faces-config>
       <navigation-rule>
       <from-view-id>*</from-view-id>
       <navigation-case>
       <from-outcome>sopAccMenu</from-outcome>
       <to-view-id>/WEB-INF/accpersonal/jsp/menu.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
       <application>
       <locale-config>
       <default-locale>ru</default-locale>
       <supported-locale>en</supported-locale>
       <supported-locale>ru</supported-locale>
       <supported-locale>kz</supported-locale>
       </locale-config>
       </application>
      </faces-config>
      


      My deploy\nat.ear\accPersonal.war\WEB-INF\web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4"
       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">
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>DEFAULT</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
       <param-value>true</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>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <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>
      
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
      </web-app>
      


      Who can help me? Maybe some my actions incorrect?

        • 1. Re: RichFaces 3.1.1 + JBoss 4.2 (JBoss portal 2.6.1) errors
          Sergey Smirnov Master

          Ajax4jsf jar should be removed from the classpath

          • 2. Re: RichFaces 3.1.1 + JBoss 4.2 (JBoss portal 2.6.1) errors
            Dmitriy Slokva Newbie

            but what about this error:

            java.lang.NoClassDefFoundError: org/ajax4jsf/framework/ajax/AjaxContext
             at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:173)
             at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
            


            • 3. Re: RichFaces 3.1.1 + JBoss 4.2 (JBoss portal 2.6.1) errors
              Dmitriy Slokva Newbie

              sorry, for my last post. Now I see.

              in my library (downloaded from site)
              at 173 line needed org/ajax4jsf/framework/ajax/AjaxContext

              but after checkout and build from CVS, in library i see this import:
              org.ajax4jsf.context.AjaxContext

              I replace old lib and got this exception:

              12:39:52,110 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,org.ajax4jsf.portlet.context.FacesContextImpl@ff89d7) threw exception
              java.lang.ClassCastException: org.jboss.portlet.JBossRenderRequest cannot be cast to javax.servlet.ServletRequest
               at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:111)
               at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
               at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
               at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
               at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
               at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
               at org.ajax4jsf.portlet.AjaxFacesPortlet.render(AjaxFacesPortlet.java:280)
               at org.ajax4jsf.portlet.AjaxFacesPortlet.doView(AjaxFacesPortlet.java:183)
               at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
               at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)