8 Replies Latest reply on Feb 4, 2004 5:16 AM by jagm88

    problem create local EJB

    jagm88 Newbie

      Hello, I´m trying create a local EJB from a client. Before, I create and deploy a session stateless local EJB with one local method hello() which return "Hello". In my client I get the local Home interface, and create the local session ejb, obtains an exception.I don´t know why...

      client:

      HomelessLocalHome homeless_local_home;
      HomelessLocal homeless_local;

      Object homeless_ref = initial.lookup("HomelessLocal");
      homeless_local_home = (HomelessLocalHome)homeless_ref;

      homeless_local = homeless_local_home.create();

      String as = homeless_local.hola();

      exception:

      Getting Initial Context

      java.lang.NullPointerException
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy0.create(Unknown Source)
      at home.pruebaHome.(pruebaHome.java:35)
      at home.pruebaHome.main(pruebaHome.java:98)
      Exception at create home interfaces java.lang.NullPointerException

      ejb-jar

      <ejb-jar>
      <enterprise-beans>

      <display-name>Homeless</display-name>
      <ejb-name>Homeless</ejb-name>
      <local-home>home.HomelessLocalHome</local-home>
      home.HomelessLocal
      <ejb-class>home.HomelessBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      </enterprise-beans>
      <assembly-descriptor>
      <container-transaction>

      <ejb-name>Homeless</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>
      </ejb-jar>

      jboss.xml


      <enterprise-beans>

      <ejb-name>Homeless</ejb-name>
      <local-jndi-name>HomelessLocal</local-jndi-name>

      </enterprise-beans>