1

我编写了一个 GUI 的 java 程序,当单击 Jbutton 时,它将数据从 db2 和 shwos 带入 JtextArea。

我已经使用了 ID/PAssword 的加密,如下代码

Properties properties = new Properties();
properties.setProperty("securityMechanism",
Integer.toString(DB2BaseDataSource.ENCRYPTED_USER_AND_PASSWORD_SECURITY));
properties.setProperty("user","myuserid");
properties.setProperty("password","mypassword"); myConn =
DriverManager.getConnection(url, properties);

当我在eclipse中运行它时它运行良好。

刚刚使用导出选项创建了一个可运行的 jar 文件(选择将 reqd 库打包到生成的 jar 选项中)。当我双击 jar 文件时,它会显示 gui 窗口,但是当我单击按钮时,它不会获取任何数据。

我将数据库连接日志保存到一个文件中,该文件显示.....

Error msg: [jcc][1071][10615][4.8.86] Caught java.security.InvalidAlgorithmParameterException 
while initializing EncryptionManager.  
See attached Throwable for details. ERRORCODE=-4223, SQLSTATE=null
SQLSTATE: null
Error code: -4223

请帮助解决这个问题。谢谢,

4

0 回答 0