Socorro ..não consigo fazer executar jsf 2.0 com richfaces 4

Olá,

estou usando tomcat 7,eclipse helios,java 6 , jsf 2.0,richfaces 4

e nada de dar certo…o que faço…pra isso funcionar…???

alguém já passou por isso.

abs

os jars referente richfaces no diretorio lib:

richfaces-components-api-4.0.0.20110209-M6.jar
richfaces-components-ui-4.0.0.20110209-M6.jar
richfaces-core-api-4.0.0.20110209-M6.jar
richfaces-core-impl-4.0.0.20110209-M6.jar

testar.xhtml


 <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
            
        <script>
         function getRightTop(ref) {
           var position = new Object();
           position.top = 0; //ref.offsetTop;
           position.left =0; // ref.offsetLeft+ref.clientWidth+6;
           return position;
         }
        </script>
        
        <a4j:commandButton  value="Logar" action="#{rich:component('mp')}.show() "/>
        <rich:modalPanel  id="mp" minHeight="200" minWidth="450" 
            height="200" width="500">
            <f:facet name="header">
                <h:outputText value="Modal Panel Title" />
            </f:facet>
            <f:facet name="controls">
            </f:facet>
                <p>Any JSF content might be inside the panel. In case of using 
                Facelets or JSF 1.2, it might be any mixed content.</p> 
                
                <p>The RichFaces modal panel is good with &lt;a4j:include&gt; to create
                a wizard like behavior.</p>
                <p>The model panel is open and closed from the javascript function
                on <i>Richfaces</i> object. The following code 
                <a  >hide this panel</a>:
                &lt;f:verbatim&gt;&#35;&lt;/f:verbatim&gt;{rich:component('mp')}.hide()</p>
        &lt;/rich:modalPanel&gt;
&lt;/ui:composition&gt;

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.servlet.ServletException: /restrito/testar.xhtml @19,38 &lt;rich:modalPanel&gt; Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: modalPanel
	financeiro.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:44)

root cause

javax.servlet.ServletException: /restrito/testar.xhtml @19,38 &lt;rich:modalPanel&gt; Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: modalPanel
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	financeiro.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:32)

root cause

javax.faces.view.facelets.TagException: /restrito/testar.xhtml @19,38 &lt;rich:modalPanel&gt; Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: modalPanel
	com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:289)
	com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:228)
	com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
	com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
	com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
	com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
	javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
	com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:388)
	com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:364)
	com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:122)
	com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:294)
	com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:89)
	com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:159)
	com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:157)
	com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:79)
	com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:74)
	com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:95)
	java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	java.util.concurrent.FutureTask.run(FutureTask.java:138)
	com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:110)
	com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:115)
	com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:58)
	com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:245)
	com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:190)
	com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:731)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
	org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
	org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
	org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
	org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
	org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
	financeiro.web.filter.ConexaoHibernateFilter.doFilter(ConexaoHibernateFilter.java:32)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.4 logs.
Apache Tomcat/7.0.4


&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
  &lt;display-name&gt;FinanceiroWeb&lt;/display-name&gt;
  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;servlet&gt;
    &lt;display-name&gt;FacesServlet&lt;/display-name&gt;
    &lt;servlet-name&gt;FacesServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;FacesServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
&lt;filter&gt;
   &lt;filter-name&gt;conexaoFilter&lt;/filter-name&gt;
   &lt;filter-class&gt;financeiro.web.filter.ConexaoHibernateFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;conexaoFilter&lt;/filter-name&gt;
    &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  	&lt;!-- JNDI --&gt;
  	&lt;resource-ref&gt;
		&lt;description&gt;DataSource FinaceiroBD&lt;/description&gt;
		&lt;res-ref-name&gt;jdbc/FinanceiroDB&lt;/res-ref-name&gt;
		&lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
		&lt;res-auth&gt;Container&lt;/res-auth&gt;
	&lt;/resource-ref&gt;
  
  
  	&lt;!-- Spring Security --&gt;
	&lt;context-param&gt;
		&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
		&lt;param-value&gt;
			/WEB-INF/applicationContext.xml
			/WEB-INF/applicationContext-security.xml
		&lt;/param-value&gt;
	&lt;/context-param&gt;
  	&lt;filter&gt;
		&lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
		&lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
	&lt;/filter&gt;

	&lt;filter-mapping&gt;
		&lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
		&lt;url-pattern&gt;/*&lt;/url-pattern&gt;
	&lt;/filter-mapping&gt;

	&lt;listener&gt;
		&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
	&lt;/listener&gt;
  
    &lt;context-param&gt;
		&lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
		&lt;param-value&gt;com.sun.el.ExpressionFactoryImpl&lt;/param-value&gt;
	&lt;/context-param&gt;
  
  &lt;!-- PrimeFaces --&gt;
  &lt;servlet&gt;
    &lt;servlet-name&gt;Resource Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;org.primefaces.resource.ResourceServlet&lt;/servlet-class&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Resource Servlet &lt;/servlet-name&gt; 
  &lt;url-pattern&gt;/primefaces_resource/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;context-param&gt;
    &lt;param-name&gt;com.sun.faces.allowTextChildren&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!--WEBSERVICE--&gt;
	&lt;listener&gt;
		&lt;listener-class&gt;com.sun.xml.ws.transport.http.servlet.WSServletContextListener&lt;/listener-class&gt;
	&lt;/listener&gt;
	&lt;servlet&gt;
		&lt;description&gt;Webservices do Financeiro&lt;/description&gt;
		&lt;display-name&gt;financeiroWS&lt;/display-name&gt;
		&lt;servlet-name&gt;financeiroWS&lt;/servlet-name&gt;
		&lt;servlet-class&gt;com.sun.xml.ws.transport.http.servlet.WSServlet&lt;/servlet-class&gt;
		&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
	&lt;/servlet&gt;
	&lt;servlet-mapping&gt;
		&lt;servlet-name&gt;financeiroWS&lt;/servlet-name&gt;
		&lt;url-pattern&gt;/webservice/financeiroWS&lt;/url-pattern&gt;
	&lt;/servlet-mapping&gt;
  
  

outra coisa qdo faço

<rich:m

só me mostra

rich:menuGroup
><rich:menuItem>
<rich:menuSeparator>
<rich:message>

e não existe Modalpanel ond acho esse ModalPanel ???

Tente com Primefaces.

paribe

acho que a versão 4M6 não tem ainda, mas se não me engano no 4CR1 já tem ela, quando você baixa as libs tem um txt mostrando quais são os componentes que já estão ok

Estão faltando 3 jars… de uma olhada no link:

http://www.patternizando.com.br/2011/03/projeto-jsf-2-0-com-richfaces-4-0/