5 Replies Latest reply on Mar 16, 2007 4:15 AM by Jonas Erma

    s:fileUpload throws MissingResourceException

    Jonas Erma Newbie

      Hi all!

      I'm trying to use s:fileUpload in my application. I have a form with an upload field. When I click on submit, I'm getting the following exception:

      23:18:49,773 ERROR [ExceptionFilter] uncaught exception
      javax.servlet.ServletException: Servlet execution threw an exception
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:275)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseX
      MLFilter.java:75)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.
      java:213)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
      ctionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      23:18:49,943 ERROR [ExceptionFilter] exception root cause
       java.lang.ExceptionInInitializerError
       at com.sun.el.parser.AstValue.getTarget(Unknown Source)
       at com.sun.el.parser.AstValue.getType(Unknown Source)
       at com.sun.el.ValueExpressionImpl.getType(Unknown Source)
       at com.sun.facelets.el.TagValueExpression.getType(TagValueExpression.jav
      a:60)
       at javax.faces.component.ValueBindingValueExpressionAdapter.getType(Valu
      eBindingValueExpressionAdapter.java:83)
       at org.jboss.seam.ui.UIFileUpload.decode(UIFileUpload.java:78)
       at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.
      java:1013)
       at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.
      java:1008)
       at javax.faces.component.UIForm.processDecodes(UIForm.java:203)
       at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.
      java:1008)
       at org.ajax4jsf.framework.ajax.AjaxViewRoot.processDecodes(AjaxViewRoot.
      java:353)
       at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestV
      aluesPhase.java:101)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
      
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at net.benim.core.util.UTF8Filter.doFilter(UTF8Filter.java:40)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:74)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.jav
      a:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseX
      MLFilter.java:75)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.
      java:213)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConne
      ctionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.util.MissingResourceException: Can't find bundle for base name c
       om.sun.el.Messages, locale de_CH
       at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle
      .java:836)
       at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
       at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
       at com.sun.el.util.MessageFactory.<clinit>(Unknown Source)
       ... 51 more
      


      My operating system's default locale is de_CH but I have this in my faces-config.xml that works for me:

      <locale-config>
       <default-locale>en</default-locale>
       <supported-locale>en</supported-locale>
       <supported-locale>en_US</supported-locale>
      </locale-config>
      


      I just copied my messages.properties to a new file: messages_ch_DE.properties but I'm still getting the same exception.


      I'm using JSF-RI 1.2 with Facelets and Seam 1.2 on top of JBoss 4.0.5

      tazman