Announcement Announcement Module
No announcement yet.
RemoteLookupFailureException strange, please look Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • RemoteLookupFailureException strange, please look

    hy all ,
    First of all I am trying to get this work for few days, but no luck. .
    I am using jboss+spring, but I don't have experience with those.
    I have an ear with one ejb and one war which uses the ejb.

    I have in ejb-jar archive, one stateless ejb. From war (build with spring), I am trying to use the ejb method.

    I put in my application spring context:
    <bean id="myComponent" class="org.springframework.ejb.access.SimpleRemote StatelessSessionProxyFactoryBean">
    <property name="jndiName"
    value="/brainstorm/BookTestBean/remote" />
    <property name="businessInterface"
    value="de.laliluna.library.BookTestBeanInterface" />
    <bean name="/pages/"
    <property name="bookTestBean" ref="myComponent" />

    My Controller:
    public class HelloController extends AbstractController {

    BookTestBeanInterface bookTestBean;

    public void setBookTestBean(BookTestBeanInterface bookTestBean) {
    this.bookTestBean = bookTestBean;

    protected ModelAndView handleRequestInternal(HttpServletRequest arg0,
    HttpServletResponse arg1) throws Exception {

    But no luck , It throws :org.springframework.remoting.RemoteLookupFailureE xception: EJB instance [[email protected]] is not a Remote Stateless Session Bean

    . I also tried same with local interface.

    The weird fact for me is that is that I if I use the InitialContext in controller I !can! call the ejb method:

    context = new javax.naming.InitialContext();

    BookTestBeanInterface beanRemote = (BookTestBeanInterface) context .lookup("/brainstorm/BookTestBean/remote");


    BookTestBeanRemote and BookTestBeanLocal is extended from BookTestBeanInterface .

    The jboss jndi looks like:
    Global JNDI Namespace
    +- brainstorm (class: org.jnp.interfaces.NamingContext)
    | +- BookTestBean (class: org.jnp.interfaces.NamingContext)
    | | +- local (proxy: $Proxy74 implements interface de.laliluna.library.BookTestBeanLocal,interface org.jboss.ejb3.JBossProxy)
    | | +- remote (proxy: $Proxy72 implements interface de.laliluna.library.BookTestBeanRemote,interface org.jboss.ejb3.JBossProxy)

    Thank you in advance.
    Last edited by remus; Apr 22nd, 2008, 03:33 AM.

  • #2
    Same with Glassfish V2

    Also refers to:

    That post said EJB3 only supported as of 2.5.1, but I'm using 2.5.4.

    Same problem with Glassfish v2 ur1:
    org.springframework.remoting.RemoteLookupFailureEx ception: EJB instance [[email protected]] is not a Remote Stateless Session Bean

    tried local but "is not a local SLSB", either.

    What _does_work:
    * InitialContext().lookup("...")
    * EJB3 DI on the same class
    * JndiObjectFactoryBean

    remus - have you tried that? You're using >=2.5.1, right? Here's the config snip which worked for me.

    <bean id="" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="/brainstorm/BookTestBean/remote" />

    Others - will there be a performance impact for using a stateless sb like so (perhaps extra jndi lookups)? Moreover, what do you gain by using the SimpleRemoteStatelessSessionProxyFactoryBean over the JndiObjectFactoryBean?


    • #3
      I'm using Spring 2.5.3 and I have the exact same problem when using Spring and EJB3 on JBoss 4.2.2.
      When I do a lookup using :
      <jee:remote-slsb id="RemoteWiringExampleFacadeEJB" jndi-name="EAR-BUSINESSLAYER/WiringExampleFacade/remote" business-interface="" resource-ref="true">
      I get this error :

      org.springframework.remoting.RemoteLookupFailureEx ception: EJB instance [jboss.j2ee:ear=EAR-BUSINESSLAYER.ear,jar=EJB-BUSINESSLAYER.jar,name=WiringExampleFacade,service =EJB3] is not a Remote Stateless Session Bean
      Last edited by sonicfab; May 9th, 2008, 10:24 AM.