13 Replies Latest reply on Nov 16, 2006 2:43 AM by DV Anh

    Where is the MyFaces cardemo portlet source?

    Dean Del Ponte Newbie

      Where may I find the source code for the MyFaces cardemo portlet example? It is not included with the download.

      Thanks

        • 1. Re: Where is the MyFaces cardemo portlet source?
          sukh garg Newbie

           

          "ddelponte" wrote:
          Where may I find the source code for the MyFaces cardemo portlet example? It is not included with the download.

          Thanks


          Please let me know too if you get to know about the source code for cardemo. Thanks

          • 2. Re: Where is the MyFaces cardemo portlet source?
            Kurt Olsen Newbie

            The java server faces reference implementation from sun microsystems contains the source. I downloaded the zip file then copied the .java files from it into the portal version. Seemed to work fine.

            • 3. Re: Where is the MyFaces cardemo portlet source?
              Roy Russo Master

              I'll have our resident MyFaces portlet expert post something in the wiki when he has time about getting JSF portlets running in portal. I'll have him post the source as well for the cardemo-portlet.

              • 4. Re: Where is the MyFaces cardemo portlet source?
                Iso Wertz Newbie

                any news in this context?

                • 5. Re: Where is the MyFaces cardemo portlet source?
                  Roy Russo Master

                  I will ask Stan "the man" Silvert for the sources, and post here when its up on portletswap and available.

                  • 6. Re: Where is the MyFaces cardemo portlet source?
                    Roy Russo Master

                    I think you can get the sources from the JSF 1.1 RI: http://java.sun.com/j2ee/javaserverfaces/download.html

                    We didn't modify the source files at all, just added xml descriptors for the portal.

                    • 7. Re: Where is the MyFaces cardemo portlet source?
                      michael germeys Newbie

                      Roy,

                      I did just what you said: took the cardemo.war file and added the same xml description files from the jboss cardemo portlet but I got a ClassCastException. I also took the guessNumber sample app from the jsf-portlet.jar and got the same error.

                      javax.faces.FacesException: java.lang.ClassCastException
                      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:334)
                      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                      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:324)
                      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.apache.catalina.core.StandardContext.init(StandardContext.java:5031)
                      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:324)
                      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
                      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
                      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
                      at org.jboss.web.WebModule.startModule(WebModule.java:83)
                      at org.jboss.web.WebModule.startService(WebModule.java:61)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:324)
                      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:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
                      at $Proxy0.start(Unknown Source)
                      at org.jboss.system.ServiceController.start(ServiceController.java:417)
                      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:324)
                      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:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                      at $Proxy88.start(Unknown Source)
                      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:469)
                      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:324)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                      at $Proxy89.start(Unknown Source)
                      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                      at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:324)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                      at $Proxy8.deploy(Unknown Source)
                      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
                      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
                      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
                      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:280)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:324)
                      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:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
                      at $Proxy0.start(Unknown Source)
                      at org.jboss.system.ServiceController.start(ServiceController.java:417)
                      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                      at java.lang.reflect.Method.invoke(Method.java:324)
                      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:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                      at $Proxy4.start(Unknown Source)
                      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
                      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
                      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:324)
                      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                      at $Proxy5.deploy(Unknown Source)
                      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:477)
                      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:357)
                      at org.jboss.Main.boot(Main.java:200)
                      at org.jboss.Main$1.run(Main.java:464)
                      at java.lang.Thread.run(Thread.java:534)
                      Caused by: java.lang.ClassCastException
                      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:876)
                      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:925)
                      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:406)
                      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:328)

                      mike

                      • 8. Re: Where is the MyFaces cardemo portlet source?
                        Roy Russo Master

                        I will look at it. It could be that the current version of AS conflicts with the jsf jars in the portlet.

                        • 9. Re: Where is the MyFaces cardemo portlet source?
                          Paul Joyce Newbie

                          cooliluv,

                          I got the guess number sample working by 'converting' it to MyFaces. that is
                          1) changed the portlet.xml to use MyFacesGenericPortlet instead of the sun FacesPortlet.
                          2) changed the init-param to default-view

                           <description>JSF GuessNumber Portlet</description>
                           <portlet-name>guessNumber</portlet-name>
                           <display-name>JSF GuessNumber Portlet</display-name>
                           <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
                          
                           <init-param>
                           <description>Portlet init page</description>
                           <name>default-view</name>
                           <value>/greeting.jsp</value>
                           </init-param>
                          


                          3) changed the in web.xml to
                          <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                          </listener>
                          


                          4) removed the Sun Jars (jsf-impl and jsf-api) from the war. it will use the MyFaces jars bundled with JBoss.

                          5) it works.

                          My problem still is that I have other Sun RI apps that I want to use with JBoss and leave as Sun RI JSF. The wiki says you just remove the MyFaces jars from JBoss but this 'breaks' JBoss - it uses them itself.

                          any solution ?

                          /pj

                          • 10. Re: Where is the MyFaces cardemo portlet source?
                            michael germeys Newbie

                            Hey,

                            I also need the Sun RI. I have an application using JSF and Spring. If I use MyFaces instead it does not work.

                            mike

                            • 11. Re: Where is the MyFaces cardemo portlet source?
                              Peter Thurnhofer Newbie

                              Roy,

                              I got the same error. The reason is :
                              "org.apache.myfaces.custom.rssticker.HtmlRssTicker not found".
                              Which lib do I need?

                              • 12. Re: Where is the MyFaces cardemo portlet source?
                                Hervé Minko Newbie

                                does somebody have the car demo sample zip file? I can't download it from the JBoss site (the zip file is always corrupt). I also want to know how to "convert" any JSF Webaplication in a portlet application

                                • 13. Re: Where is the MyFaces cardemo portlet source?
                                  DV Anh Newbie

                                  i can't post cardemo portlet source code in this topic, send me email for get cardemo source code.

                                  rind911@yahoo.com

                                  -AnhDV