java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

Oracle Community | 785646 | 7 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    ORACLE 11g R2 POST Install Issue

    Oracle Community | 7 years ago | 785646
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
  2. 0

    ERROR pingManager: nmepm_pingReposURL: Cannot connect

    Oracle Community | 7 years ago | 737000
    java.sql.SQLException: Io exception: Socket read timed out
  3. 0

    Problem with localhost:1158/em

    Oracle Community | 6 years ago | 890267
    java.sql.SQLException: Listener refused the connection with the following error: ORA-12528, TNS:listener: all appropriate instances are blocking new connections The Connection descriptor used by the client was: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.sql.SQLException: No value specified for parameter 1解决办法_IT知识问答_希赛网

    educity.cn | 2 years ago
    java.sql.SQLException: No value specified for parameter 1 代码如下 public boolean login(UserInfo user)throws Exception{ //用户登录 boolean flag=false; int userNo=Integer.parseInt(user.getUserNo()); String password=user.getPassword(); //测试是否从现在的user对象中取到了值 System.out.println(userNo+"我是USER对象的userNo"); System.out.println(password+"我是USER对象的password"); DatabaseConnection dbc=new DatabaseConnection();//取得数据库连接和关闭对象; try{ String sql="SELECT userNo FROM userInfo where userNo= and password= "; this.conn=dbc.getConnection(); this.pst=conn.prepareStatement(sql); //this.pst.setInt(1, userNo);//给sql中参数赋值 this.pst.setLong(1, userNo); this.pst.setString(2, password); ResultSet rs=pst.executeQuery(); if(rs.next()){//传入用户账号和对应的密码都存在时为真 flag=true; System.out.println(rs.getString(userNo)+"我是从数据库里取出来的"); System.out.print(flag+"测试flag");//测试flag,看是否进入了if里面,true则进入了 rs.close(); } }catch(Exception e){ e.printStackTrace(); }finally{ if(this.pst!=null){ this.pst.close(); } this.conn.close(); } return flag; } 报的错误信息如:
  6. 0

    java.sql.SQLException: No suitable driver - Toolbox for IT Groups

    ittoolbox.com | 9 months ago
    java.sql.SQLException: No suitable driver at java.sql.DriverManager.getConnection(DriverManager .java:545) at java.sql.DriverManager.getConnection(DriverManager .java:171) at com.stc.sql.framework.jdbc.DBConnectionFactory.cre ateConnection(DBConnectionFactory.java:372) at com.stc.sql.framework.jdbc.DBConnectionFactory.get Connection(DBConnectionFactory.java:281) at com.stc.etl.engine.impl.SimpleTask.getConnection(S impleTask.java:254) at com.stc.etl.engine.impl.Extractor.getSelectData(Ex tractor.java:376) at com.stc.etl.engine.impl.Extractor.process(Extracto r.java:190) at com.stc.etl.engine.impl.ETLTaskThread.run(ETLTaskT hread.java:147)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Io exception: The Network Adapter could not establish the connection

      at oracle.jdbc.driver.SQLStateMapping.newSQLException()
    2. Oracle jdbc
      OracleConnectionCacheManager.refreshCache
      1. oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:77)
      2. oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:111)
      3. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
      4. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:230)
      5. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:501)
      6. oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:436)
      7. oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:621)
      8. oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
      9. oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
      10. oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:492)
      11. oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:386)
      12. oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:276)
      13. oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:212)
      14. oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:140)
      15. oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1752)
      16. oracle.jdbc.pool.OracleImplicitConnectionCache.makeOneConnection(OracleImplicitConnectionCache.java:644)
      17. oracle.jdbc.pool.OracleImplicitConnectionCache.defaultUserPrePopulateCache(OracleImplicitConnectionCache.java:272)
      18. oracle.jdbc.pool.OracleImplicitConnectionCache.doForEveryCachedConnection(OracleImplicitConnectionCache.java:1307)
      19. oracle.jdbc.pool.OracleImplicitConnectionCache.refreshCacheConnections(OracleImplicitConnectionCache.java:1902)
      20. oracle.jdbc.pool.OracleConnectionCacheManager.refreshCache(OracleConnectionCacheManager.java:756)
      20 frames
    3. oracle.sysman.util
      ConnectionCache.getUnwrappedConnection
      1. oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:357)
      2. oracle.sysman.util.jdbc.ConnectionCache._getConnection(ConnectionCache.java:322)
      3. oracle.sysman.util.jdbc.ConnectionCache.getUnwrappedConnection(ConnectionCache.java:575)
      3 frames
    4. oracle.sysman.emSDK
      ConnectionService.getPrivateConnection
      1. oracle.sysman.emSDK.svc.conn.FGAConnectionCache.getFGAConnection(FGAConnectionCache.java:207)
      2. oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:1138)
      3. oracle.sysman.emSDK.svc.conn.ConnectionService.getPrivateConnection(ConnectionService.java:1172)
      3 frames
    5. oracle.sysman.eml
      SessionListener.sessionDestroyed
      1. oracle.sysman.eml.app.SessionObjectManager.sessionDestroyed(SessionObjectManager.java:116)
      2. oracle.sysman.eml.app.SessionListener.sessionDestroyed(SessionListener.java:126)
      2 frames
    6. com.evermind.server
      EvermindHttpSession.invalidate
      1. com.evermind.server.http.HttpApplication.invalidateSession(HttpApplication.java:860)
      2. com.evermind.server.http.EvermindHttpSession.invalidate(EvermindHttpSession.java:397)
      2 frames
    7. oracle.sysman.emSDK
      EMBaseLoginAdapterImpl.login
      1. oracle.sysman.emSDK.sec.auth.EMBaseLoginAdapterImpl.logoff(EMBaseLoginAdapterImpl.java:680)
      2. oracle.sysman.emSDK.sec.auth.EMBaseLoginAdapterImpl.login(EMBaseLoginAdapterImpl.java:629)
      2 frames
    8. oracle.sysman.eml
      EMRepLoginFilter.doFilter
      1. oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:127)
      1 frame
    9. com.evermind.server
      EvermindFilterChain.doFilter
      1. com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
      1 frame
    10. oracle.sysman.db
      HandleRepDownFilter.doFilter
      1. oracle.sysman.db.adm.inst.HandleRepDownFilter.doFilter(HandleRepDownFilter.java:165)
      1 frame
    11. com.evermind.server
      EvermindFilterChain.doFilter
      1. com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
      1 frame
    12. oracle.sysman.eml
      BrowserVersionFilter.doFilter
      1. oracle.sysman.eml.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:122)
      1 frame
    13. com.evermind.server
      EvermindFilterChain.doFilter
      1. com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
      1 frame
    14. oracle.sysman.emSDK
      EMRedirectFilter.doFilter
      1. oracle.sysman.emSDK.svlt.EMRedirectFilter.doFilter(EMRedirectFilter.java:102)
      1 frame
    15. com.evermind.server
      EvermindFilterChain.doFilter
      1. com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17)
      1 frame
    16. oracle.sysman.eml
      ContextInitFilter.doFilter
      1. oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:357)
      1 frame
    17. com.evermind.server
      HttpRequestHandler.run
      1. com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
      2. com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
      3. com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
      4. com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
      5. com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
      6. com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
      7. com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
      7 frames
    18. oracle.oc4j.network
      ServerSocketReadHandler$SafeRunnable.run
      1. oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
      1 frame
    19. com.evermind.util
      ReleasableResourcePooledExecutor$MyWorker.run
      1. com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
      1 frame
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame