> I conclude that the call to 'nameservice->resolve(..)' really return the instance of nameservice, not the instance of my component.

 

Resume + Some more tests...

 

 

- If I call nameService->resolve, I've got the name service instance returned

- Well if I try to ping my component directly (no name service calls: I've do a 'string_to_object') : It work !

- If I call 'string_to_object' for the nameService then for the component, only the first one return the good instance. The second call return the instance of the first one !!! (It does the same thing if I invert the 2 calls)

 

So, my questions:

- Why JavaIDL NameService (orbd) do resolve my component path, but the return failed ?

- Where can I have some logs or exception report of MICO.. ?  (I've got no other error at all than in my client program)

 

 

 

Thanks a lot

Bruno

 

 

----- Original Message -----
From: Fred Down
Sent: Sunday, November 27, 2005 8:18 PM
Subject: RE: [Bulk] Re: [Bulk] [mico-devel] MICO 2.3.11 and Solaris9/JavaIDL component

Solaris is very good about compatibility. There ARE problems with gcc 3.95.3 and multi-threading, these are compiler problems so there is no real work around except not to use multi-threading or set your threads to 1.

 

I build normally with gcc 3.3.3

 

 


From: Bruno Le Fellic [mailto:[EMAIL PROTECTED]
Sent: Friday, November 25, 2005 5:37 AM
To: Fred Down
Subject: [Bulk] Re: [Bulk] [mico-devel] MICO 2.3.11 and Solaris9/JavaIDL component

 

On solaris8 machine, Forte Developer 7 C 5.4 2002/03/09 is installed.

On solaris9 machine, SUNWspro (Sun C 5.5 2003/03/12) is installed.

Gcc (version 2.95.3) is installed on the two machines.

When i compile, gcc is the first one in the PATH variable. So I suppose Gcc is used (...?).

 

I've tried to compile MICO on solaris8, then have copied the build result on solaris9, then have made a 'make install'.

I've got the same error.

 

During compilation, I've noticed a difference on the 2 machines: the solaris8 one is in "sun-solaris-int" and the solaris9 one is in "sun-solaris-64int". I don't know what is the difference but I suppose it's about integer variable size, no ?

 

Anyway. MICO binaries are running on my solaris9 machine. But do you think they can "malfunction" or something like that ? Although I've no error message when I run ird...

 

----- Original Message -----

From: Fred Down

Sent: Thursday, November 24, 2005 5:31 PM

Subject: RE: [Bulk] [mico-devel] MICO 2.3.11 and Solaris9/JavaIDL component

 

What compiler are you using? Gcc or Sun’s one.

Have you tried using you Solaris 8 built Mico on your Solaris 9 machine?

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bruno Le Fellic
Sent: Thursday, November 24, 2005 5:45 AM
To: [email protected]
Subject: [Bulk] [mico-devel] MICO 2.3.11 and Solaris9/JavaIDL component

 

Hello,

 

I use MICO+CORBA::MICO to call (in perl of course) some corba object implemented in java (JavaIDL ORB) under sun solaris 8. So I only use the Interface Repository of MICO to connect to JavaIDL Nameservice.

 

It was working very well ! But now i have to change to solaris 9.

 

First I got problems to install MICO on solaris9 doing compilation with standard options. Finally I compiled MICO with this options :

 

./configure --prefix=/opt/mico --enable-intf-repo --enable-minimum-corba

 

Next I start JavaIDL nameservice and MICO interface repository.. It run. cool !

 

Now i'm trying to call one a ping() method i implemented on a component named 'MY/COMP/NAME'. Here is my client program :

 

 

#!/bin/perl

 

use strict;
use warnings;
use Data::Dumper;
use Error qw(:try);
use CORBA::MICO;

 

my $ior;
my $ns_ior = "/tmp/nameservice.ior";
my $comp = "MY/COMP/NAME";

 

print "open $ns_ior\n";
if ( open( IOR_FILE, "<$ns_ior" ) ) {
    print "read $ns_ior\n";
    $ior = <IOR_FILE>;
    close( IOR_FILE );
    chomp($ior);

 

    unshift @ARGV, qw(-ORBInitRef NameService=file:///tmp/nameservice.ior);
    unshift @ARGV, qw(-ORBIfaceRepoIOR file:///tmp/ifacerepo.ior);

 

    print "ORB init\n";
    my $orb = CORBA::ORB_init( 'mico-local-orb' );
    $orb->preload("IDL:omg.org/CosNaming/NamingContext:1.0");
    $orb->preload("IDL:toto/tata/titi/MyProcessing:1.0");

 

    print "get name service\n";
    my $nameService = $orb->string_to_object( $ior );
    my $obj = $orb->string_to_object( $ior );
    print Dumper($nameService);

 

    print "get ORB object $comp\n";
    my @pathName    = split( '/', $comp );
    my @name        = ();
    for ( my $i=0; $i<scalar @pathName; $i++ ) {
         my $nameComponent = {
             id   => $pathName[$i],
             kind => ''
         };
         push @name, $nameComponent;
    }
    my $obj = $nameService->resolve( [EMAIL PROTECTED] );
    print Dumper($obj);

 

    print "ping component\n";
    my $ret = $obj->ping();
    print "return: $ret\n";

 

    print "ok\n";
} else {
   print "erreur\n";
}
print "end\n";

 

 

Here is the correct output on solaris 8 :

 

bash# perl client.pl

open /tmp/nameservice.ior
read /tmp/ifacerepo.ior
ORB init
get name service
$VAR1 = bless( do{\(my $o = 2243968)}, '::CosNaming::NamingContext' );
get ORB object MY/COMP/NAME
$VAR1 = bless( do{\(my $o = 2244288)}, '
::toto/tata/titi/MyProcessing' );
ping component

return: 1

ok

end

bash#

 

 

Here is the output of the client program on the solaris 9:

 

bash# perl client.pl

open /tmp/nameservice.ior
read /tmp/ifacerepo.ior
ORB init
get name service
$VAR1 = bless( do{\(my $o = 1684024)}, '::CosNaming::NamingContext' );
get ORB object MY/COMP/NAME
$VAR1 = bless( do{\(my $o = 1684024)}, '::CosNaming::NamingContext' );
ping component

Can't locate object method "ping" via package "CosNaming::NamingContext" at client_mico_4_javaidl.pl line 72
bash#

 

Then I tried to bless the return object to 'toto/tata/titi/MyProcessing' :

 

$obj = bless( $obj, 'toto::tata::titi::myProcessing');

I doesn't work...:

 

...

$VAR1 = bless( do{\(my $o = 1678048)}, '::CosNaming::NamingContext' );
get ORB object MY/COMP/NAME
$VAR1 = bless( do{\(my $o = 1678048)}, '::toto::tata::titi::myProcessing' );
ping component
uncaught MICO exception: IDL:omg.org/CORBA/BAD_OPERATION:1.0 (0, maybe-completed)
fin anormale (core dumped)
bash#

 

 

I conclude that the call to 'nameservice->resolve(..)' really return the instance of nameservice, not the instance of my component.

 

Are compilation options ok for what i want to do ? Have someone any other idea ??

 

 

Thanks for your help

Bruno

 

 

_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel

Reply via email to