我必须从我的Java应用程序连接到系统的服务器。然而,它失败了,我不明白为什么,因为我已完成配置,我通过IP连接到服务器。错误是:
run:
août 27, 2013 4:13:48 PM com.lhs.ccb.func.corba.CORBAAdapter <init>
INFO: Reading orb.properties...
août 27, 2013 4:13:49 PM com.lhs.ccb.func.corba.CORBAAdapter$OrbThread run
INFO: Before ORB.run
août 27, 2013 4:13:49 PM com.lhs.ccb.func.corba.CORBAAdapter newInitialNamingContext
INFO: Bootstrap initial naming context using "resolve_initial_references("NameService")"
août 27, 2013 4:13:50 PM com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 41.229.0.149; port: 2010"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2200)
at com.sun.corba.se.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2221)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:223)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:236)
at com.sun.corba.se.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:119)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:185)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:136)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:229)
at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:130)
at org.omg.CosNaming.NamingContextExtHelper.narrow(NamingContextExtHelper.java:73)
at com.lhs.ccb.func.corba.CORBAAdapter.newInitialNamingContext(Unknown Source)
at com.lhs.ccb.func.corba.CORBAAdapter.getInitialNamingContext(Unknown Source)
at com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source)
at com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.getNewRootAccessor(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.createContainerFactory(Unknown Source)
at com.lhs.ccb.cfw.cda.session.ServerGateway.connect(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.createConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnectionFromPool(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.ott.cms.client.CallCommand.main(CallCommand.java:28)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
at java.net.Socket.connect(Socket.java:579)
at com.lhs.ccb.func.corba.CORBASocketFactory.createSocket(Unknown Source)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.<init> (SocketOrChannelConnectionImpl.java:206)
... 20 more
août 27, 2013 4:13:50 PM com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway createContainerFactory
SEVERE: Error getting RootAccessor
Error code: FUNC_UTIL.id100
ClassName: com.lhs.ccb.func.ect.SystemException
Error arguments:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
Stack trace:
[com.lhs.ccb.func.corba.CORBAAdapter.newInitialNamingContext(Unknown Source), com.lhs.ccb.func.corba.CORBAAdapter.getInitialNamingContext(Unknown Source), com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source), com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.getNewRootAccessor(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.createContainerFactory(Unknown Source), com.lhs.ccb.cfw.cda.session.ServerGateway.connect(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.createConnection(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnectionFromPool(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnection(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source), com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source), com.ott.cms.client.CallCommand.main(CallCommand.java:28)]
at com.lhs.ccb.func.corba.CORBAAdapter.newInitialNamingContext(Unknown Source)
at com.lhs.ccb.func.corba.CORBAAdapter.getInitialNamingContext(Unknown Source)
at com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source)
at com.lhs.ccb.common.soiimpl.ServiceRootLocatorNamingService.lookupServiceRoot(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.getNewRootAccessor(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.createContainerFactory(Unknown Source)
at com.lhs.ccb.cfw.cda.session.ServerGateway.connect(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.createConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnectionFromPool(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.ott.cms.client.CallCommand.main(CallCommand.java:28)
août 27, 2013 4:13:53 PM com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl getConnectionFromPool
SEVERE: Connection createion failed for poolTRAIN
com.lhs.ccb.cfw.cda.session.ConnectionFailedException: Service currently not available. Cannot connect to server.
at com.lhs.ccb.cfw.cda.servicelayer.SoiServerGateway.createContainerFactory(Unknown Source)
at com.lhs.ccb.cfw.cda.session.ServerGateway.connect(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.createConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnectionFromPool(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.ott.cms.client.CallCommand.main(CallCommand.java:28)
Exception in thread "main" com.lhs.ccb.cfw.cda.servicelayer.ServiceRuntimeException: Tried to open a server connection for reading data.
But the server did not respond. Maybe it is down.
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnectionFromPool(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolImpl.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.lhs.ccb.cfw.cda.servicelayer.connectionpool.ConnectionPoolManager.getConnection(Unknown Source)
at com.ott.cms.client.CallCommand.main(CallCommand.java:28)
这是我在Java中的配置文件:
org.omg.CORBA.ORBInitRef=NameService=corbaloc:iiop:41.229.0.149:2010/NameService
系统中的这个文件:
# LISTENER.ORA Network Configuration File: C:\Orant\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 41.229.0.149)(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = demodb)
(ORACLE_HOME = C:\Orant)
(GLOBAL_DBNAME = demodb)
)
)
答案 0 :(得分:0)
你的主机对我来说似乎已经死了。我无法达到它。在调整代码之前,尝试弄清楚那里出了什么问题。