<html>
    <head>
      <base href="http://www.jacorb.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Serialization in NamingContextImpl causes ClassCastException"
   href="http://www.jacorb.org/bugzilla/show_bug.cgi?id=981">981</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Serialization in NamingContextImpl causes ClassCastException
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>JacORB
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>AIX
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ORB
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>jacorb-bugs@lists.spline.inf.fu-berlin.de
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tomasz.patola@capgemini.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Following was found in logs, after restarting ORB:

terminating process  38469806 
2014-04-15 13:00:46.841 INFO shutdownHook invoked
2014-04-15 13:00:46.842 INFO prepare ORB for shutdown...
2014-04-15 13:00:46.842 INFO ORB going down...

2014-04-15 13:01:34.887 INFO 
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    JacORB V 3.2, www.jacorb.org
    (C) The JacORB project 07-Dec-2012 (Build December 7 2012 13:31:5)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2014-04-15 13:01:34.910 INFO InterceptorManager started with 0 Server
Interceptors, 0 Client Interceptors and 1 IOR Interceptors
2014-04-15 13:01:35.030 INFO NS up
2014-04-15 13:01:35.031 INFO ORB run
2014-04-15 13:01:37.005 INFO Opened new server-side TCP/IP transport0
2014-04-15 13:01:37.023 INFO oid: 5F 72 6F 6F 74                               
              _rootincarnate
2014-04-15 13:01:37.531 INFO oid: 5F 72 6F 6F 74                               
              _rootobject is activated
2014-04-15 13:01:37.638 SEVERE rid: 3714 opname: resolve invocation: throwable
was thrown.
    org.jacorb.naming.NamingContextImpl.resolve(NamingContextImpl.java:582)
    org.omg.CosNaming.NamingContextExtPOA._invoke(NamingContextExtPOA.java:325)
    org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:348)
    org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:670)
    org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:820)

The exception occurs the until the system is restarted (that is not only
jacorb, also the clients), causing in effect, that no corba communication takes
place.
The exception is thrown in following code:
NamingContextImpl.java:582
                result = (org.omg.CORBA.Object)names.get(n);


NamingContextImpl recreates in init() method the org.omg.CORBA.Object objects
in Hashtable names. Here, seemingly, there were still unserialized artefacts
generated with the writeObject(java.io.ObjectOutputStream out) method. 

It is unclear to me, why the init() method didn't recreate the CORBA objects in
Hashtable names in time; it might be a racing condition.

It is an isolated incident, that occured in production system. 

This mechanism (exchanging objects in not typized hashtable)is implemented in
all jacorb versions I've checked (2.2 onwards).
Would it be a good idea, to just disable serialization, i.e in the
NameServantActivatorImpl.incarnate( byte[] oid, POA adapter ) 
omit the line 148, where teh serialized state is read from file, and always
start with uninitialized NaminContextImpl. Are there any other consequences
besides performance?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>