Return-Path: Delivered-To: apmail-tiles-users-archive@locus.apache.org Received: (qmail 38778 invoked from network); 25 Oct 2007 09:16:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Oct 2007 09:16:03 -0000 Received: (qmail 6437 invoked by uid 500); 25 Oct 2007 09:15:51 -0000 Delivered-To: apmail-tiles-users-archive@tiles.apache.org Received: (qmail 6355 invoked by uid 500); 25 Oct 2007 09:15:50 -0000 Mailing-List: contact users-help@tiles.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@tiles.apache.org Delivered-To: mailing list users@tiles.apache.org Received: (qmail 6346 invoked by uid 99); 25 Oct 2007 09:15:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 02:15:50 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [212.27.42.28] (HELO smtp2-g19.free.fr) (212.27.42.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2007 09:15:51 +0000 Received: from smtp2-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp2-g19.free.fr (Postfix) with ESMTP id 7A5E712B6F4 for ; Thu, 25 Oct 2007 11:15:29 +0200 (CEST) Received: from elostirion.local (vau75-4-82-225-145-109.fbx.proxad.net [82.225.145.109]) by smtp2-g19.free.fr (Postfix) with ESMTP id 0B3EE12B701 for ; Thu, 25 Oct 2007 11:15:28 +0200 (CEST) Message-ID: <47205DB6.8040309@bigfoot.com> Date: Thu, 25 Oct 2007 11:11:18 +0200 From: Nicolas LE BAS User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: users@tiles.apache.org Subject: Re: Standalone Tiles with myFaces - DefinitionsFactoryException class not found References: <13388265.post@talk.nabble.com> In-Reply-To: <13388265.post@talk.nabble.com> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, Remove this from faces-config.xml (this is for Tiles 1) : org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl Instead you will probably need to add something like this to web.xml : javax.faces.DEFAULT_SUFFIX .tiles And map TilesDispatchServlet on "*.tiles". Thus the JSF views will be routed through Tiles 2. Hope this helps Nick zargarf a �crit : > Hi, I'm trying to use myFaces and Standalone Tiles together using maven2. > However, when I try to deploy the war file to Tomcat, I get a > java.lang.NoClassDefFoundError: > org.apache.struts.tiles.DefinitionsFactoryException (which surprises me as > I'm using the jars for the standalone version of tiles). Do any of you know > why it's looking for org.apache.struts.tiles.DefinitionsFactoryException > instead of org.apache.tiles.DefinitionsFactoryException? > > Cheers > Faisal > > This is the stacktrace: > > 24-Oct-2007 10:40:08 org.apache.catalina.core.StandardContext listenerStart > SEVERE: Exception sending context initialized event to listener instance of > class org.apache.myfaces.webapp.StartupServletContextListener > java.lang.NoClassDefFoundError: > org.apache.struts.tiles.DefinitionsFactoryException > at java.lang.J9VMInternals.verifyImpl(Native Method) > at java.lang.J9VMInternals.verify(J9VMInternals.java:59) > at java.lang.J9VMInternals.initialize(J9VMInternals.java:120) > at sun.reflect.NativeConstructorAccess > > orImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:521) > at > org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:779) > at > org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:699) > at > org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:230) > at > org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:68) > at > org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:51) > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) > at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) > at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) > at > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825) > at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515) > at > org.apache.catalina.startup.HostConfig.check(HostConfig.java:1220) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:615) > at > org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458) > at > com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:231) > at > com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:238) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:833) > at > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) > at > org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1394) > at > org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:635) > at > org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:424) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) > 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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) > 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) > at java.lang.Thread.run(Thread.java:799) > > > Below, you can find the .pom file, the web.xml and the faces-config. > > Here is my application.pom file for maven encoding="UTF-8"?> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/maven-v4_0_0.xsd"> > 4.0.0 > com.zargonsolutions > zargonsolutions_myfaces_webapp > war > 1.0-SNAPSHOT > A custom project using myfaces > http://www.myorganization.org > > > zargonsolutions_myfaces_webapp > > > > > > jettyConfig > > > > org.mortbay.jetty > maven-jetty-plugin > > 10 > > > > > > > > javax.servlet > jsp-api > 2.0 > compile > > > tomcat > jasper-compiler > 5.5.9 > compile > > > tomcat > jasper-runtime > 5.5.9 > compile > > > tomcat > jasper-compiler-jdt > 5.5.9 > compile > > > > > > > mortbay-repo > mortbay-repo > http://www.mortbay.org/maven2/snapshot > > > > > > > > > > false > > > true > > apache-maven-snapshots > http://people.apache.org/repo/m2-snapshot-repository > > > > > > > org.apache.myfaces.core > myfaces-api > 1.1.6-SNAPSHOT > compile > > > > org.apache.myfaces.core > myfaces-impl > 1.1.6-SNAPSHOT > compile > > > > myfaces > tomahawk > 1.1.1 > compile > > > > junit > junit > 4.0 > test > > > org.apache.tiles > tiles-core > 2.0-SNAPSHOT > > > org.apache.tiles > tiles-jsp > 2.0.4 > > > org.apache.tiles > tiles-api > 2.0.4 > > > > > > > > Here is the web.xml > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" > version="2.4"> > > MyProject web.xml > > > > > Comma separated list of URIs of (additional) faces > config files. > (e.g. /WEB-INF/my-config.xml) > See JSF 1.0 PRD2, 10.3.2 > Attention: You do not need to put /WEB-INF/faces-config.xml in > here. > > javax.faces.CONFIG_FILES > /WEB-INF/faces-config.xml > > > State saving method: "client" or "server" (= default) > See JSF Specification 2.5.3 > javax.faces.STATE_SAVING_METHOD > client > > > Only applicable if state saving method is "server" (= > default). > Defines the amount (default = 20) of the latest views are stored > in session. > > org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION > 20 > > > Only applicable if state saving method is "server" (= > default). > If true (default) the state will be serialized to a byte stream > before it > is written to the session. > If false the state will not be serialized to a byte > stream. > > org.apache.myfaces.SERIALIZE_STATE_IN_SESSION > true > > > Only applicable if state saving method is "server" (= > default) and if > org.apache.myfaces.SERIALIZE_STATE_IN_SESSION is true (= > default) > If true (default) the serialized state will be compressed before > it > is written to the session. If false the state will not be > compressed. > > org.apache.myfaces.COMPRESS_STATE_IN_SESSION > true > > > This parameter tells MyFaces if javascript code should > be allowed in the > rendered HTML output. > If javascript is allowed, command_link anchors will have > javascript code > that submits the corresponding form. > If javascript is not allowed, the state saving info and nested > parameters > will be added as url parameters. > Default: "true" > org.apache.myfaces.ALLOW_JAVASCRIPT > true > > > org.apache.myfaces.DETECT_JAVASCRIPT > false > > > If true, rendered HTML code will be formatted, so that > it is "human readable". > i.e. additional line separators and whitespace will be written, > that do not > influence the HTML code. > Default: "true" > org.apache.myfaces.PRETTY_HTML > true > > > If true, a javascript function will be rendered that is > able to restore the > former vertical scroll on every request. Convenient feature if > you have pages > with long lists and you do not want the browser page to always > jump to the top > if you trigger a link or button action that stays on the same > page. > Default: "false" > org.apache.myfaces.AUTO_SCROLL > true > > > > Used for encrypting view state. Only relevant for > client side > state saving. See MyFaces wiki/web site documentation for > instructions > on how to configure an application for diffenent encryption > strengths. > > org.apache.myfaces.SECRET > NzY1NDMyMTA= > > > > > Validate managed beans, navigation rules and ensure that forms > are not nested. > > org.apache.myfaces.VALIDATE > true > > > > > Treat readonly same as if disabled attribute was set for select > elements. > > > org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS > true > > > > > Use the defined class as the class which will be called when a > resource is added to the > ExtensionFilter handling. Using StreamingAddResource here helps > with performance. If you want to add > custom components and want to use the ExtensionFilter, you need > to provide your custom implementation here. > > org.apache.myfaces.ADD_RESOURCE_CLASS > > org.apache.myfaces.renderkit.html.util.DefaultAddResource > > > > > Virtual path in the URL which triggers loading of resources for > the MyFaces extended components > in the ExtensionFilter. > > org.apache.myfaces.RESOURCE_VIRTUAL_PATH > /faces/myFacesExtensionResource > > > > > Check if the extensions-filter has been properly configured. > > org.apache.myfaces.CHECK_EXTENSIONS_FILTER > true > > > > > Define partial state saving as true/false. > > javax.faces.PARTIAL_STATE_SAVING_METHOD > false > > > > > extensionsFilter > > org.apache.myfaces.webapp.filter.ExtensionsFilter > > Set the size limit for uploaded files. > Format: 10 - 10 bytes > 10k - 10 KB > 10m - 10 MB > 1g - 1 GB > uploadMaxFileSize > 100m > > > Set the threshold size - files > below this limit are stored in memory, files above > this limit are stored on disk. > > Format: 10 - 10 bytes > 10k - 10 KB > 10m - 10 MB > 1g - 1 GB > uploadThresholdSize > 100k > > > > > extensionsFilter > *.jsf > > > extensionsFilter > /faces/* > > > > > > org.apache.myfaces.webapp.StartupServletContextListener > > > > > > > > Faces Servlet > javax.faces.webapp.FacesServlet > 1 > > > > > > > tiles > org.apache.tiles.servlet.TilesServlet > > > org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG > /WEB-INF/tiles-def.xml > > 2 > > > > > Faces Servlet > *.jsf > > > > > > > > index.jsp > index.html > > > > > > Here is the faces-config > > > > > org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl > > > > > helloWorldBacking > > org.apache.myfaces.blank.HelloWorldBacking > request > > > > > /helloWorld.jsp > > success > /page2.jsp > > > > > > /page2.jsp > > back > /helloWorld.jsp > > > > > Here is the tiles-def > > "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" > "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"> > template="/pages/template.jsp"> > > > > > > > > > > > > > >