2 Replies Latest reply on Oct 4, 2008 3:54 PM by Pete Muir

    Can't send email using Seam 2.1.0 recent Snapshots

    Dmitry Shultz Newbie

      It fails on creation of MockServletContext when it tries to convert jar:file:/Volumes/Harmony/apps/glassfish/javadb/lib/derby.war!/WEB-INF/web.xml to URI (and I have no clue why..)



      public MockServletContext()
         {
            try
            {
               URL webxml = getClass().getResource("/WEB-INF/web.xml");
               if (webxml != null)
               {
                  webInfRoot = new File(webxml.toURI()).getParentFile();
                  if (webInfRoot != null)
                  {
                     webInfClassesRoot = new File(webInfRoot.getParentFile().getPath() + "/classes");
                     webappRoot = webInfRoot.getParentFile();
                  }
                  // call processing of context parameters
                  processContextParameters(webxml);
               }
            }
            catch (URISyntaxException e)
            {
               throw new IllegalStateException(e);
            }
         }



      Here is the stack trace:



      at org.jboss.seam.util.Reflections.invoke(Reflections.java:36)
             at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:126)
             at org.jboss.seam.Component.callComponentMethod(Component.java:2,146)
             at org.jboss.seam.Component.callCreateMethod(Component.java:2,069)
             at org.jboss.seam.Component.newInstance(Component.java:2,029)
             at org.jboss.seam.Component.getInstance(Component.java:1,923)
             at org.jboss.seam.Component.getInstance(Component.java:1,902)
             at org.jboss.seam.Component.getInstance(Component.java:1,879)
             at org.jboss.seam.Component.getInstance(Component.java:1,874)
             at org.jboss.seam.ui.facelet.MockServletContextManager.instance(MockServletContextManager.java:46)
             at org.jboss.seam.ui.facelet.MockHttpSessionManager.create(MockHttpSessionManager.java:31)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-1)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
             at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:126)
             at org.jboss.seam.Component.callComponentMethod(Component.java:2,146)
             at org.jboss.seam.Component.callCreateMethod(Component.java:2,069)
             at org.jboss.seam.Component.newInstance(Component.java:2,029)
             at org.jboss.seam.Component.getInstance(Component.java:1,923)
             at org.jboss.seam.Component.getInstance(Component.java:1,902)
             at org.jboss.seam.Component.getInstance(Component.java:1,879)
             at org.jboss.seam.Component.getInstance(Component.java:1,874)
             at org.jboss.seam.ui.facelet.MockHttpSessionManager.instance(MockHttpSessionManager.java:46)
             at org.jboss.seam.ui.facelet.RendererRequest.init(RendererRequest.java:42)
             at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:81)
             at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
             at com.harmony.beans.messages.MailFromWeb.send(MailFromWeb.java:65)




      The same code and config worked before well, regression?
      Is there any way to make it work ASAP?