<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>313</bug_id>
          
          <creation_ts>2003-01-15 17:25:27 +0000</creation_ts>
          <short_desc>Same POA name on 2 different jvms on same machine - NullPointerException</short_desc>
          <delta_ts>2003-12-01 11:58:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>1.4.1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>AIX</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>john.seltzer</reporter>
          <assigned_to name="Nick Cross">rnc</assigned_to>
          <cc>alex_ranous</cc>
    
    <cc>dnedde</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>561</commentid>
    <comment_count>0</comment_count>
    <who name="">john.seltzer</who>
    <bug_when>2003-01-15 17:25:27 +0000</bug_when>
    <thetext>Case 1:
jvm 1 instantiates interface &quot;Test1&quot; on OAPort N and in Persistent Poa 
named &quot;MyPoa&quot;
It is a server process.

jvm 2 instantiates interface &quot;Test2&quot; on OAPort N+1 and in Persistent Poa 
named &quot;MyPoa&quot;.  Poa in jvm 2 has the SAME name as the Poa in jvm 1.
It is a server process, but it also is a client to interface &quot;Test1&quot; in jvm 1.

When I call non_existent, I get a NullPointerException:
java.lang.NullPointerException
01/14 18:53:58:ERR:[Conn_FileReadService]:java.lang.NullPointerException
java.lang.NullPointerException
	at org.jacorb.orb.Delegate.non_existent(Delegate.java:1304)
	at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:57)
Because reference &quot;so&quot; in Delegate.java is null.

This is all because the orb is wrongly assuming that is_really_local is true.  
I think it implies that it thinks that the implemention could be running in the 
same VM.  And further tests described later imply this also.
With jacorb.verbosity=2, I see this before the NullPointerException:
############################ StackTrace ############################
org.omg.PortableServer.POAPackage.ObjectNotActive: 
IDL:omg.org/PortableServer/POA/ObjectNotActive:1.0
	at org.jacorb.poa.POA.reference_to_servant(POA.java:1380)
	at org.jacorb.orb.Delegate.servant_preinvoke(Delegate.java:1473)
	at org.jacorb.orb.Delegate.non_existent(Delegate.java:1300)
	at org.omg.CORBA.portable.ObjectImpl._non_existent(ObjectImpl.java:57)

So, it should recover from this and just return true for_non_existent
-------------------------------------------------------------------------
Next case, 

Case 2:
jvm 1 instantiates interface &quot;Test1&quot; on OAPort N and in Persistent Poa 
named &quot;MyPoa&quot;
It is a server process.

jvm 2 instantiates interface &quot;Test1&quot; on OAPort N+1 and in Persistent Poa 
named &quot;MyPoa&quot;.  Poa in jvm 2 has the SAME name as the Poa in jvm 1.
The difference from Case1 is that both jvms are invoking the SAME interface
It is a server process, but it also is a client to interface &quot;Test1&quot; in jvm 1.  

When I invoke _non_existent here, it returns false, and I am able to invoke a 
method on interface 1.  I think that jvm2 is actually invoking the method on 
it&apos;s OWN implementation in it&apos;s OWN jvm.  I think this because there is no line 
that says:
[ ConnectionManager: created new conn to target xx.xx.xx.xx:portN+1].

Is it assuming that I want to talk to this interface in the same JVM?
This is really a test to prove a point.  It&apos;s not as important as Case 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>595</commentid>
    <comment_count>1</comment_count>
    <who name="Gerard Burnside">gerard.burnside</who>
    <bug_when>2003-03-21 10:31:25 +0000</bug_when>
    <thetext>I experienced a similar problem; the work-around was to use different names for 
the two POAs.

G.Burnside - Alcatel</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>596</commentid>
    <comment_count>2</comment_count>
    <who name="Simon McQueen">sm</who>
    <bug_when>2003-03-21 10:59:51 +0000</bug_when>
    <thetext>... or alternately if you wished to keep the same POA names you could set
different jacorb.implname property values for each server.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>656</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Cross">rnc</who>
    <bug_when>2003-06-09 16:11:48 +0000</bug_when>
    <thetext>*** Bug 291 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690</commentid>
    <comment_count>4</comment_count>
    <who name="Nick Cross">rnc</who>
    <bug_when>2003-08-11 16:06:05 +0000</bug_when>
    <thetext>Solutions suggested. Error handling improved, see bug 313</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>691</commentid>
    <comment_count>5</comment_count>
    <who name="Nick Cross">rnc</who>
    <bug_when>2003-08-11 16:06:53 +0000</bug_when>
    <thetext>Correction - Error handling improved, see bug 208</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>885</commentid>
    <comment_count>6</comment_count>
    <who name="Simon McQueen">sm</who>
    <bug_when>2003-12-01 11:58:38 +0000</bug_when>
    <thetext>*** Bug 418 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>