2 Replies Latest reply on Jun 18, 2008 5:55 PM by Vivian Steller

    SFSB with Local and Remote interface

    Krunoslav Samardzic Newbie

      Bit of a problem I am using Seam 2.0.2 SP1, and I have a SFSB with Local and Remote interface:


      @Stateful
      @Name("HQL")
      @Local(HQLPregled.class)
      @Remote(HQLPregledRemote.class)
      public class HQLPregledBean implements HQLPregled,HQLPregledRemote {
      .....



      I get an exception:


           ... 64 more
      Caused by: java.lang.IllegalArgumentException: Could not invoke method by reflection: HQLPregledRemote.getNaredba() on: $Proxy1512
           at org.jboss.seam.util.Reflections.invoke(Reflections.java:31)
      


      The problem is that method getNaredba is called on remote interface instead of local,
      every thing works fine if I remove remote interface.
      Here is part of my
      components.xml :


      <core:init jndi-pattern="kadrovska/#{ejbName}/local" debug="true"/>
      .....
      


      Thanks in advance Kruno.

        • 1. Re: SFSB with Local and Remote interface
          Newbie

          I have the same problem with an EJB3 stateless session bean.  I also checked that the startup jboss log has */local as the JNDI name for this seam component.

          • 2. Re: SFSB with Local and Remote interface
            Vivian Steller Newbie

            I had the same problem with a Stateless Session Bean (using 2.0.2.CR1). But you gave me the right hint: I forgot some @Local annotation for the business interface for the SLSB that was called.


            Strangely, testing this on my local Mac machine (JVM 1.5.013) didn't cause a problem with JBoss 4.2.0. GA. But on the target Linux machine (JVM 1.5.011-b03) it failed with the exactly same exception shown above. However, the target machine uses JBoss 4.2.2.GA. Could cause the problems, too.


            So, remaining two questions/facts arise from that:
            @Local annotations are not inherited right? (one of the supertype interfaces of my SLSB interface has a @Local annotation)
            @Local isn't (at least for linux jvms/jboss as 4.2.2) considered the default for an interface of session bean?


            Any comments appreciated.