That worked great - Thank you! You need to commons fileupload to your classpath. On Tue, Apr 7, 2009 at 9:44 AM, Eisenträger, Tobias <[email protected]> wrote: Hello everyone,
I have a working configuration with Trinidad+Facelets with the JSF 1.2 versions. Now I would like to add some Tomahawk components to that but when I add the ExtensionsFilter to the web.xml I get the following error: Error 500: Filter [MyFacesExtensionsFilter]: filter is unavailable. Does anyone have a clue why it might not work? It looks like the fileUpload Component cant be loaded from the resource bundle. Is there anything else I need to configure? Thank you. Console log: [07.04.09 10:35:30:640 CEST] 0000001f ServletWrappe I SRVE0242I: [WDMS_InDocFlow_EAR_NewWeb] [/WDMS_InDocFlow_NewWeb] [faces]: Initialisierung erfolgreich. [07.04.09 10:35:30:718 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_0.txt für das Ereignis geöffnet. [07.04.09 10:35:30:734 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_0.txt für das Ereignis geschlossen. [07.04.09 10:35:30:734 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_1.txt für das Ereignis geöffnet. [07.04.09 10:35:30:874 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_1.txt für das Ereignis geschlossen. [07.04.09 10:35:30:874 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_2.txt für das Ereignis geöffnet. [07.04.09 10:35:30:874 CEST] 0000001f ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC hat die Datenstromdatei C:\Programme\ibm\SDP70\runtimes\base_v61\profiles\Icefaces\logs\ffdc\server1_0000001f_09.04.07_10.35.30_2.txt für das Ereignis geschlossen. [07.04.09 10:35:30:874 CEST] 0000001f WebApp E [Servlet Error]-[faces]: java.lang.NoClassDefFoundError: org.apache.commons.fileupload.FileUpload at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:282) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:832) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:679) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:565) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUpload at java.net.URLClassLoader.findClass(URLClassLoader.java:496) at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:132) at java.lang.ClassLoader.loadClass(ClassLoader.java:631) at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:87) at java.lang.ClassLoader.loadClass(ClassLoader.java:597) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58) at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:54) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:394) at java.lang.ClassLoader.loadClass(ClassLoader.java:597) ... 26 more Web.xml: <?xml version = '1.0' encoding = 'ISO-8859-1'?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <filter> <filter-name>MyFacesExtensionsFilter</filter-name> <filter-class> org.apache.myfaces.webapp.filter.ExtensionsFilter </filter-class> <init-param> <param-name>maxFileSize</param-name> <param-value>20m</param-value> </init-param> </filter> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>*.arag</url-pattern> </filter-mapping> <filter-mapping> <filter-name>MyFacesExtensionsFilter</filter-name> <url-pattern>/faces/*</url-pattern> </filter-mapping> <!-- Use client-side state saving. In Trinidad, it is an optimized, token-based mechanism that is almost always a better choice than the standard JSF server-side state saving. --> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> <!--param-value>server</param-value--> </context-param> <!-- Trinidad by default uses an optimized client-side state saving mechanism. To disable that, uncomment the following --> <!--context-param> <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name> <param-value>all</param-value> </context-param--> <!-- Trinidad also supports an optimized strategy for caching some view state at an application level, which significantly improves scalability. However, it makes it harder to develop (updates to pages will not be noticed until the server is restarted), and in some rare cases cannot be used for some pages (see Trinidad documentation for more information) --> <context-param> <param-name> org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE </param-name> <param-value>false</param-value> </context-param> <!-- Apache Trinidad by default obfuscates the Javascript it delivers to the client, as well as stripping comments and whitespace. This dramatically reduces the size of our Javascript download, but also makes it tricky to debug the Javascript. This flag can be set to true to turn off the obfuscation. --> <context-param> <param-name> org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT </param-name> <param-value>true</param-value> </context-param> <!-- If this parameter is enabled, Trinidad will automatically check the modification date of your JSPs, and discard saved state when they change; this makes development easier, but adds overhead that should be avoided when your application is deployed --> <context-param> <param-name> org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION </param-name> <param-value>true</param-value> </context-param> <!-- Enables Change Persistence at a session scope. By default, Change Persistence is entirely disabled. The ChangeManager is an API, which can persist component modifications (like, is a showDetail or tree expanded or collapsed). For providing a custom Change Persistence implementation inherit from the Trinidad API's ChangeManager class. As the value you have to use the fullqualified class name. --> <context-param> <param-name> org.apache.myfaces.trinidad.CHANGE_PERSISTENCE </param-name> <param-value>session</param-value> </context-param> <!-- Trinidad has its own ViewHandler, which is a "decorating" view handler - for example, it needs to wrap methods like renderView() to perform some extra pre- and post-handling. Facelets, on the other hand, is more of a true ViewHandler - it actually implements renderView() (yeah, it decorates too, but forget about that for a second). As a result, the world is a better place if the Trinidad ViewHandler runs around the Facelets ViewHandler. But since Facelets is registered in WEB-INF/faces-config.xml, and Trinidad's is registered from META-INF/faces-config.xml in its JAR, exactly the opposite happens as per the JSF spec. Hence, the following config parameter, which Trinidad exposes to allow pushing a ViewHandler inside of ours. FWIW, you retain the entire delegation stack - just flipped around a bit - so that Facelets still decorates the standard ViewHandler, and therefore you've still got JSP support. --> <context-param> <param-name> org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER </param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <!-- Once you are using Facelets you are perhaps interested in putting some comments to your XHTML template Not every component likes this, because the comments are interpreted as regular components and not every component likes every other component to be its child --> <context-param> <param-name>facelets.SKIP_COMMENTS</param-name> <param-value>true</param-value> </context-param> <filter> <filter-name>trinidad</filter-name> <filter-class> org.apache.myfaces.trinidad.webapp.TrinidadFilter </filter-class> </filter> <filter-mapping> <filter-name>trinidad</filter-name> <servlet-name>faces</servlet-name> </filter-mapping> <!-- Faces Servlet --> <servlet> <servlet-name>faces</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <!-- resource loader servlet --> <servlet> <servlet-name>resources</servlet-name> <servlet-class> org.apache.myfaces.trinidad.webapp.ResourceServlet </servlet-class> </servlet> <!-- Faces Servlet Mappings --> <servlet-mapping> <servlet-name>faces</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>faces</servlet-name> <url-pattern>*.arag</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>resources</servlet-name> <url-pattern>/adf/*</url-pattern> </servlet-mapping> <!-- Use documents saved as *.xhtml for Facelets --> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.jspx</param-value> </context-param> <!-- Welcome Files --> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app> Tobias Eisenträger

