1 Reply Latest reply on Jun 25, 2002 5:18 AM by Maarten Roosendaal

    JNDI problem about DataSource (ctx.lookup(jndiName);throws E

    michael.cm Newbie

      i can get ejb ref
      {
      Object ejbHome = ctx.lookup("interest/interest");
      }
      execute success.
      but lookup datasource ,always catch exception
      Test.java
      {
      ...
      System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      System.setProperty("java.naming.factory.url.pkgs", "org.jnp.interfaces");
      System.setProperty("java.naming.provider.url", "localhost");
      InitialContext ctx = new InitialContext();
      Object ejbHome = ctx.lookup("interest/interest");
      Object obj = ctx.lookup("java:/DefaultDS");
      ...
      }

      JBoss3.0/server/default/conf/standardjaws.xml

      java:/DefaultDS
      <type-mapping>Hypersonic SQL</type-mapping>
      ....


      exception message:
      javax.naming.NameNotFoundException: DefaultDS not bound

      thank u for your answer.
      :)