2013-08-27 63 views
0

我必須從我的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

謝謝,但與同一個端口我的朋友有一個積極的結果,我不明白你可以解釋更多請 – user2722374

+1

然後,你可能有一個防火牆問題。詢問你的朋友是否阻止了除特定IP之外的客戶端。 –

相關問題