[jacorb-developer] FYI - ORB classloader change in Java 7u55, Java 8u5 - Suggestions needed
Hugo Roenick
hroenick at gmail.com
Tue Jun 10 16:18:30 CEST 2014
Hi Tim.
I did see that when investigating this problem (and indeed is a little funny).
It may solve the problem when initialising the orb, but that's not the only place where "ORB.init()" (no-args init) is used. The IDL compilation generate Helper classes that use this no-args init, for instance the "type()" method. So you I believe must have certain that you're not using this method anywhere eles in your program (directly or indirectly).
In our case we do use *Helper.type(), so it's not a solution for us.
Regards,
-- Hugo
On Jun 10, 2014, at 10:39 AM, Timothy Astle <timothy.astle at caris.com> wrote:
> I found out our problem. I'm not sure if this will help anyone else out or not.
>
> This is how we're initializing the ORB:
>
> /props.setProperty("org.omg.CORBA.ORBClass","org.jacorb.orb.ORB");
> props.setProperty("org.omg.CORBA.ORBSingletonClass","org.jacorb.orb.ORBSingleton");
> orb = (org.jacorb.orb.ORB)org.omg.CORBA.ORB.init(args, props);/
>
>
> Below is a snip of the initialization stack traceusing JacORB 3.4:
>
> /Daemon Thread [localhost-startStop-1] (Suspended (breakpoint at line 303 in org.omg.CORBA.ORB))
> owns: java.lang.Class<T> (org.omg.CORBA.ORB) (id=89)
> owns: java.util.concurrent.ConcurrentHashMap<K,V> (id=77)
> owns: java.util.concurrent.ConcurrentHashMap<K,V> (id=78)
> owns: java.lang.Object (id=79)
> owns: org.apache.catalina.core.StandardContext (id=40)
> org.omg.CORBA.ORB.create_impl_with_systemclassloader(java.lang.String) line: 303
> * org.omg.CORBA.ORB.init() line: 294 *
> org.jacorb.orb.ORB(org.jacorb.orb.ORBSingleton).configure(org.jacorb.config.Configuration) line: 149
> org.jacorb.orb.ORB.configure(org.jacorb.config.Configuration) line: 274
> org.jacorb.orb.ORB.set_parameters(java.lang.String[], java.util.Properties) line: 1820
> * org.omg.CORBA.ORB.init(java.lang.String[], java.util.Properties) line: 369 *
> com.caris.fusion.core.JDMC_ConnectionContainer.initORB(java.lang.String[], java.util.Properties) line: 69
> com.caris.piranha.dataaccess.fusion.core.PiranhaFusionImpl.initORB(java.util.Properties) line: 208
> com.caris.piranha.dataaccess.fusion.core.PiranhaFusionImpl.initializeFusion() line: 191
> com.caris.piranha.dataaccess.fusion.core.PiranhaFusionImpl.<init>(com.caris.config.ConfigService) line: 133
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(java.lang.reflect.Constructor, java.lang.Object[]) line: not available [native method]
> sun.reflect.NativeConstructorAccessorImpl.newInstance(java.lang.Object[]) line: 57
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(java.lang.Object[]) line: 45
> java.lang.reflect.Constructor<T>.newInstance(java.lang.Object...) line: 526
> org.springframework.beans.BeanUtils.instantiateClass(java.lang.reflect.Constructor<T>, java.lang.Object...) line: 126 /
>
> I bolded the two lines of interest. They are the ORB.init() calls.
>
> You're going to laugh, but the problem was that ourlog4j.properties did not have an entry for org.jacorb.orb (or org.jacorb) so it fell into the following code. I bolded the interesting part again.
>
> org.jacorb.orb.ORBSingleton
>
> /protected void configure(Configuration config) throws ConfigurationException
> {
> ...
> //
> // if (logger.isDebugEnabled())//
> // {//
> //logger.debug("BufferManagerFactory: " + bufferManagerFactory);//
> //logger.debug("BufferManager: " + bufferManager);//
> //logger.debug("jacorb.interop.strict_check_on_tc_creation set to " + doStrictCheckOnTypecodeCreation);//
> //
> // // This could lead to dual Singleton initialisation so only do it as part of debug. A singleton//
> // // will be initialised in org.omg.CORBA.ORBSingleton [a JacORB class] and in org.omg.CORBA.ORB//
> // // as well.//
> // if ( ! ( *org.omg.CORBA.ORB.init() *instanceof ORBSingleton))//
> // {//
> // logger.debug ("Default Singleton ORB is not a JacORB singleton. This is not recommended as it *could* lead to classpath/classloader/stub conflicts.");//
> // }//
> // }//
> //}/
>
> By simply adding the following entry to your log4j.properties file
>
> /log4j.logger.org.jacorb=ERROR, //YOUR//_APPENDER_HERE/
>
> the problem goes awayif you're using JacORB 3.4. The problem still exists for prior versions.
>
> I had first thought that the problem went away using JacORB 3.4 alone. Before Java 7 update 55 was released, I had asked a developer to add our missing logging configuration in our nextmajor release branch. This was also the branch where we had updated to JacORB 3.4. This is why the problem was not surfacing on that branch of the product.
>
> Nick, what do you think about that no-args init() call? It seems a bit dangerous because if people don't set up their logger correctly, theycould be hosed and not know why.
>
>
> Tim
>
>
>
>
> On 26/05/2014 4:31 AM, Nick Cross wrote:
>>
>> Hi Ravindra,
>>
>> Given various people have differing usage scenarios it would be useful if people could upload samples showing any issues to the http://www.jacorb.org/bugzilla/show_bug.cgi?id=984 ticket. Would you be able to upload such a test case?
>>
>> Regards
>>
>> Nick
>>
>>
>> On 26/05/14 04:41, Ravindra Kumar wrote:
>>> Hi,
>>>
>>> Did you test without the singleton class, what was the outcome, it is
>>> pretty much interesting to have some analysis.
>>>
>>> thanks
>>> ravindra
>>>
>>>
>>> On Thu, May 22, 2014 at 9:13 PM, Hugo Roenick <hroenick at gmail.com> wrote:
>>>
>>>>
>>>> On May 21, 2014, at 9:49 AM, Hugo Roenick <hroenick at gmail.com> wrote:
>>>>
>>>>> Our undestanding about this notes is that now we are forced to use the
>>>> JRE ORB as the singleton one, and can use any other ORB by using the
>>>> ORB.init(args, props). We are about to test if not setting the
>>>> "org.omg.CORBA.ORBSingletonClass" property and setting the
>>>> org.omg.CORBA.ORBClass property works.
>>>>
>>>> Just to let you all know that ours tests worked with jacorb 3.3, 3.4 and
>>>> 3.5-snapshot. We just need to stop setting the OBRSingletonClass property
>>>> (for now on the ORBSingleton must be from JRE) and keep keep setting the
>>>> ORBClass property to JacORB.
>>>>
>>>> Regards,
>>>>
>>>> -- Hugo
>>>>
>>>> _______________________________________________
>>>> jacorb-developer maillist -
>>>> jacorb-developer at lists.spline.inf.fu-berlin.de
>>>> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>>>>
>>> _______________________________________________
>>> jacorb-developer maillist - jacorb-developer at lists.spline.inf.fu-berlin.de
>>> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>>>
>>
>> _______________________________________________
>> jacorb-developer maillist - jacorb-developer at lists.spline.inf.fu-berlin.de
>> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>>
>>
>
> --
> Tim Astle
> Development Manager
> Web Technologies
>
> *CARIS* <http://www.caris.com>
> 115 Waggoners Lane
> Fredericton, New Brunswick
> Canada E3B 2L4
> Tel: +1.506.458.8533 Fax: +1.506.459.3849
> www.caris.com
>
> *CARIS 2014*
> June 2-5, 2014 | Brest, France | 2-5 juin, 2014
> Join us in France at CARIS 2014 as we focus on Developing the Blue Economy. www.caris.com/caris2014/
> Venez nous rejoindre en France pour CARIS 2014 et appuyons ensemble l'Économie Bleue. www.caris.com/caris2014-fr/
>
> Download your free copy of CARIS Easy View today!
> www.caris.com/easyview
>
> _________________________________________________________________________
> This email and any files transmitted with it are confidential and intended only for the addressee(s). If you are not the intended recipient(s) please notify us by email reply. You should not use, disclose, distribute or copy this communication if received in error.
>
> Any views or opinions expressed in this email are solely those of the author and do not necessarily represent those of the company. No binding contract will result from this email until such time as a written document is signed on behalf of the company.
>
> _______________________________________________
> jacorb-developer maillist - jacorb-developer at lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
More information about the jacorb-developer
mailing list