Perl-ORBit client just hangs when accessing an object from a Java server



Hello, 

I cannot find any input on this matter with help of google, so know I
turn to you all.

I have one of these "one-out-of-four" Corba problems:

CORBA::ORBit 0.4.3 Perl-server & CORBA::ORBit 0.4.3 Perl-client  works
CORBA::ORBit 0.4.3 Perl-server & Java j2sdk1.3-client            works
Java j2sdk1.3-server           & Java j2sdk1.3-client            works

Java j2sdk1.3-server           & CORBA::ORBit 0.4.3 Perl-client  does not


The pattern is always the same, the client just hangs when accessing
the object from the Java-server (in the example below, after outputting
"Debug"). However, if one uses a NameService-object, the NS-object works, 
it is only the application object that freezes the client.

CORBA::ORBit has Sreeji's "Passing of Object type to Naming Service"-
patch applied.

The Java-orb is Sun's that ships with j2sdk1.3.

Regards /Selander, out of ideas

The smallest test-case (no NameService for instance):

MyObject.idl:
-------------

module my_module {

        interface MyObject {

                string name();
        };
};


client.pl:
----------

#!/usr/bin/perl -w

use strict;

use CORBA::ORBit;

my ($orb, $object, $ior); 

$orb = CORBA::ORB_init("orbit-local-orb");
$orb->load_idl_file("MyObject.idl");

open IOR, "ns.ref" or die "open failed: $!";
$ior = <IOR>;
close IOR;

chomp $ior;

$object = $orb->string_to_object($ior);

print "Debug\n";

print "Name is ", $object->name, ".\n";


Server3.java:
-------------

import my_module.*;
import org.omg.CORBA.*;
import java.io.*;

public class Server3
{
  public static void main(String args[])
  {
    try{

      ORB orb = ORB.init(args, null);

      MyObject myRef = new MyObject();
      orb.connect(myRef);

      String ior = orb.object_to_string(myRef);

      try {
          FileOutputStream fos = new FileOutputStream("ns.ref");
          PrintStream ps = new PrintStream (fos);
          ps.print (ior);
          ps.close ();
      } catch (Exception ex) {
          ex.printStackTrace();
          System.exit(0);
      }

      java.lang.Object sync = new java.lang.Object();
      synchronized(sync){
        sync.wait();
      }

    } catch(Exception e) {
        System.err.println("ERROR: " + e);
        e.printStackTrace(System.out);
      }
  }
}



class MyObject extends _MyObjectImplBase
{
  public String name()
  {
    return "\nHello world!! (Edited Fri Mar 22 13:56:09 CET 2002)\n";
  }
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]