3 Replies Latest reply on Jun 12, 2008 10:42 AM by Mikael Andersson

    Does the facelets library work together with richfaces?

    Jan-Martijn Wijnholds Newbie

      Hi everyone,

      I'm using Richfaces en JSF together in an application. This is my first encounter with JSF and i ran into a problem. I would like to use the template-mechanism with is provided with the facelets of sun, by somehow my lib is nog reconised.

      I've build my project with Maven2 and these are my libs:

      antlr:antlr:jar:2.7.6:compile
       aopalliance:aopalliance:jar:1.0:compile
       asm:asm:jar:1.5.3:compile
       asm:asm-attrs:jar:1.5.3:compile
       avalon-framework:avalon-framework:jar:4.1.3:compile
       cglib:cglib:jar:2.1_3:compile
       com.sun.facelets:jsf-facelets:jar:1.1.14:runtime
       commons-beanutils:commons-beanutils:jar:1.7.0:compile
       commons-collections:commons-collections:jar:3.2:compile
       commons-digester:commons-digester:jar:1.8:compile
       commons-logging:commons-logging:jar:1.1:compile
       dom4j:dom4j:jar:1.6.1:compile
       javax.faces:jsf-api:jar:1.1_02:compile
       javax.faces:jsf-impl:jar:1.1_02:runtime
       javax.persistence:persistence-api:jar:1.0:compile
       javax.servlet:jstl:jar:1.1.2:compile
       javax.servlet:servlet-api:jar:2.4:compile
       javax.transaction:jta:jar:1.0.1B:compile
       jboss:javassist:jar:3.3.ga:compile
       jboss:jboss-archive-browsing:jar:5.0.0alpha-200607201-119:compile
       junit:junit:jar:4.1:compile
       log4j:log4j:jar:1.2.12:compile
       logkit:logkit:jar:1.0.1:compile
       net.sf.ehcache:ehcache:jar:1.2.3:compile
       org.hibernate:hibernate:jar:3.2.1.ga:compile
       org.hibernate:hibernate-annotations:jar:3.2.1.ga:compile
       org.hibernate:hibernate-entitymanager:jar:3.2.1.ga:compile
       org.richfaces.framework:richfaces-api:jar:3.1.2.GA:compile
       org.richfaces.framework:richfaces-impl:jar:3.1.2.GA:compile
       org.richfaces.ui:richfaces-ui:jar:3.1.2.GA:compile
       org.springframework:spring:jar:2.5:compile
       org.springframework:spring-beans:jar:2.0.2:compile
       org.springframework:spring-context:jar:2.0.2:compile
       org.springframework:spring-core:jar:2.0.2:compile
       org.springframework:spring-dao:jar:2.0.2:compile
       org.springframework:spring-hibernate3:jar:2.0.2:compile
       org.springframework:spring-jdbc:jar:2.0.2:compile
       org.springframework:spring-jpa:jar:2.0.2:compile
       org.springframework:spring-mock:jar:2.0.2:compile
       org.springframework:spring-support:jar:2.0.2:compile
       org.springframework:spring-web:jar:2.0.2:compile
       org.springframework:spring-webmvc:jar:2.0.2:compile
       taglibs:standard:jar:1.1.2:compile


      inside my JSP-file i'm trying to import:

      <%@ taglib uri="http://java.sun.com/jsf/facelets" prefix="ui"%>


      all the needed libs are in the classpath, but stil i get the following error:

      5099 [http-8080-Processor23] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/kms].[jsp] - Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/facelets cannot be resolved in either web.xml or the jar files deployed with this application
       at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
       at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
       at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
       at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
       at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
       at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
       at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
       at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
       at org.apache.jasper.compiler.Parser.parse(Parser.java:127)
       at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
       at org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
       at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
       at org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
       at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:346)
       at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:152)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:214)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
       at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
       at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
       at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
       at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:686)
       at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:656)
       at org.apache.jsp.index_jsp._jspService(index_jsp.java:45)
       at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
       at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
       at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)


      Also Eclipse is telling me that the libary can not be found. Does someone know what i'm doeing wrong?

      thnx!

      Jan-Martijn