1 Reply Latest reply on Jul 16, 2008 3:59 AM by enikozsido

    Tomahawk FileUpload on JBoss 4.2.1/4.2.2 error

      Hi group,

      I'm running JBoss 4.2.1 (and 4.2.2, too) with shipped JSF-RI 1.2 and I want to use Tomahawk (1.1.6) <t:inputFileUpload>.

      I added tomahawk.jar in /server/all/deploy/jboss-web.deployer/jsf-libs because JBoss throws an error on deployment if it's missing (even if it is in my EAR and WAR).

      In my web.xml, I have

      <filter>
       <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
       <init-param>
       <param-name>uploadMaxFileSize</param-name>
       <param-value>20m</param-value>
       </init-param>
       <init-param>
       <param-name>uploadThresholdSize</param-name>
       <param-value>100k</param-value>
       </init-param>
      </filter>
      <filter-mapping>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
      </filter-mapping>
      <filter-mapping>
       <filter-name>MyFacesExtensionsFilter</filter-name>
       <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
      </filter-mapping>
      


      My .jsp contains

      xmlns:t="http://myfaces.apache.org/tomahawk"
      


      (I use a lot of Tomahawk-Tags and they work with this declaration.)

      and

      <t:inputFileUpload id="..." styleClass="..." title="#{...}" value="#{...}" valueChangeListener="#{...}" binding="#{...}" disabled="#{...}" rendered="#{...}"/>
      



      My backing Bean has getter/setter for org.apache.myfaces.custom.fileupload.UploadedFile (getter returns null).

      The application is deployed as an WAR in an EAR. I have defined a loader-repository:

      <jboss-app>
       <loader-repository>MyApp:loader=MyApp.ear</loader-repository>
      </jboss-app>
      


      but, I tried to run it without this directive, too.

      After deployment and starting my application, the jsp renders a correct file-upload-control, but when I submit, I get the exception:

      javax.faces.el.EvaluationException: javax.el.ELException: java.lang.IllegalArgumentException: argument type mismatch
      


      My backing-bean setter was not called.

      What am I doing wrong? Doesn't Tomahawk work with JSR RI 1.2 on JBoss 4.2.x? Do I have to apply any hacks?