1 2 3 Previous Next 33 Replies Latest reply on Dec 13, 2006 10:36 AM by mvinayam Go to original post
      • 15. Re: Fileupload

        Ok, I DID NOT upgrade the myfaces libraries to the 1.1.2 versions. Only the tomahawk one (can't remember exactly why, though...).

        It is possible that you have too many different jars floating around.

        This is what I have in my Tomcat jsf-libs:

        total 1.2M
        -rw-r--r-- 1 endo users 116K 2006-03-31 23:15 commons-beanutils.jar
        -rw-r--r-- 1 endo users 29K 2006-03-31 23:15 commons-codec-1.2.jar
        -rw-r--r-- 1 endo users 162K 2006-03-31 23:15 commons-collections.jar
        -rw-r--r-- 1 endo users 165K 2006-03-31 23:15 commons-digester-1.6.jar
        -rw-r--r-- 1 endo users 17K 2006-03-31 23:15 jstl.jar
        -rw-r--r-- 1 endo users 0 2006-04-27 11:31 listing.txt
        -rw-r--r-- 1 endo users 232K 2005-10-25 18:55 myfaces-api.jar
        -rw-r--r-- 1 endo users 458K 2005-10-25 18:56 myfaces-impl.jar
        


        This is what my .ear looks like

        total 2.1M
        drwxr-xr-x 2 endo users 176 2006-04-27 11:35 META-INF/
        -rw-r--r-- 1 endo users 334K 2006-04-27 11:35 web.war
        -rw-r--r-- 1 endo users 32K 2006-04-12 17:34 commons-fileupload-1.1.jar
        -rw-r--r-- 1 endo users 65K 2006-04-12 17:34 commons-io-1.2.jar
        -rw-r--r-- 1 endo users 295K 2006-04-26 08:29 jboss-seam.jar
        -rw-r--r-- 1 endo users 0 2006-04-27 11:38 listing.txt
        -rw-r--r-- 1 endo users 544 2006-04-12 17:43 login-service.xml
        -rw-r--r-- 1 endo users 173K 2006-04-27 11:35 ejb.jar
        -rw-r--r-- 1 endo users 1.2M 2006-04-19 20:44 tomahawk-1.1.2-SNAPSHOT.jar
        


        And inside the ejb.jar (where i pack my EJB's) the META-INF/MANIFEST.MF looks like this:

        Manifest-Version: 1.0
        Ant-Version: Apache Ant 1.6.5
        Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)
        Class-Path: jboss-seam.jar commons-fileupload-1.1.jar commons-io-1.2.jar tomahawk-1.1.2-SNAPSHOT.jar
        


        And this is working with JBoss-4.0.4.CR2 and JBoss-SEAM-1.0.0.CR2.

        • 16. Re: Fileupload
          elfuhrer

          Marcio, something does not make sense in here. Your jsp will not be able to render the tomahawk tags if the tomahawk.jar is not included in the WEB-INF/lib directory. JSP tags cannot be accessed from the classpath of the EAR.
          I have followed your same EAR structure and the JSP files won't work unless the tomahawak libraries are in the WEB-INF/lib as stated above.

          I had to put the tomahawk library back into the WEB-LIB/lib and I get again the conversion exception again.

          11:55:57,312 ERROR [[/training]] Cannot set value for expression '#{FileUpload.file}' to a new value of type org.apache.myfaces.custom.fileupload.UploadedFileDefaultFileImpl
          javax.faces.el.EvaluationException: Cannot set value for expression '#{FileUpload.file}' to a new value of type org.apache.myfaces.custom.fileupload.UploadedFileDefaultFileImpl
           at org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:304)
           at javax.faces.component.UIInput.updateModel(UIInput.java:226)
           at javax.faces.component.UIInput.processUpdates(UIInput.java:165)
           at javax.faces.component.UIForm.processUpdates(UIForm.java:85)
           at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:428)
           at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:153)
           at org.apache.myfaces.lifecycle.LifecycleImpl.updateModelValues(LifecycleImpl.java:277)
           at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:81)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
           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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
           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.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)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: javax.faces.el.EvaluationException: com.sag.training.FileUploadBean$$EnhancerByCGLIB$$3c703dc9
           at org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:155)
           at org.apache.myfaces.el.ValueBindingImpl.setValue(ValueBindingImpl.java:269)
           ... 33 more
          Caused by: javax.faces.el.EvaluationException: Bean: com.sag.training.FileUploadBean$$EnhancerByCGLIB$$3c703dc9, property: file
           at org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:372)
           at org.apache.myfaces.el.PropertyResolverImpl.setValue(PropertyResolverImpl.java:148)
           ... 34 more
          Caused by: java.lang.IllegalArgumentException: argument type mismatch
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.apache.myfaces.el.PropertyResolverImpl.setProperty(PropertyResolverImpl.java:368)
           ... 35 more
          


          • 17. Re: Fileupload

            I am not sure this is the case, but I am not using JSP. I am using JSF.

            And I forgot to list the contents of my WAR:

            web.war/WEB-INF:

            drwxr-xr-x 3 endo users 160 2006-04-27 11:58 facelets/ <-- ignore this, just for html templates
            -rw-r--r-- 1 endo users 886 2006-04-27 16:58 faces-config.xml
            -rw-r--r-- 1 endo users 336 2006-04-24 14:10 jboss-web.xml
            drwxr-xr-x 2 endo users 144 2006-04-24 11:12 lib/
            -rw-r--r-- 1 endo users 15K 2006-04-11 17:50 tomahawk.taglib.xml
            -rw-r--r-- 1 endo users 5.1K 2006-04-24 14:10 web.xml
            


            web.war/WEB-INF/lib
            total 360K
            -rw-r--r-- 1 endo users 21K 2006-04-12 15:07 el-api.jar
            -rw-r--r-- 1 endo users 96K 2006-04-12 15:07 el-ri.jar
            -rw-r--r-- 1 endo users 239K 2006-04-12 15:07 jsf-facelets.jar
            


            And inside the WAR META-INF I have the same exact same MANIFEST.MF listed for the ejb.jar.

            • 18. Re: Fileupload
              armita

              I am getting null pointer exception from the Extensions filter:

              java.lang.NullPointerException
              20:47:15,235 ERROR [STDERR] at com.tarhyar.file.FileLogicAction.upload(FileLogicAction.java:109)
              20:47:15,235 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              20:47:15,236 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              20:47:15,236 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,236 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,238 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
              20:47:15,238 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:168)
              20:47:15,238 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
              20:47:15,239 ERROR [STDERR] at org.jboss.seam.interceptors.ValidationInterceptor.validateTargetComponent(ValidationInterceptor.java:64)
              20:47:15,240 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor237.invoke(Unknown Source)
              20:47:15,240 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,240 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,241 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,241 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,241 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,241 ERROR [STDERR] at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
              20:47:15,242 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
              20:47:15,243 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,243 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,243 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,243 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,244 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,244 ERROR [STDERR] at org.jboss.seam.interceptors.RollbackInterceptor.rollbackIfNecessary(RollbackInterceptor.java:30)
              20:47:15,244 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor235.invoke(Unknown Source)
              20:47:15,244 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,244 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,244 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,245 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,245 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,245 ERROR [STDERR] at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:33)
              20:47:15,245 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor234.invoke(Unknown Source)
              20:47:15,245 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,246 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,246 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,247 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,247 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,247 ERROR [STDERR] at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
              20:47:15,247 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
              20:47:15,247 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,247 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,248 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,248 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,248 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,248 ERROR [STDERR] at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
              20:47:15,248 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source)
              20:47:15,248 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,248 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,249 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,249 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,249 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,249 ERROR [STDERR] at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)20:47:15,249 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
              20:47:15,249 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,250 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,250 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
              20:47:15,250 ERROR [STDERR] at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
              20:47:15,250 ERROR [STDERR] at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
              20:47:15,252 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
              20:47:15,252 ERROR [STDERR] at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
              20:47:15,252 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor230.invoke(Unknown Source)
              20:47:15,252 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,252 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,252 ERROR [STDERR] at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:120)
              20:47:15,252 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:62)
              20:47:15,253 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,253 ERROR [STDERR] at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
              20:47:15,253 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,253 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              20:47:15,253 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,253 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              20:47:15,254 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,257 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              20:47:15,257 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:196)
              20:47:15,257 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,257 ERROR [STDERR] at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
              20:47:15,257 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,258 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
              20:47:15,258 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,258 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
              20:47:15,258 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,258 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
              20:47:15,258 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,258 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
              20:47:15,258 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
              20:47:15,259 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
              20:47:15,259 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
              20:47:15,259 ERROR [STDERR] at $Proxy124.upload(Unknown Source)
              20:47:15,259 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              20:47:15,259 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              20:47:15,259 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              20:47:15,259 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
              20:47:15,261 ERROR [STDERR] at com.sun.el.parser.AstValue.invoke(AstValue.java:130)
              20:47:15,261 ERROR [STDERR] at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
              20:47:15,261 ERROR [STDERR] at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
              20:47:15,261 ERROR [STDERR] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
              20:47:15,261 ERROR [STDERR] at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
              20:47:15,276 ERROR [STDERR] at javax.faces.component.UICommand.broadcast(UICommand.java:106)
              20:47:15,277 ERROR [STDERR] at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:90)
              20:47:15,277 ERROR [STDERR] at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:164)
              20:47:15,278 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:316)
              20:47:15,279 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
              20:47:15,279 ERROR [STDERR] at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
              20:47:15,279 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              20:47:15,279 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              20:47:15,279 ERROR [STDERR] at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
              20:47:15,280 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              20:47:15,280 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              20:47:15,280 ERROR [STDERR] at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
              20:47:15,280 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              20:47:15,280 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              20:47:15,280 ERROR [STDERR] at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              20:47:15,281 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              20:47:15,281 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              20:47:15,282 ERROR [STDERR] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
              20:47:15,282 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
              20:47:15,282 ERROR [STDERR] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
              20:47:15,282 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              20:47:15,282 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              20:47:15,282 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              20:47:15,282 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              20:47:15,282 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              20:47:15,283 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              20:47:15,286 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              20:47:15,286 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              20:47:15,286 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              20:47:15,286 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
              


              I am uding the tomahawk and myfaes from the version shipped by seam RC1
              my web.xml looks like:
              
               <filter>
               <filter-name>Seam Exception Filter</filter-name>
               <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
               </filter>
              
               <filter>
               <filter-name>Seam Redirect Filter</filter-name>
               <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>
               </filter>
              
               <filter>
               <filter-name>extensionsFilter</filter-name>
               <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
               <init-param>
               <param-name>uploadMaxFileSize</param-name>
               <param-value>100m</param-value>
               </init-param>
               <init-param>
               <param-name>uploadThresholdSize</param-name>
               <param-value>500k</param-value>
               </init-param>
               <init-param>
               <param-name>uploadRepositoryPath</param-name>
               <param-value>/temp</param-value>
               </init-param>
               </filter>
              
               <filter-mapping>
               <filter-name>extensionsFilter</filter-name>
               <url-pattern>*.faces</url-pattern>
               </filter-mapping>
              
               <filter-mapping>
               <filter-name>Seam Exception Filter</filter-name>
               <url-pattern>/*</url-pattern>
               </filter-mapping>
              
               <filter-mapping>
               <filter-name>Seam Redirect Filter</filter-name>
               <url-pattern>*.faces</url-pattern>
               </filter-mapping>
              

              Any Idea?

              • 19. Re: Fileupload

                I have attached an example at the Seam Wiki.

                http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamFileUpload

                • 20. Re: Fileupload
                  muckwarrior

                  Hi guys,

                  I'm having some problems with file upload. I'm not using facelets but I followed the wiki example as closeley as possible and I'm gettting a deployment error.

                  2006-05-19 11:32:01,703 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/gaaresults]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
                  java.lang.NoClassDefFoundError: org/apache/myfaces/custom/fileupload/UploadedFile
                   at java.lang.Class.getDeclaredMethods0(Native Method)
                   at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
                   at java.lang.Class.getDeclaredMethods(Unknown Source)
                   at org.jboss.seam.Component.initMembers(Component.java:275)
                   at org.jboss.seam.Component.<init>(Component.java:181)
                   at org.jboss.seam.Component.<init>(Component.java:147)
                   at org.jboss.seam.Component.<init>(Component.java:142)
                   at org.jboss.seam.Component.<init>(Component.java:137)
                   at org.jboss.seam.init.Initialization.addComponent(Initialization.java:284)
                   at org.jboss.seam.init.Initialization.addComponents(Initialization.java:246)
                   at org.jboss.seam.init.Initialization.init(Initialization.java:108)
                   at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:32)
                   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3692)
                   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4127)
                   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
                   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
                   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.apache.catalina.core.StandardContext.init(StandardContext.java:5031)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
                   at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
                   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
                   at org.jboss.web.WebModule.startModule(WebModule.java:83)
                   at org.jboss.web.WebModule.startService(WebModule.java:61)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
                   at $Proxy0.start(Unknown Source)
                   at org.jboss.system.ServiceController.start(ServiceController.java:417)
                   at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                   at $Proxy30.start(Unknown Source)
                   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:469)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                   at $Proxy31.start(Unknown Source)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
                   at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                   at java.lang.reflect.Method.invoke(Unknown Source)
                   at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
                   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
                   at $Proxy6.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:504)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:218)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:197)
                  


                  I know this is probably a classpath issue, and that it's related to the tomahawk.jar. I've tried putting it in both the ear lib and the WEB-INF lib but to no avail. Can anybody point me in the right direction?

                  • 21. Re: Fileupload
                    pmuir

                    You do need the commons-fileupload and its dependencies (I think I had to add commons-io and commons-lang) jars from apache. It looks like it can't find them - classpath issue or perhaps you don't have them?

                    • 22. Re: Fileupload
                      muckwarrior

                      Hmm, well I had the commons-fileupload alright and I've just added commons-lang but to no avail.

                      The relevant jars in my ear lib are:

                      coomons-fileupload
                      commons-io
                      commons-lang
                      myfaces-api
                      tomahawk

                      Is this all that I need or am I still missing something?

                      • 23. Re: Fileupload
                        pmuir

                        I'm not at my desk at the moment so I'm not sure of the exact files. I remember having issues with packaging the commons stuff in the ear and ended up just putting them in the jsf-libs directory directly.

                        • 24. Re: Fileupload
                          armita

                          I upgraded my tomahawk and myfaces and upload stopped working. It could not pass the uploadedfile to be application and jumping from phase 4 to phase 6 without envoking the application

                          • 25. Re: Fileupload
                            muckwarrior

                             

                            "elfuhrer" wrote:
                            I have followed the same approach and I cannot get it working. There's a conversion error in the file upload. Any hints?


                            I have run into the exact same problem, did you find a solution?

                            • 26. Re: Fileupload
                              bubonic

                              I have the same problem as well, anyone have an idea what it is?

                              • 27. Re: Fileupload
                                muckwarrior

                                Finally got to the bottom of this.

                                The type mismatch error was being caused by having a copy of the tomahawk.jar in the WEB-INF/lib. This can be removed if you're using faceletes and the problem is solved, but what if you don't want to use facelets? I'm facing the prospect of converting my whole project to use facelets just so that I can use Tomahawk file upload.

                                Has anybody managed to implement file upload without using facelets?

                                • 28. Re: Fileupload
                                  gus888

                                  Hi all,

                                  I got the file upload works in Seam without facelets. You may try this.
                                  1) Follow seam wiki fileUpload all steps, except the tomahawk.jar.
                                  2) Put the tomahawk.jar into jboss-4.0.4.GA\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs;
                                  3) Modify the web.xml under jboss-4.0.4.GA\server\default\deploy\jbossweb-tomcat55.sar\conf:

                                  <init-param>
                                   <description>MyFaces tlds</description>
                                   <param-name>tagLibJar0</param-name>
                                   <param-value>jsf-libs/myfaces-impl.jar</param-value>
                                  </init-param>
                                  <!-- I added the tomahawk -->
                                  <init-param>
                                   <description>Tomahawk tlds</description>
                                   <param-name>tagLibJar1</param-name>
                                   <param-value>jsf-libs/tomahawk.jar</param-value>
                                  </init-param>

                                  If you have any question, please let me know. It at least works for me.

                                  • 29. Re: Fileupload

                                    worked for me. But I find it a little weird that I need to use the input stream to grab the actual file. Should have been cool to have just the file object that points to the actual file.