3 Replies Latest reply on Mar 1, 2007 1:07 PM by lcompton

    JSF portlet using Oracle ADF Faces

    bhupeshs

      Hi,

      I am trying to execute a JSF portlet using Oracle ADF faces. The portlet definition is as follows.

      <portlet>
       <portlet-name>MyJsfPortlet</portlet-name>
       <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
       <init-param>
       <name>default-view</name>
       <value>/home.jsp</value>
       </init-param>
       <portlet-info>
       <title>Jsf Portlet</title>
       </portlet-info>
       <supports>
       <mime-type>text/html</mime-type>
       <portlet-mode>VIEW</portlet-mode>
       </supports>
       </portlet>


      I am getting an exception like this.

      java.lang.ClassCastException: org.jboss.portlet.JBossRenderRequest
       at oracle.adfinternal.view.faces.agent.AgentFactoryImpl.createAgent(AgentFactoryImpl.java:48)
       at oracle.adfinternal.view.faces.context.AdfFacesContextImpl.getAgent(AdfFacesContextImpl.java:445)
       at oracle.adfinternal.view.faces.agent.AgentUtil.getAgent(AgentUtil.java:73)
       at oracle.adfinternal.view.faces.renderkit.core.CoreAdfRenderingContext.<init>(CoreAdfRenderingContext.java:58)
       at oracle.adfinternal.view.faces.renderkit.CoreRenderKit.encodeBegin(CoreRenderKit.java:271)
       at oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:149)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
       at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:323)
       at org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298)
       at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380)
       at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
       at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:167)
       at javax.portlet.GenericPortlet.render(GenericPortlet.java:407)
       at org.jboss.portal.portlet.container.PortletContainer.invokeRender(PortletContainer.java:519)
       at org.jboss.portal.portlet.container.PortletContainer.dispatch(PortletContainer.java:440)
       at org.jboss.portal.portlet.container.PortletContainerInvoker$1.dispatch(PortletContainerInvoker.java:143)
       at org.jboss.portal.portlet.invocation.PortletInvocation.dispatch(PortletInvocation.java:242)
       at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:140)
      ......



      Can anyone help me in resolving this exception...

        • 1. Re: JSF portlet using Oracle ADF Faces
          emiliano_uy

          Do you solved this?? Because i´m having a very similar problem with ADF Faces
          Regards

          • 2. Re: JSF portlet using Oracle ADF Faces
            antoine_h

            Hello,
            I started with Adf faces, and get the same exception...
            Before the exception, there is :

            18:59:38,421 ERROR [STDERR] 21 janv. 2007 18:59:38 oracle.adfinternal.view.faces.agent.AgentImpl <init>
            ATTENTION: The agent type is unknown; creating an agent with null agent attributes.


            I searched a lot, but found nothing about this "agent type"....
            (and is there some available sources of Adf ? I think I'll look at the Trinidad adaptation to find what it want...).

            but before this : did you solve it ? and how ?
            many thanks.




            • 3. Re: JSF portlet using Oracle ADF Faces

              I'm having similar difficulties getting ADF Faces to run in the portal. I've stripped my WAR file down to the bare minimum. It contains a "web.xml" file containing JSF and ADF Faces configuration entries. I also have a minimal "faces-config.xml" file. There are no JSPs or managed beans at this point and I deleted all of the "portal*.xml" files. When I deploy this WAR to a copy of JBoss 4.0.5.GA without the Portal SAR, it deploys without any problems. However, when I deploy the same WAR to a copy of JBoss containing the Portal SAR, I get the exception listed below. I'm using JBoss Portal 2.6 ALPHA2.

              18:03:11,193 ERROR [STDERR] Mar 1, 2007 6:03:11 PM oracle.adf.view.faces.webapp.AdfFacesFilter init
              SEVERE: null
              java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl
               at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
               at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
               at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
               at oracle.adf.view.faces.webapp.AdfFacesFilter.init(AdfFacesFilter.java:46)
               at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
               at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
               at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
               at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
               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.jboss.portal.server.deployment.PortalWebTomcat5App.startFilter(PortalWebTomcat5App.java:120)
               at org.jboss.portal.server.deployment.PortalWebTomcat5App.instrument(PortalWebTomcat5App.java:100)
               at org.jboss.portal.server.deployment.jboss.ServerDeployer.instrument(ServerDeployer.java:289)
               at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:244)
               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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
               at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy143.deploy(Unknown Source)