6 Replies Latest reply on Sep 19, 2006 11:15 AM by ren1218

    javax.naming.NameNotFoundException: ws1 not bound

    micho

      Hello

      I hava a stateful sessionbean

      @Stateful
      @Remote
      public class SessionTestBean implements Session


      calling the bean form the client brings
      javax.naming.NameNotFoundException: ws1 not bound

      the clientcode is
      public class client
      {
      public static void main(String[] args) {
      Session ses =null;
      try {
       InitialContext ctx = new InitialContext();
       ses = (Session) ctx.lookup(
       "ws1/SessionTestBean/remote");
       } catch (Exception e) { e.printStackTrace (); System.exit(-1); }
      
      System.out.println("ses erster Zähler: "+ses.getZaehler());
      System.out.println("ses zweiter Zähler: "+ses.getZaehler());
      
      }}
      


      the application.xml is


      <?xml version="1.0" encoding="UTF-8"?>
      <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
       <display-name>ws1</display-name>
       <description>ws1</description>
      
       <module>
       <ejb>beans.jar</ejb>
       </module>
      </application>