简体   繁体   English

java.sql.SQLException:应用程序请求者无法建立连接

[英]java.sql.SQLException: The application requester cannot establish the connection

I have written a java program to connect to AS400 DB. 我已经编写了一个Java程序来连接到AS400 DB。 I am using jt400-6.4.jar to connect to DB. 我正在使用jt400-6.4.jar连接到数据库。

DB Properties I am using: 我正在使用的数据库属性:

as400_dbUrl=jdbc:as400://host/schema;translate binary=true
as400_dbUser=user
as400_dbPassword=pass

My program is not able to connect to DB server i am getting the below error. 我的程序无法连接到数据库服务器,出现以下错误。

2017-06-30 05:36:53 ERROR DBUtil:88 - Exception:
java.sql.SQLException: The application requester cannot establish the connection. (A remote host refused an attempted connect operation.)
        at com.ibm.as400.access.JDError.throwSQLException(JDError.java:528)
        at com.ibm.as400.access.AS400JDBCConnection.setProperties(AS400JDBCConnection.java:3130)
        at com.ibm.as400.access.AS400JDBCDriver.prepareConnection(AS400JDBCDriver.java:1360)
        at com.ibm.as400.access.AS400JDBCDriver.initializeConnection(AS400JDBCDriver.java:1211)
        at com.ibm.as400.access.AS400JDBCDriver.connect(AS400JDBCDriver.java:352)
        at java.sql.DriverManager.getConnection(DriverManager.java:426)
        at java.sql.DriverManager.getConnection(DriverManager.java:474)

I googled about this, not able to find the exact reason. 我对此进行了谷歌搜索,找不到确切的原因。

I think jt400.jar will use 8471 as the port to connect to DB. 我认为jt400.jar将使用8471作为连接数据库的端口。 Please correct me if I am wrong regarding this port. 如果我对此端口有误,请纠正我。

I am not able to ping the host. 我无法ping通主机。 ping host is not returning any response. ping host未返回任何响应。

I am able to telnet like telnet host . 我能够像telnet host一样进行telnet host But I am not able to telnet the system like telnet host 8471 但是我无法像telnet host 8471一样通过telnet host 8471系统

Your hlep will be highly appreciable. 您的呼声将非常高。 Kindly help. 请帮助。

try updating your DB property as: 尝试将数据库属性更新为:

Add <:port-number> after host 在主机后添加<:port-number>

as400_dbUrl=jdbc:as400://host:port/schema;translate binary=true as400_dbUrl = jdbc:as400:// host:port / schema;翻译二进制= true

Hope this solves your problem. 希望这能解决您的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无效值java.sql.SQLException:应用程序请求者无法建立连接 - Invalid value java.sql.SQLException: The application requester cannot establish the connection java.sql.SQLException:网络适配器无法建立连接 - java.sql.SQLException: The Network Adapter could not establish the connection java.sql.SQLException: IO 异常:网络适配器无法建立连接? - java.sql.SQLException: IO Exception : The Network adapter could not establish the connection? java.sql.SQLException:Io异常:网络适配器无法建立连接 - java.sql.SQLException: Io exception: The Network Adapter could not establish the connection 获取“ java.sql.SQLException:Io异常:网络适配器无法建立连接” - Getting “java.sql.SQLException: Io exception: The Network Adapter could not establish the connection” java.sql.SQLException:连接为空 - java.sql.SQLException: Connection is null java.sql.SQLException:打开连接时出错 - java.sql.SQLException: Error opening connection 应用程序请求者无法建立连接。 (打开的文件太多) - The application requester cannot establish the connection. (Too many open files) java.sql.SQLException: 无法获得连接,池错误超时等待空闲对象。 如何恢复连接 - java.sql.SQLException: Cannot get a connection, pool error Timeout waiting for idle object . How to recover the connection 无法连接到Oracle DB,因为java.sql.SQLException而出现错误:Io异常:网络适配器无法建立连接 - Not able to connect to Oracle DB getting error as java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM