8 Replies Latest reply on Jun 28, 2010 6:14 AM by sward

    Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

      This simply should be a jar file issue but I have JSTL jar:  I don't have a problem with the page until I setup RichFaces...

       

      Using:

      JSF 2.0 Mojarra

      Tomcat 6.0.24

      IE 6.0

      Rich Faces 3.3.3 beta

       

      Tomcat global lib:

      jsf-api.jar  (Mojarra JSF 2.0)

      jsf-impl.jar

      commons-fileupload-1.2.1.jar

       

       

      Web App WEB-INF/lib

      commons-beanutils-1.7.0.jar 
      commons-collections-3.2.jar 
      commons-digester-1.8.1.jar  
      commons-logging-1.1.1.jar   
      jhighlight-1.0.jar        

      jstl-api-1.2.jar               
      jstl-impl-1.2.jar
                    
      richfaces-api-3.3.3.BETA1.jar  
      richfaces-impl-3.3.3.BETA1.jar 
      richfaces-ui-3.3.3.BETA1.jar 

       

      Full Error:

      java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
           at java.lang.Throwable.<init>(Throwable.java:196)
           at java.lang.Error.<init>(Error.java:49)
           at java.lang.NoClassDefFoundError.<init>(NoClassDefFoundError.java:40)
           at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:339)
           at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:130)
           at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:170)
           at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
           at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
           at java.lang.Thread.run(Thread.java:595)
      
        • 1. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

          I have the downloaded example from richfaces beta version 3.3.3.  I noticed that the JSF jar files are 1.2 jars.  If I add those 1.2 jars into WEB-INF/LIB it will work - but it's not using the 2.0 jars - which is what I want... Has anyone been able to run Rich Faces with Tomcat over JSF 2.0?

          • 2. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
            nbelaevski

            Hi Jessica,

             

            JSTL & JSF are two very different things, so you should add jstl.jar to your application.

             

            RF 3.3.3 + JSF 2 works ok on Tomcat 6, I didn't have any problems with richfaces-demo. To be sure you are using correct configuration, I'd suggest you to look at the special wiki page: http://community.jboss.org/wiki/RichFaces333andJSF20

            • 3. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

              You are correct.  I think I download the wrong version - the one for 1.2.  I can run the demo using the 2.0 jars.  But If I try to setup a base enviroment with just the bear mininum, it doesn't work, I still get the aforementioned error.  I did notice that if I take the jsf-facelets-1.1.15.B1.jar in the example I do get the aforementioned error as well.

               

              According to the documentation I should be able to run it with only having the following jars:

               

              commons-beanutils-1.7.0.jar
              commons-collections-3.2.jar
              commons-digester-1.8.1.jar 
              commons-logging-1.0.4.jar 

              jsf-facelets-1.1.15.B1.jar

               

              The demo is great - I just want a base working enviroment with out all the extras - for now.

              • 4. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
                nbelaevski
                JSTL .jar is required by JSF, so it should be there. Sorry, but I'm not getting whether you have this file in the problematic environment or not.
                • 5. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

                  Well I did figure out the class not found issue.

                  I had the JSF jars in the global lib enviroment.  I put the richfaces in web-inf/lib with the jstl.  When I move the JSF and JSTL into the same directory, I don't get that error message anymore.  (Either in the global or the application)

                   

                  But now I have another issue.  When it hits the .jsf file instead of displaying the page it wants to open the file.

                   

                  When I take the rich faces jars out and take out the richface stuff in the XML the page works fine.  It seems like something is wrong with my web.xml.  But I don't understand why it would work fine as long as I don't have the richfaces in there.

                   

                  Jar files:

                   

                  in app/web-inf/lib

                   

                  jsf-api-2.0.1.jar
                  jsf-impl-2.0.1.jar

                  jstl-1.1.2.jar

                  commons-beanutils-1.7.0.jar           
                  commons-collections-3.2.jar           
                  commons-digester-1.8.1.jar            
                  commons-logging-1.0.4.jar             
                  jhighlight-1.0.jar                    
                  richfaces-api-3.3.3.BETA1.jar         
                  richfaces-impl-3.3.3.BETA1.jar        
                  richfaces-impl-jsf2-3.3.3.BETA1.jar   
                  richfaces-ui-3.3.3.BETA1.jar         

                  • 6. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
                    ilya_shaikovsky

                    1) you should not include both richfaces-impl jars. only richfaces-impl-jsf2 for jsf 2 environment.

                     

                    2) also please include to web.xml

                         <context-param>

                              <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>

                              <param-value>true</param-value>

                         </context-param>


                     

                     

                    also it highly recommended to use latest jsf 2 (2.0.2 currently) as we switching our testing to latest versions as far as them released. JSF 2 is fixes many problems between first releases currently

                    • 7. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

                      I made the aforementioned recommended changes.  However, it still tries to open the page instead of rendering the page.  The filter should be picking up the JSF page but it isn't.

                       

                       

                      I'm using the following richfaces jar files, now:

                       

                      richfaces-api-3.3.3.BETA1.jar         
                      richfaces-impl-jsf2-3.3.3.BETA1.jar   
                      richfaces-ui-3.3.3.BETA1.jar         

                       

                      I removed the

                      richfaces-impl-jsf3-3.3.3.BETA1.jar version.

                      • 8. Re: Rice Faces 3.3.3 over Tomcat 6.0.24 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
                        sward

                        I have the following exception while migrating from JSF1.1 to JSF 2

                        Note : I already use the JSTL1.2.jar and it’s in my classpath :S

                         

                        java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

                              at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:339)

                              at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:130)

                              at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:170)

                              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)

                              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)

                              Truncated. see log file for complete stacktrace

                        >

                        <Jun 28, 2010 11:16:46 AM EEST> <Error> <HTTP> <BEA-101107> <[weblogic.servlet.internal.WebAppServletContext@184222a - appName: 'SingleAccessEar', name: 'single_access', context-path: '/single_access'] Problem occurred while serving the error page.

                        java.lang.StringIndexOutOfBoundsException: String index out of range: -1

                              at java.lang.String.substring(String.java:1762)

                              at java.lang.String.substring(String.java:1735)

                              at jsp_servlet.__error._jspService(__error.java:114)

                              at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

                              at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)

                              Truncated. see log file for complete stacktrace