| Summary: | Serialization in NamingContextImpl causes ClassCastException | ||
|---|---|---|---|
| Product: | JacORB | Reporter: | tomasz.patola |
| Component: | ORB | Assignee: | Mailinglist to track bugs <jacorb-bugs> |
| Status: | RESOLVED INVALID | ||
| Severity: | minor | CC: | jacorb |
| Priority: | P5 | ||
| Version: | 3.2 | ||
| Hardware: | Other | ||
| OS: | AIX | ||
Thanks for the report. Unfortunately your report is not showing what problem occured in the incarnate method. It might be possible to use byteman (www.jboss.org/byteman) to assist in debugging/simulating/etc this issue. Can you please reproduce this with 3.5 (and reopen the ticket). Debug logs and a test case would be very helpful |
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?