2 Replies Latest reply on Apr 8, 2013 5:03 AM by Sinan Doğan

    Seam 2.3 Resource Bundle

    Sinan Doğan Newbie

      Hi. I migrated to seam 2.3 from seam 2.2. Now I can not access to properties files from beans. My properties files are in project/src folder. It was working before but now not. I have tried all of below. How can I fix this?

       

       

       public String getValueFromProperties(String VariableName){
       ResourceBundle Properties = SeamResourceBundle.getBundle("messages",FacesContext.getCurrentInstance().getViewRoot().getLocale());
       return Properties.getString( VariableName);
        }
      
       public String getValueFromProperties(String VariableName){
       ResourceBundle Properties = ResourceBundle.getBundle("messages",FacesContext.getCurrentInstance().getViewRoot().getLocale());
       return Properties.getString(VariableName);
        }
      
       public String getValueFromProperties(String VariableName){
       return "#{msg." + VariableName + "}";
        }
      
      

       

       

       

      Exception during request processing:
      Caused by java.io.FileNotFoundException with message: ""
      
      org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:369)
      com.sun.faces.facelets.impl.DefaultFaceletCache._getLastModified(DefaultFaceletCache.java:172)
      com.sun.faces.facelets.impl.DefaultFaceletCache.access$000(DefaultFaceletCache.java:62)
      com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:82)
      com.sun.faces.facelets.impl.DefaultFaceletCache$1.newInstance(DefaultFaceletCache.java:78)
      com.sun.faces.util.ExpiringConcurrentCache$1.call(ExpiringConcurrentCache.java:99)
      java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      java.util.concurrent.FutureTask.run(Unknown Source)
      com.sun.faces.util.ExpiringConcurrentCache.get(ExpiringConcurrentCache.java:114)
      com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:121)
      com.sun.faces.facelets.impl.DefaultFaceletCache.getFacelet(DefaultFaceletCache.java:62)
      com.sun.faces.facelets.impl.DefaultFaceletFactory.getFacelet(DefaultFaceletFactory.java:256)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:366)
      com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
      com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
      com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:155)
      com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
      com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:86)
      com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:774)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:100)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
      org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
      org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
      org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
      org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
      org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
      java.lang.Thread.run(Unknown Source)