3 Replies Latest reply on Nov 29, 2012 6:40 AM by Nicklas Karlsson

    There are some error message when access a EJB

    Xin Zhang Novice

      Hi all


      There are some error message when I access the ejb by client. the following is the message :


      Exception in thread "main" javax.naming.NameNotFoundException: JBAS011855: Name 'bv' not found in context ''

                at org.jboss.as.naming.util.NamingUtils.nameNotFoundException(NamingUtils.java:111)

                at org.jboss.as.naming.InMemoryNamingStore$NodeTraversingVisitor.visit(InMemoryNamingStore.java:376)

                at org.jboss.as.naming.InMemoryNamingStore$ContextNode.accept(InMemoryNamingStore.java:315)



      and here are my code:

                public static void main(String[] args) throws Exception {
                          Context context = null;
                          try {
                                    // Set up the context for the JNDI lookup
                                    final Properties env = new Properties();
                                    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.as.naming.InitialContextFactory");
                                    context = new InitialContext(env);
                                    // Perform the JNDI lookups
                                    Object o = context.lookup(DEFAULT_DESTINATION);
                          } catch (Exception e) {
                                    throw e;
                          } finally {


      I have no idea for this, Is there someone met the same question?