jacorba版本3.2,以ssl方式连接 NameService,配置和错误输出再下面
#命名服务配置字符串
NameServiceCfg = NameService=corbaloc:ssliop:[email protected]:59663/NameService
#########################
#                       #
#   SSL Configuration   #
#                       #
########################## Whether SSL security is enabled.
jacorb.security.support_ssl=on#
# The port number used by SSL, will be dynmically assigned
# by default
#
#OASSLPort=4711
# This interceptor must be set if programs need access to
# certificates using the CORBA Security API, SSL works also
# without this interceptor
org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit=org.jacorb.security.ssl.sun_jsse.SecurityServiceInitializer# The qualified classname of the ssl socket factory class
jacorb.ssl.socket_factory=org.jacorb.security.ssl.sun_jsse.SSLSocketFactory# The qualified classname of the ssl server socket factory class
jacorb.ssl.server_socket_factory=org.jacorb.security.ssl.sun_jsse.SSLServerSocketFactory# IIOP/SSL parameters (numbers are hex values, without the leading "0x"):
# NoProtection = 1
# EstablishTrustInClient = 40
# EstablishTrustInTarget = 20
# mutual authentication = 60
# please see the programming guide for more explanation
jacorb.security.ssl.client.supported_options=20
jacorb.security.ssl.client.required_options=20jacorb.security.ssl.server.supported_options=20
jacorb.security.ssl.server.required_options=1
#
# If set, the following two values will be placed in the IOR, if
# "corbaloc:ssliop" ssliop.
#
# If not set, only EstablishTrustInTarget is used for both supported
# and required options. EstablishTrustInClient is not set, and the
# rest of the Association Options aren't currently used anyway.
jacorb.security.ssl.corbaloc_ssliop.supported_options=40
jacorb.security.ssl.corbaloc_ssliop.required_options=20# The name and location of the keystore. This may be absolute or
# relative to the home directory, or a file retrievable through the
# classloader.
#
# NOTE (for Sun JSSE users): The "javax.net.ssl.trustStore[Password]"
# properties don't seem to take effect, so you may want to add trusted
# certificates to "normal" keystores. In this case, please set the
# property "jacorb.security.jsse.trustees_from_ks"is to "on", so trusted
# certificates are taken from the keystore instead of a dedicated
# truststore.
jacorb.security.keystore=../etc/security/certificate/forCorba/service.jks
jacorb.security.keystore_password=changeme
# SSL keystore used:
jacorb.security.keystore_type=JKS2013-04-03 17:01:12,327 ERROR [com.nm.server.nbif.Server] - org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No
org.omg.CORBA.BAD_PARAM:   vmcid: SUN  minor code: 603  completed: No
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(Unknown Source)
at com.sun.corba.se.impl.logging.NamingSystemException.insBadAddress(Unknown Source)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.badAddress(Unknown Source)
at com.sun.corba.se.impl.naming.namingutil.CorbalocURL.<init>(Unknown Source)
at com.sun.corba.se.impl.naming.namingutil.INSURLHandler.parseURL(Unknown Source)
at com.sun.corba.se.impl.resolver.INSURLOperationImpl.operate(Unknown Source)
at com.sun.corba.se.impl.resolver.ORBInitRefResolverImpl.resolve(Unknown Source)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(Unknown Source)
at com.sun.corba.se.impl.resolver.CompositeResolverImpl.resolve(Unknown Source)
at com.sun.corba.se.impl.orb.ORBImpl.resolve_initial_references(Unknown Source)
at com.nm.server.nbif.Server.initRootContext(Server.java:231)
at com.nm.server.nbif.Server.main(Server.java:196)

解决方案 »

  1.   

    相关的初始化的代码:
    props.setProperty("org.omg.CORBA.ORBInitRef", ConfigProperty.nameServiceCfg);
    props.setProperty("org.omg.CORBA.ORBInitRef.NotificationService", ConfigProperty.notificationCfg); orb = ORB.init(args, props); org.omg.CORBA.Object ncObj = orb.resolve_initial_references("NameService");
    rootContext = NamingContextExtHelper.narrow(ncObj);
      

  2.   

    在org.omg.CORBA.Object ncObj = orb.resolve_initial_references("NameService");抛出异常
      

  3.   

     NameService=corbaloc:ssliop:[email protected]:59663/NameService
    这个东西怪怪的,是不是应该是iiop
      

  4.   

    ssliop这个是google上查来的,应该没有问题的