标签: oracle-wallet

基于JDBC Oracle钱包的连接:内存中的Wallet文件夹

我想使用存储在内存中的钱包而不是将钱包存储在磁盘上来连接到Oracle数据库。

我尝试使用Apache Common VFS读取/写入内存中的文件。钱包被写入内存(确保我什至将ramera文件夹从ram写入了磁盘)。

properties.put("oracle.net.tns_admin", "ram://my_wallet");
properties.put("oracle.net.wallet_location",
          String.format("(SOURCE=(METHOD=file)(METHOD_DATA=(DIRECTORY=%s)))", "ram://my_wallet"));
Run Code Online (Sandbox Code Playgroud)

当我尝试使用这些属性建立连接时,出现错误:

java.sql.SQLRecoverableException: IO Error: could not resolve the connect identifier DB_1222

PS:如果将钱包放在磁盘上,我的代码可以正常工作。

oracle ram jdbc apache-commons-vfs oracle-wallet

5
推荐指数
1
解决办法
55
查看次数

标签 统计

apache-commons-vfs ×1

jdbc ×1

oracle ×1

oracle-wallet ×1

ram ×1