9 Replies Latest reply on Mar 26, 2004 1:28 PM by rakesh

    Nothing bound in the Corba naming service

    Stefan Logofatu Newbie

      I tried to call a bean from a RMI-IIOP client using:

      I managed to create the context with these properties (so the name service was reached).
      When I tried to lookup for my ejb in this context, I got javax.naming.NameNotFoundException (actually org.omg.CosNaming.NamingContextPackage.NotFound).

      After this, I've done a small CORBA client that connects to the Corba Naming service and lists all bindings.
      Surprise: Nothing was bound in the naming service.

      Has anybody any idea about this ?

        • 1. Re: Nothing bound in the Corba naming service
          heesch Newbie

          You have to deploy your EJB for using IIOP. When I tried that for JBoss 3.2.1, I found the correct settings in the examples. Try something like that for your EJB's jboss.xml:


          <configuration-name>Standard Stateless SessionBean</configuration-name>




          Regards from Mannheim, Germany
          Stefan Heesch

          • 2. Re: Nothing bound in the Corba naming service
            jcolejarg Newbie

            We're having a similar problem in reverse. We have an external service which has been successfully running using rmi-iiop. It registers itself using:

            MyService myserver = new MyService();
            Context initContext = new InitialContext();
            initContext.rebind (conf.getProperty("myServiceName"), myserver);

            We run tnameserv, and a remote client is able to access it using:
            Context initContext = new InitialContext();
            _myServer = (MyServerInterface)PortableRemoteObject.narrow(

            But when I try to use similar code from inside an EJB running in JBoss, I get a "myServiceNameNotBoundException". I wrote a name-space dumper, and it, like the earlier questioner, reported that java:JBossCorbaNaming"no names bound". We were running it under an ancient version of Weblogic.

            So does anyone know how to register an external service with JBoss' own name-service?

            Thanks for any help!

            - Julian Cole

            • 3. Re: Nothing bound in the Corba naming service
              flitzie Newbie

              I had similar problems when I
              used '<invoker-proxy-binding-name>iiop</invoker-proxy-binding-name>'
              and InitialContext (JNDI). Thats why I use the internal ORB to contact the INS.

              • 4. Re: Nothing bound in the Corba naming service
                jcolejarg Newbie

                Thanks for your response. Did you manage to get your app. running? We're not quite clear what you meant by "using the internal ORB to contact the INS" (does INS mean the iiop-naming-service?).

                We've tried going through a JNDI-context, or directly through a corba-context, and we get the same results: an apparently valid NamingContext, but no names in it.

                - Julian

                • 5. Re: Nothing bound in the Corba naming service
                  flitzie Newbie

                  INS = Interoperable Naming Service = CORBA Naming Service

                  If you deploy an EJB JBoss registers the name in the JNDI you have specified in the jboss.xml by using <jndi-name>. If you use '<invoker-proxy-binding-name>iiop<...>' the jndi-name will be also registerd in the INS of JBoss.

                  I wrote a JSP to inspect the INS and to get the IORs. So I don't know if you can use bind or rebind. But I used OpenORB's IR which registers itself in JBoss INS. So I guess it works.

                  Extract of JSP
                  String [] args = {"-ORBInitRef", "NameService=corbaloc:iiop:1.2@localhost:3528/JBoss/Naming/root"};

                  // create and initialize the ORB
                  ORB orb = ORB.init( args, null );

                  // get the root naming context
                  org.omg.CORBA.Object objRef = orb.resolve_initial_references( "NameService" );
                  NamingContext ncRef = NamingContextHelper.narrow( objRef );

                  • 6. Re: Nothing bound in the Corba naming service
                    jcolejarg Newbie

                    Thanks once again!

                    I'm having difficulty navigating the fact that we're trying to get a JBoss-EJB to access our service (which runs outside of JBoss), and, if I've understood it right, this thread has always talked about exposing a JBoss service to an external VM.

                    I suppose the JBoss name-service is indeed a service which JBoss could expose to remote clients, and we should, for name-registration purposes, think of our service as a client of the (JBoss-) name-service, right?

                    We note that in some places port 1099 is used, but your code uses 3528. Is this merely a configuration difference, or are these ports used in different ways?

                    Another thing that we keep thinking about: is the JCA - should we think of our service as a resource to be referenced by our EJB through the Connection Architecture?

                    Once again, thanks for your help!

                    - Julian

                    • 7. Re: Nothing bound in the Corba naming service
                      flitzie Newbie

                      Why do you want to register your external service (I guess it is a Java-server) in the JNDI of the JBoss-server, if your EJB deployed on JBoss shall connect to the external server?

                      In your EJB code you have to set the properties of your external JNDI daemon (tnameserv).

                      I am not very familiar with JNDI, but I guess you can only register objects which runs on the same server as the JNDI daemon. So if you register your object of your external Server into JBoss's JNDI the JBoss-EJB tries to connect to an object on JBoss which doesn't exists.
                      Please correct me if I am wrong.

                      With INS you can store an objectreference (IOR) which points to another server. So clients will be forwarded to the other server automatically, because in this IOR are server adress, port and naming context stored.

                      JBoss runs 2 naming services JNDI and INS.
                      JNDI is listening on port 1099 and INS, IR and all the other corba stuff on 3528.
                      Using InitialContext your rmi-iiop java client first inspect the JNDI via JRMP and then after the object has been found it uses IIOP to access the remote object.

                      So long


                      • 8. Re: Nothing bound in the Corba naming service
                        jcolejarg Newbie

                        Once again, thanks for your thoughts on this. We are no longer trying to register our service with JBoss' own naming-service - not with the JNDI, nor with the INS inside JBoss. We know that our external service does successfully register itself with an instance of tnameserv (the jre-program which works as a registry for rmi-iiop services) listening on port 10000, and our command-line standalone client can access it fine by name using jndi, after setting
                        so clearly, tnameserv has the name and can deliver our interface. We're also able to see (through stack-traces in both our server adn in our JBoss client-EJB) that JNDI does indeed act as an umbrella, integrating various kinds of name-services and when we ask it for an iiop://xxxxx:1234 name, it makes requests of org.omg.CORBA-related classes.

                        Therefore, we're trying now to see how to persuade JBoss to contact our tnameserv. We're trying a combination of:
                        - various names to give to the lookup
                        - various values of the property "ORBInitRef.NameService"
                        in the file jboss/server/all/conf/jacorb.properties.
                        The latter was something I learned from by reading a download from jacorb.org and looking at comments in their file jacorb.properties.template.

                        No succes yet, but we think this path may lead us soemwhere - if it does, we'll let you know!

                        Thanks again for your thoughts!

                        - Julian

                        • 9. Re: Nothing bound in the Corba naming service
                          rakesh Newbie

                          I am facing similar problems. Were you able to find a solution? If so please write the solution you adopted. Thanks.