1 Reply Latest reply on Oct 8, 2009 3:05 PM by Dmitry Sachin

    Seam Remoting: not a Function error

    Dmitry Sachin Newbie


      I am trying to test Seam Remoting in Seam 2.1. Basically i followed documentation, but i am getting a xxx is not a Function-error in my browser.

      I found this topic: http://seamframework.org/Community/NotAFunctionErrorInSEAMRemoting
      This is exactly my problem. The interface for my Seam Component doesnt have any methods at all (i checked interface.js?myComponent).


          <servlet-name>Seam Resource Servlet</servlet-name>
          <servlet-name>Seam Resource Servlet</servlet-name>

      Seam Component:

      public class DrawBean implements Draw
          private int value = 50;
          public int getValue()
              return value;
          public void setValue(int value)
              this.value = value;


      public interface Draw
          public int getValue(); 
          public void setValue(int value);
          public void destroy();


      <s:remote include="draw"/>

      I even set:

      Seam.Remoting.resourcePath = "http://localhost:8080/myApp/seam/resource

      (found it in some topic here)

      Anyway i get:

      Seam.Component.getInstance("draw").getValue() is not a Function

      The guy in the topic i found solved it by putting additional libs (jboss-seam-remoting.jar,jsf-facelets.jar) into EAR scope. I am new to Seam/Java, so i just copied the jars to the EarContent folder of my (Eclipse)JBossTools generated project. It didnt help. Any help is really appreciated!

        • 1. Re: Seam Remoting: not a Function error
          Dmitry Sachin Newbie

          The Problem is related to Jboss Tools . While generating a new Seam Project, seam-remoting.jar is put into WebContent/WEB-INF/lib, while it should go into EAR-Libraries to make Remoting work.

          Just add seam-remoting.jar (from seam lib directory) as an external jar (Properties- Java EE Module Dependencies) to the xxx-ear project part. And make sure you check the added jar under Module Dependencies of xxx-ejb und xxx parts. This made Seam Remoting work for me.