Hi
I have a problem using Seam 1.2.0 Patch 1 and <s:fileUpload component.
When I upload a file using this component: (fileName is a String property of an object)
| <h:form id="frmMain" enctype="multipart/form-data">
| <s:validateAll>
| <s:decorate>
| <s:fileUpload id="file" data="#{fileData}"
fileName="#{publication.sourceUrl}" />
| </s:decorate>
| </s:validateAll>
| <h:commandLink class="button" id="uploadFile"
value="Submit" action="#{uploadAction.uploadP}"/>
| </h:form>
|
uploadAction:
| @Scope(EVENT)
| @LoggedIn
| @Name("uploadAction")
| public class UploadAction {
|
| @In(required=false)
| private byte[] fileData;
|
| @In(value="publication")
| private Publication uploadP;
|
web.xml:
<filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
I get this error:
org.jboss.seam.ui.UIFileUpload.decode(UIFileUpload.java:79)
| javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:606)
| javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
| javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:602)
| javax.faces.component.UIForm.processDecodes(UIForm.java:53)
| org.ajax4jsf.framework.ajax.AjaxViewRoot.processDecodes(AjaxViewRoot.java:353)
| org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues(LifecycleImpl.java:219)
| org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:71)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
| org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
|
org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
| org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
|
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
|
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
|
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
|
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
|
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
|
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| java.lang.Thread.run(Thread.java:619)
Regards
Dimi
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024574#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...