Hi all! I'm having the same problem as described above - using latest seam from cvs, jboss 4.0.4RC1 and facelets, trying to upload a file (an image perticularly). So, I have an entity bean, say a client, with a field of type UploadedFile and the relevant getters and setters:
| ... | @Entity | @Name("client") | @Scope(CONVERSATION) | @Table(name="CLIENTS") | public class Client implements Serializable{ | private UploadedFile uplFile; | ... | public UploadedFile getUplFile() { | return uplFile; | } | public void setUplFile(UploadedFile uplFile) { | this.uplFile = uplFile; | } | } | I declared the extensions filter in the web.xml descriptor: | <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>250k</param-value> | </init-param> | <init-param> | <param-name>uploadThresholdSize</param-name> | <param-value>100k</param-value> | </init-param> | </filter> | | <filter-mapping> | <filter-name>ExtensionsFilter</filter-name> | <servlet-name>Faces Servlet</servlet-name> | </filter-mapping> | | <filter-mapping> | <filter-name>ExtensionsFilter</filter-name> | <url-pattern>/faces/ExtensionResource/*</url-pattern> | </filter-mapping> | Also, I have a stateful session bean with a conversation scope, which injects the aforementioned client entity bean and, after pressing a button on the page, persists it in a database, etc. The problem is, the setter of the UploadedFile is never called and I get a Caused by: java.lang.IllegalArgumentException: argument type mismatch I have put the commons-io-1.2.jar and commons-fileupload-1.1.jar archives in the WEB-INF/lib folder in my war, and also copied the tomahawk.jar in jbossweb-tomcat55.sar\jsf-libs. Could anyone, who managed to upload a file using seam and tomahawk components, please explain in details the steps taken and the nessessary code to do it properly? Thanks in advance for any feedback (this issue gets me quite confused). :( PS: I also noticed that if I dont browse a file and hit the button the setter does get called and the actions are performed as expected, but, of course, then I don't have a file uploaded.. I really don't understand :( View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3937692#3937692 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3937692 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user