简体   繁体   English

Bluemix 中的 SQL 连接错误:应用程序类“com.ibm.db2.jcc.am.fd.a:679”引发的异常

[英]SQL Connection error in Bluemix:Exception thrown by application class 'com.ibm.db2.jcc.am.fd.a:679'

Error details Please find the linked image for the error details while connecting SQL DB in Blue mix错误详细信息请在 Blue mix 中连接 SQL DB 时找到错误详细信息链接图像

Please find the below sample code请找到以下示例代码

<%@ page import="java.sql.*"%> <%@ page import="com.ibm.db2.jcc.DB2SimpleDataSource"%>

String username = request.getParameter("username");
String password = request.getParameter("password"); Connection con=null; DB2SimpleDataSource dataSource = new DB2SimpleDataSource(); String databaseHost="75.126.155.153"; int port=50000; String databaseName="SQLDB"; String user="*****"; String pword="*****"; dataSource.setServerName(databaseHost); dataSource.setPortNumber(port); dataSource.setDatabaseName(databaseName); dataSource.setUser(user); dataSource.setPassword (pword); dataSource.setDriverType(4); con=dataSource.getConnection();

The SQLCODE -204 means "Undefined name". SQLCODE -204 表示“未定义名称”。 It is a DB2 error code indicating 'object does not exist'.这是一个指示“对象不存在”的 DB2 错误代码。 The SQLERRMC value helps provides you more specific information. SQLERRMC 值有助于为您提供更具体的信息。 In your case what can't be found is the table USER14336.DDP_DIR .在您的情况下,找不到表USER14336.DDP_DIR Double check the schema name ( USER14336 ) and the table name ( DDP_DIR ).仔细检查架构名称 ( USER14336 ) 和表名称 ( DDP_DIR )。 Please check also the VCAP_SERVICES environment variable of your application to see if you are using the correct username (as schema name).另请检查您的应用程序的 VCAP_SERVICES 环境变量,以查看您是否使用了正确的用户名(作为架构名称)。 You can also omit the schema name if there is only one (in this case DB2 uses the default one).如果只有一个模式名称,您也可以省略模式名称(在这种情况下,DB2 使用默认名称)。

暂无
暂无

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

相关问题 com.ibm.db2.jcc.am.io:DB2 SQL错误:SQLCODE = -440,SQLSTATE = 42884 - com.ibm.db2.jcc.am.io: DB2 SQL Error: SQLCODE=-440, SQLSTATE=42884 我正在获取“ com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException:DB2 SQL错误:SQLCODE = -803,SQLSTATE = 23505 - Im getting "com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505 Class.forName(com.ibm.db2.jcc.DB2Driver) 在 Liberty8.5 中不起作用 - Class.forName(com.ibm.db2.jcc.DB2Driver) not working in Liberty8.5 java.lang.ClassNotFoundException:在Worklight平台或项目中找不到类com.ibm.db2.jcc.DB2Driver - java.lang.ClassNotFoundException: Class com.ibm.db2.jcc.DB2Driver not found in Worklight platform or project ClassNotFoundException com.ibm.db2.jcc.DB2Driver - ClassNotFoundException com.ibm.db2.jcc.DB2Driver java.lang.ClassNotFoundException:com / ibm / db2 / jcc / DB2Driver-DB2 - java.lang.ClassNotFoundException: com/ibm/db2/jcc/DB2Driver - DB2 org.apache.commons.dbcp.BasicDataSource和com.ibm.db2.jcc.DB2DataSource有什么区别 - What is difference between org.apache.commons.dbcp.BasicDataSource and com.ibm.db2.jcc.DB2DataSource java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z - java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z com.ibm.db2.jcc.c.SqlException:日期时间值的字符串表示形式的语法不正确 - com.ibm.db2.jcc.c.SqlException: The syntax of the string representation of a datetime value is incorrect 将Java应用程序连接到IBM Bluemix中的SQL数据库 - Connecting a Java application to an SQL database in IBM Bluemix
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM