14 Replies Latest reply on Mar 14, 2004 2:26 PM by 843842

    Problem running JSF 1.0 FR with JWSDP 1.3

    843842
      I have installed the latest release of JWSDP 1.3 and run/modified/tested the jfs EA4 samples, what worked fine.
      After this i downloaded JSF 1.0 FR and installed as described in the contained install instructions (replace JWSDP_HOME/jsf with the content from the zip file, clear working-dir,...). This doesn't work (the server loads with error messages, manager-app and ROOT are not available; first cardemo page loads, rest fails, ...). Obviously this leads to a library mismatch or name mangling.

      Since I'm not so familiar with JWSDP and JSF (till now I used JSP under tomcat only) I don't know exactly why the classes are not found/what is not found; JWSDP was told to be the straight way to develop JSF apps, so I decided to install JWSDP!?

      Please can someone give me some assistance in starting up my JSF development?

      These are some messages of the jwsdp-log:
      2004-03-09 12:37:03 Error configuring application listener of class com.sun.faces.config.ConfigListener
      java.lang.ClassNotFoundException: com.sun.faces.config.ConfigListener
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1373)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1220)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3573)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4099)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:868)
      ...
      2004-03-09 12:37:44 ApplicationDispatcher[/jsf-cardemo] Servlet.service() for servlet jsp threw exception
      java.lang.NoClassDefFoundError: org/apache/jsp/storeFront_jsp (wrong name: org/apache/jsp/Storefront_jsp)
           at java.lang.ClassLoader.defineClass0(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
           at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
           at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:196)
           at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:114)
      ...
        • 1. Re: Problem running JSF 1.0 FR with JWSDP 1.3
          843842
          The class com.sun.faces.config.ConfigListener has been renamed com.sun.faces.config.ConfigureListener
          • 2. Re: Problem running JSF 1.0 FR with JWSDP 1.3
            843842
            I'm going to go out on a limb here and say cardemo distributed with JSF 1.0 FCS just will not work with JWSDP 1.3. The cardemo sample is missing files, and copying the files (from EA4) into the appropriate directories just causes new errors, due to the differences between JSF 1.0 EA4 and JSF 1.0 FCS. Furthermore, the documentation alludes to the servlet mapping changing from /faces/* to *.faces, yet when the app starts, the URLs produced still include "/faces/"...

            If you get this working I would really like to know how you did it, because I have given up after several days of trying. Other posters suggest it works just fine but give only minimal information as to how...

            The website says the new samples will be available in "a few weeks". I'm just going to wait for them unless someone posts an answer
            • 3. Re: Problem running JSF 1.0 FR with JWSDP 1.3
              843842
              I've now installed Tomcat 5.0.19 and deployed the car-demo war from JSF 1.0 FR.
              Worked out of the box!
              Seems that the libs of JSF 1.0FR don't work with the Tomcat version of JWSDP 1.3
              • 4. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                843842
                OK here goes

                jwsdp1.3 is installed at C:\jwsdp-1.3 on my machine - please adjust your refs accordingly

                #1 Stop JWSDP1.3 / Tomcat
                #2 Delete everything in C:\jwsdp-1.3\work\Catalina\localhost
                #3 Delete ORIGINAL JSF directory - C:\jwsdp-1.3\jsf
                #4 Install JSF1.0FR to C:\jsf-1_0
                #5 Create C:\jwsdp-1.3\jsf
                #6 Create C:\jwsdp-1.3\jsf/lib
                #7 copy C:\jsf-1_0 to C:\jwsdp-1.3\jsf/lib
                #8 C:\jsf-1_0\samples/build.properties as below

                # Java Server Faces 1.0 Final Release
                jsf.home=C:/jsf-1_0

                jsf-api.jar=${jsf.home}/lib/jsf-api.jar
                jsf-impl.jar=${jsf.home}/lib/jsf-impl.jar
                commons-logging.jar=${jsf.home}/lib/commons-logging.jar
                commons-digester.jar=${jsf.home}/lib/commons-digester.jar
                commons-beanutils.jar=${jsf.home}/lib/commons-beanutils.jar
                commons-collections.jar=${jsf.home}/lib/commons-collections.jar

                demo-components.jar=${jsf.home}/samples/demo-components.jar


                # point to JST1.1 (JSP2.0 Container) or JST1.0 (JSP 1.2 Container) libraries
                jstl.jar=C:/jakarta-taglibs/standard/lib/jstl.jar
                standard.jar=C:/jakarta-taglibs/standard/lib/standard.jar

                #jstl.jar=C:/jakarta-taglibs/standard-1.0/lib/jstl.jar
                #standard.jar=C:/jakarta-taglibs/standard-1.0/lib/standard.jar


                # available in J2EE SDK install
                mail.jar=C:/Sun/AppServer/lib/mail.jar


                # The following property settings assume that you are using JWSDP 1.3.
                # If you are using any other environment, adjust the properties
                # accordingly.

                # In a JWSDP 1.3 installation you should only have to change
                # the following property:
                tomcat.home=C:/jwsdp-1.3
                #tomcat.home=C:/jakarta-tomcat-5.0.19

                # ----- Dependant Properties -----

                # The following properties do not have to be configured if you are
                # using a JWSDP 1.3 container.

                # In a container other than JWSDP 1.3, make sure that you have each
                # of these dependancies and the properties point to the correct
                # location:


                servlet.jar=${tomcat.home}/common/lib/servlet-api.jar
                jsp.jar=${tomcat.home}/common/lib/jsp-api.jar


                # ----- Build Control Properties -----

                # By default, the dependent libraries are included with
                # every sample app. Since the libraries come bundled with
                # containers like JWSDP 1.3 you may want to use the container's
                # libraries instead and not bundle them with your web application.

                # To not bundle the dependant libraries with the sample apps
                # comment out the following property:

                #build.standalone=true


                #9 modify C:\jsf-1_0\samples\cardemo/build.xml
                from
                <target name="prepare" depends="init"

                to
                <target name="prepare" depends="init,clean"

                (may NOT be absolutely necessary)


                #10 start JWSDP1.3 / Tomcat

                Now the usual stuff

                Internet Explorer

                #11 http://localhos:8080 - JWSDP welcome page

                #12 choose Web Application Manager & login

                #13 in 'Upload a WAR file to deploy' click on browse - find C:\jsf-1_0\samples/jsf-cardemo.war & click on deploy

                WebManager should install CarDemo & should show it in list of available Apps

                #14 You can click on /jsf-cardemo in App list in WebManager or open new copy of IE & use
                http://localhost:8080/jsf-cardemo/

                Don't think I've missed anything
                Hope this helps






                • 5. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                  843842
                  OOPs

                  Sorry fotgot the MAKE step

                  #9a invoke Ant on the build.xml to make a new jsf-cardemo.war

                  Obviously you will need to ensure build environment & classpaths etc are correct - I am using the netBeans IDE so I don't have to worry too much
                  • 6. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                    843842
                    Stefan,

                    I REALLY appreciate your help on this one... Now that I have followed your instructions, I see a couple of things I had done wrong.

                    Thanks a bunch... Do you collect Duke Dolloars? If so, I will post something just to give you 5 for your help...

                    Thanks again.
                    • 7. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                      843842
                      Dukes are always welcome

                      Glad to help
                      • 8. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                        843842
                        I have discovered this appears to be a problem in Linux. It would seem the jwsdp-1.3 for Linux is not the same as the one for WIndows. The only other possibility would be the JVM, as the jsf is identical for both.

                        Basically, I have done an identical install on both platforms. The one on Windows works (if the steps above are followed). However, the install on Linux still posseses the problems I mentioned in an earlier post.

                        So, I don't know what the solution for Linux is, but, I suspect it is going to take someone more knowledgeable than myself to figure it out (as I am a newbie to JSF)...
                        • 9. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                          843842
                          Has anybody from sun or the JSF group confirmed that JSF 1.0 FR doesn't work with JWSDP 1.3. I previously had JWSDP 1.3 working with JSF Beta. I downloaded JSF 1.0 FR and installed but attempts to start the jsf demos failed.

                          I tried downloading the most current stuff and re-installing, now the JSF stuff works but all the other examples don't start (see sample error in logs below).

                          I don't see any info in the release notes. Will somebody "in the know" please confirm whether JSF 1.0 FR works with JWSDP 1.3.

                          INFO: Processing Context configuration file URL file:/home/pcullen/jwsdp-1.3/conf/Catalina/localhost/jwsdp-catalog.xml
                          Mar 11, 2004 1:02:58 PM org.apache.catalina.core.StandardContext listenerStart
                          SEVERE: Skipped installing application listeners due to previous error(s)
                          Mar 11, 2004 1:02:58 PM org.apache.catalina.core.StandardContext start
                          SEVERE: Error listenerStart
                          Mar 11, 2004 1:02:58 PM org.apache.catalina.core.StandardContext start
                          SEVERE: Context startup failed due to previous errors
                          Mar 11, 2004 1:02:59 PM org.apache.catalina.logger.LoggerBase stop
                          • 10. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                            843842
                            Note I am NOT from Sun or the Expert Group

                            But yes the JSF1.0FR does work with the JWSDP1.3 (I am using it on win2K + NetBeans IDE + JDK1.4.2)
                            So this is using the built-in Tomcat 5.0.18

                            Please see my earlier post in this thread


                            i am also deploying (for production) to a Linux box with Tomcat 5.0.19 + JRE1.4.2 installed

                            ASSUMING windows install environment

                            Stop Tomcat
                            Make sure that you delete ALL files in

                            C:\jwsdp-1.3\work\Catalina\localhost

                            Delete al the log files in
                            C:\jwsdp-1.3\logs

                            (just so that you get a clean set of info when you startup)


                            start Tomcat & deploy again

                            • 11. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                              843842
                              Hi,
                              Try this.
                              1. rm -fr JWSDP_HOME/jsf
                              2. Also do an rm -fr on all the jsf-* directories under JWSDP_HOME/work/catalina/localhost.
                              (I usually do rm -fr work directory to wipe out all the cached info.)
                              3. unpack the downloaded 1.0 binrary zip under JWSDP_HOME.
                              4. rename the directory to jsf.
                              5. It is also advisable to clean up your browser cache, but it is not mandatory.
                              -Jayashri
                              • 12. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                                843842
                                I was able to get cardemo working rather easily on Linux using a standard install of tomcat 5.0.19. It required the following steps:

                                by following the steps above and a few extras, cardemo ran the first time.

                                In addition to the steps above (in Stefan's post), I had to copy the jwsdp-shared and jstl directories from an existing jwsdp-1.3 install to the $TOMCAT_HOME (/opt/tomcat on my installation).
                                Also, I had to remove the <security-constraint> from cardemo's web.xml file.

                                • 13. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                                  843842
                                  I neglected to mention in my previous post; Items in Stefan's post marked as JWSDP_HOME I replaced with my new TOMCAT_HOME.
                                  • 14. Re: Problem running JSF 1.0 FR with JWSDP 1.3
                                    843842
                                    I'm getting the same error. The reason for it seems to be that a security issue prevents the loading of some classes in packet: com.sun.faces.config.
                                    According to the log (shown below) there is a signer information mismatch in this packet.

                                    The reason it fails for some and succeds for others, might be the local security configuration. I used j2sdk1.4.2_03 on Windows here.

                                    The reason for the failure is clearer in the log file than what's displayed on the console. Extraxts from the logs follows.

                                    -- Lars

                                    It fails even to listen at the 8080 port very early: This is shown like this in the console window.
                                    <====
                                    I NFO: Processing Context configuration file URL file:C:\jwsdp-1.3\conf\Catalina\
                                    localhost\jwsdp-catalog.xml
                                    2004-mar-14 14:44:23 org.apache.catalina.core.StandardContext listenerStart
                                    SERIOUS: Skipped installing application listeners due to previous error(s)
                                    2004-mar-14 14:44:23 org.apache.catalina.core.StandardContext start
                                    SERIOUS: Error listenerStart
                                    <====


                                    But he cause of the problem is more clearly shown in the log (logs\jwsdp_log*) than on the console:
                                    <===
                                    2004-03-14 14:44:23 Error configuring application listener of class com.sun.faces.config.ConfigListener
                                    java.lang.SecurityException: class "com.sun.faces.config.ConfigListener"'s signer information does not match signer information of other classes in the same package
                                         at java.lang.ClassLoader.checkCerts(ClassLoader.java:599)
                                         at java.lang.ClassLoader.defineClass(ClassLoader.java:532)
                                         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
                                         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
                                         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
                                         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
                                         at java.security.AccessController.doPrivileged(Native Method)
                                         at java.net.U RLClassLoader.findClass(URLClassLoader.java:187)
                                         at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:520)
                                    <===