7 Replies Latest reply on Apr 5, 2007 6:44 AM by paulo5

    Tab Pane - TabGradientA - Resource not Registered when chang

    paulo5

      I'm having a problem trying to get a tabbed pane working with any skin other than 'blueSky'. Whenever I change the skin context param in my web.xml I get the following error.

      org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.images.TabGradientA
       at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:376)
       at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:333)
       at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:128)
       at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:118)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:207)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)


      I've had a search around and found this topic:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=103609
      which suggested that it might be something to do with my web.xml which looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      
       <listener>
       <listener-class>
       com.sun.faces.config.ConfigureListener
       </listener-class>
       </listener>
      
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/faces-config.xml</param-value>
       </context-param>
      
       <!-- AJAX for JSF -->
      
       <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>
      
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>intranet</param-value>
       </context-param>
      
       <!-- Faces Servlet -->
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <!-- Faces Servlet Mapping -->
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.faces</url-pattern>
       </servlet-mapping>
      
       <!-- Security -->
       <security-constraint>
       <display-name>
       Prevent access to raw JSP pages that are for JSF pages.
       </display-name>h
       <web-resource-collection>
       <web-resource-name>Raw-JSF-JSP-Pages</web-resource-name>
       <!-- Add url-pattern for EACH raw JSP page -->
       <url-pattern>/custMaint.jsp</url-pattern>
       <url-pattern>/custSummary.jsp</url-pattern>
       <url-pattern>/error.jsp</url-pattern>
       </web-resource-collection>
       <auth-constraint>
       <description>No roles, so no direct access</description>
       </auth-constraint>
       </security-constraint>
      
      </web-app>


      Any pointers would be gratefully rec'd - this is the first time I've tried using richFaces so apologies if it's something obvious...

      Cheers,

      Paul

      jboss 4.0.5
      jsf Sun RI 1.1
      richFaces 3.0.0
      oscache 2.3
      ajax4jsf 1.1.0




        • 1. Re: Tab Pane - TabGradientA - Resource not Registered when c
          ilya_shaikovsky

          For me (ajax4jsf 1.1.1 SNAPSHOT, Rich Faces 3.0.1 SNAPSHOT) works fine.
          For the settings - look to the developer Guide. But most likely cache clearance(with CTRL+F5) - wil solve your problem.

          • 2. Re: Tab Pane - TabGradientA - Resource not Registered when c
            paulo5

            Thanks for your reply. Is there a problem with ajax4jsf1.1.0 and richfaces 3.0.0 then that has been addressed?

            I've tried clearing the cache with CTRL+F5, also closing down the browser and restarting jboss but I'm still getting the resource not found exception.

            Any ideas?

            • 3. Re: Tab Pane - TabGradientA - Resource not Registered when c
              ilya_shaikovsky

              Try please to update your versions. As far as I remember there was some questions like that.

              • 4. Re: Tab Pane - TabGradientA - Resource not Registered when c
                paulo5

                I've updated my versions but I'm now getting the following error

                org.apache.jasper.JasperException: The absolute uri: http://richfaces.ajax4jsf.org/rich cannot be resolved in either web.xml or the jar files deployed with this application
                 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)
                 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
                 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
                 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
                 javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
                 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
                 com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
                 org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
                 org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
                 com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
                 com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
                 com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
                 javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
                 org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
                 org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
                 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                


                I've inlcuded the jar files (oscache-2.3.jar, richfaces-3.0.1-SNAPSHOT.jar and ajax4jsf-1.1.1-20070402.230943-21.jar) in the lib directory of my jboss configuration (and restarted jboss) - Is this ok to do? I'd rather not include the libraries directly in my project as this increases the project size needlessly and will also enable multiple projects to use the same jar.

                The uri mentioned in the error message is at the top of a jsp page and was working before....? I'm confused....

                • 5. Re: Tab Pane - TabGradientA - Resource not Registered when c

                  Yes. It is the same URI. So, application does not see the jar in the classpath

                  • 6. Re: Tab Pane - TabGradientA - Resource not Registered when c
                    paulo5

                    I'm definitely doing something wrong here - but I can't see what I'm doing wrong.

                    My richfaces, ajax4jsf and oscache jars are all in the lib directory of my jboss configuration and the server has been restarted.

                    My .jsp pages include a taglib declaration:
                    <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>

                    I'm using eclipse and my .classpath file looks like this:

                    <?xml version="1.0" encoding="UTF-8"?>
                    <classpath>
                     <classpathentry kind="src" path="src"/>
                     <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/jsf-api.jar"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/jsf-impl.jar"/>
                     <classpathentry combineaccessrules="false" kind="src" path="/CustomerEJBClient"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/log4j.jar"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/TPCommon.jar"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/oscache-2.3.jar"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/richfaces-3.0.1-SNAPSHOT.jar"/>
                     <classpathentry kind="lib" path="C:/Java/jboss-4.0.5.GA/server/all/lib/ajax4jsf-1.1.1-20070402.230943-21.jar"/>
                     <classpathentry kind="output" path="bin"/>
                    </classpath>


                    So as far as I can tell, everything should be OK - but I keep getting the
                    "he absolute uri: http://richfaces.ajax4jsf.org/rich cannot be re
                    solved in either web.xml or the jar files deployed with this application" error.

                    Am i missing something silly?

                    Thanks for any help

                    Paul



                    • 7. Re: Tab Pane - TabGradientA - Resource not Registered when c
                      paulo5

                      In case anyone else has this problem.

                      I got it to work in the end by extracting the rich.tld file out of the META-INF directory in the richFaces.jar and including that in the WEB-INF\lib directory of my project.

                      If all my projects from now on include the .tld then I only have to include the richFaces, oscache and ajax4jsf jars once on my server...happy days

                      Cheers