2012-08-15 150 views
0

當我給我的登錄ID,PWD ...的SQLException:IO異常:網絡適配器無法建立連接

http://localhost:8080/project_name。錯誤是 服務器遇到阻止它完成此請求內部錯誤()。** 我使用jboss4.2.3並請讓我知道問題出在哪裏??**

HTTP狀態500 -


類型異常報告

消息

描述服務器遇到一個內部錯誤(),阻止它履行這一要求。

例外

javax.servlet.ServletException: Servlet.init() for servlet action threw exception 
    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 
... 

根源

java.lang.RuntimeException: org.hibernate.exception.GenericJDBCException: Cannot open connection 
    com.fanniemae.rbc.rollup.ui.RollupActionServlet.init(RollupActionServlet.java:26) 
... 

根源

org.hibernate.exception.GenericJDBCException: Cannot open connection 
    org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) 

根源

org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: The Network Adapter could not establish the connection); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: The Network Adapter could not establish the connection)) 
    org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) 
    org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) 
    org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) 
... 

根源

org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Io exception: The Network Adapter could not establish the connection) 
... 

根源

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection 
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) 
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) 
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) 
    oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387) 
    oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441) 
    oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165) 
    oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) 
    oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) 
    org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:172) 
    org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619) 
    org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264) 
    org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575) 
    org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347) 
    org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330) 
    org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402) 
    org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849) 
    org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) 
    org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) 
    org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) 
    org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) 
    org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139) 
    org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547) 
    org.hibernate.loader.Loader.doQuery(Loader.java:673) 
    org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) 
    org.hibernate.loader.Loader.doList(Loader.java:2220) 
    org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) 
    org.hibernate.loader.Loader.list(Loader.java:2099) 
    org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) 
    org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) 
    org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) 
    org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) 
    org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
    com.fanniemae.rbc.rollup.service.RLSchemeMgmtService.getLoanAttributes(RLSchemeMgmtService.java:82) 
    com.fanniemae.rbc.rollup.ui.UICache.initialize(UICache.java:42) 
    com.fanniemae.rbc.rollup.ui.RollupActionServlet.init(RollupActionServlet.java:22) 
    javax.servlet.GenericServlet.init(GenericServlet.java:212) 
    org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 
    org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
    org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) 
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) 
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) 
    org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) 
    java.lang.Thread.run(Thread.java:595) 
+0

在例外情況,最後的根源通常是告訴你什麼是真正回事。 – 2013-07-07 00:22:19

回答

1

java.sql.SQLException中:IO異常:網絡適配器不能 建立e連接

堆棧跟蹤中的此行看起來像無法連接到數據庫。網址錯誤或服務器未運行。檢查服務器和URL。

+0

網址是正確的服務器啓動並running.i看到的這個網址HTTP歡迎頁面:\\本地主機:8080 \。我認爲這個問題是database.couldü幫助我如何計算策略這個...... – gnr14 2012-08-15 20:45:41

+0

什麼你使用的用戶名和密碼?確保您已正確設置JDBC數據源。 – Jimmy 2012-08-15 22:59:35

+0

首先,這是應用程序服務器而不是數據庫。數據庫不會生成網頁。 嘗試找尋你所使用的數據庫的URL格式。 二,連接首先發生,然後認證。如果網絡適配器無法連接,則永遠不會嘗試密碼。另外,如果是密碼,那麼錯誤就是認證錯誤。 – crownjewel82 2012-08-15 23:46:51

0

您需要檢查幾件事情,檢查用戶名和密碼都OK,檢查服務器是否接受遠程連接,檢查用戶的權限,檢查數據庫端口是開放的(防火牆),檢查本地防火牆檢查您的主機能夠訪問服務器(PING測試IP服務器)

相關問題