[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openorb-users
Subject:    Re: Re: [openorb-users] Beginners problem with OpenORB
From:       Viorel Radu <rviorelro () yahoo ! com>
Date:       2004-04-14 14:59:30
Message-ID: 20040414145930.27409.qmail () web12825 ! mail ! yahoo ! com
[Download RAW message or body]

Hi,

Thanks, I figured it out. I understand it now... but
have another question - of course ;)

How can I access the name service ? I'm starting the
OpenORB name service like it said in the manual:

%JAVA_HOME%\bin\java -classpath %CLASSPATH%
org.openorb.util.MapNamingContext -default
-print</code>

The printed message is : 

Transient naming service activated.
Corbaloc Reference:
corbaloc:iiop:1.2@192.168.100.98:683/NameService

Now I'm running this piece of code:


import org.omg.CORBA.*;

public class CorbaTest {

    private org.omg.CORBA.ORB                      
objOrb;


    /**
     * Generic Constructor for the test driver.
     */
    protected CorbaTest(String[] args)
    {
      // Initialize the ORB.
      objOrb = org.omg.CORBA.ORB.init(args,null);
try
{
	System.out.println("Locate NameService in system.");
        org.omg.CORBA.Object initial_context_obj = 
           
objOrb.resolve_initial_references("corbaloc:iiop:1.2@192.168.100.67:683/NameService");
         
org.omg.CosNaming.NamingContextExtHelper.narrow(initial_context_obj);
        System.out.println("NameService found in
inital context.");

}
catch ( Exception ex)
{
ex.printStackTrace();
}

    }


    /**
     * This is the main method for the application.
     */
    public static void main(String[] args)
    {

      CorbaTest me = new CorbaTest(args);
    }

} 

And the output is:

Locate NameService in system.
org.omg.CORBA.ORBPackage.InvalidName: Object not found
: corbaloc:iiop:1.2@192.1
68.100.98:683/NameService
        at
org.openorb.CORBA.ORB.resolve_initial_references(Unknown
Source)
        at CorbaTest.<init>(CorbaTest.java:18)
        at CorbaTest.main(CorbaTest.java:38)

So it seems that either the NameService is  not
running, or I don't connect to the right ORB...

Can someone help me ?

Thanks,

   Viorel


	
		
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
openorb-users mailing list
openorb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openorb-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic