Problem:
NoSuchMethodError exception when starting Java application or services
- Product Name: Visibroker
 - Product Version: 6.5 and above
 - Platform/OS version: All
 
When starting a Java application or launching a service (eg. VisiNaming) without using the launcher (eg. nameserv), NoSuchMethodError exception on CORBA classes/methods are thrown. An example of the exception is as follows:
org.omg.CORBA.INITIALIZE: java.lang.NoSuchMethodError: org.omg.PortableServer.POAManager.get_id()Ljava/lang/String; vmcid: 0x0 minor code: 0 completed: No
at com.inprise.vbroker.orb.ORB.cleanup(Unknown Source)
at com.inprise.vbroker.orb.ORB.set_parameters(Unknown Source)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.inprise.vbroker.naming.ExtFactory.main(Unknown Source)
Resolution:
This problem is resolved by including the following property in the startup script
java.endorsed.dirs=$VBROKERDIR/lib/endorsed
where $VBROKERDIR is the installation path for VisiBroker.
The property java.endorsed.dirs is an override mechanism that specifies one or more directories that the Java runtime environment will search for new revisions to endorsed standards.
An endorsed standard is a Java API defined through a standards process other than the Java Community Process (JCP). Because endorsed standards are defined outside the JCP, it is anticipated that such standards may be revised between releases of the Java 2 Platform.
VisiBroker make use of the Endorsed Standards Override Mechanism to provide newer versions of an endorsed standard than those included in the Java 2 Platform as released by Sun Microsystems. The endorsed standards constitute all classes and interfaces that are defined in the packages listed below:
- javax.rmi.CORBA
 - org.omg.CORBA
 - org.omg.CORBA.DynAnyPackage
 - org.omg.CORBA.ORBPackage
 - org.omg.CORBA.portable
 - org.omg.CORBA.TypeCodePackage
 - org.omg.CORBA_2_3
 - org.omg.CORBA_2_3.portable
 - org.omg.CosNaming
 - org.omg.CosNaming.NamingContextExtPackage
 - org.omg.CosNaming.NamingContextPackage
 - org.omg.Dynamic
 - org.omg.DynamicAny
 - org.omg.DynamicAny.DynAnyFactoryPackage
 - org.omg.DynamicAny.DynAnyPackage
 - org.omg.IOP
 - org.omg.IOP.CodecFactoryPackage
 - org.omg.IOP.CodecPackage
 - org.omg.Messaging
 - org.omg.PortableInterceptor
 - org.omg.PortableInterceptor.ORBInitInfoPackage
 - org.omg.PortableServer
 - org.omg.PortableServer.CurrentPackage
 - org.omg.PortableServer.POAManagerPackage
 - org.omg.PortableServer.POAPackage
 - org.omg.PortableServer.portable
 - org.omg.PortableServer.ServantLocatorPackage
 - org.omg.SendingContext
 - org.omg.stub.java.rmi
 - org.w3c.dom
 - org.xml.sax
 - org.xml.sax.ext
 - org.xml.sax.helpers
 
 
 Reference
JDK 1.4.2 Java Endorsed Standards-related APIs & Developer Guides - from Sun Microsystems
#VisiBroker
#Java
#Security