2 Replies Latest reply on Sep 17, 2009 12:10 PM by xiang

    Seam mail and "Resource doesn't exist

    irace

      Hi guys,


      I tried to use the Seam mail capabilities, following doc and examples I could find, but I have a strange error I don't really understand. As I'm using an exploded war deployment, I may have misunderstood some things on the location of the files, or the adequate configuration of the repository.



      In my backing bean, I have this :


      @In (create=true)
      private Renderer renderer;
      
      public Renderer getRenderer()
      {
          return renderer;
      }
      
      
      public void myBackingMethod()
      {
          ...
          getRenderer().render("/emails/registration_confirmation.xhml");
          ...
      }
      
      



      The emails directory is located under ROOT/ROOT.war directory of the JBoss web deployer
      The email file is rather plain and simple, I tried to follow the Seam doc and examples


      Still, I have this error :


      java.lang.IllegalArgumentException: resource doesn't exist: /emails/registration_confirmation.xhml
           at org.jboss.seam.ui.facelet.RendererRequest.faceletForViewId(RendererRequest.java:90)
           at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:73)
           at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
               ...
      



      I tried to locate the emails directory and content under the WEB-INF/classes directory, but to no avail.


      My question is : does the error really come from an unexisting / not found resource ? In this case, where should be located the emails directory in my kind of deployment.
      Else, could this come from another error during email rendering ?


      Thanks in advance


      Thom'

        • 1. Re: Seam mail and "Resource doesn't exist
          irace

          Ok, forget it. It works as expected. My mistake on the file name...


          Thom'

          • 2. Re: Seam mail and "Resource doesn't exist
            xiang

            Hey everyone, i meet the same error but i am unable to solve it. I have check that my file is name correctly and it still give me the resource does not exist error. Please advice. Below is my code for the rendered


            public void send() {
                    try {
                       renderer.render(/test.xhtml);
                       System.out.println(Email sent successfully);
                   }
            ..........


            Thank You