weblogic连接池的密码问题

   最近,DBA对oracle测试库的密码加上了安全认证,原来的测试数据库密码和用户名是一样的,现在密码必须要修改(系统比较老,环境为:weblogic81+oracle 9. 用的是portal domain). 数据库改了密码后,服务就启动不起来了,这样就不能直接在console里面修改了,只有到config.xml文件中进行修改.在config.xml文件中的连接池的密码都是加密的,型如:PasswordEncrypted="{3DES}ZoggSsTPrnoaWIW4+eIDgQ==".为了取得这个密文,我建了一个新的domain2,然后建立连接池,在domain2的config.xml中得到加密的密文,copy到portalDomain的config.xml相应的位置.搞定,启动weblogic... 

   但是还是不能建立数据库连接,报错如下:

com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding:  invalid pad  byte  ...
at com.rsa.jsafe.JA_PKCS5Padding.a(Unknown Source)
at com.rsa.jsafe.JG_BlockCipher.decryptFinal(Unknown Source)

 

   郁闷!...google了下,发现这个问题是在密码认证时出错.原来以为,这里的加密只是和原密码有关系,网上一个网友的评论:

JSAFE is an encryption/decryption engine for Java, developed by RSA. So, you can be sure that you have a problem with encryption/decryption whenever you encounter exceptions related to JSAFE.

All passwords in a WebLogic domain are encrypted by hashes in a file called SerializedSystemIni.dat. Read this tutorial to understand how WebLogic uses SerializedSystemIni.dat. If passwords that have been encrypted in one WebLogic domain are used in another WebLogic domain, then all the encrypted passwords will not be decrypted and the WebLogic servers will not start.

   很清楚了,加密的时候不只和当前的密码有关系,还和当前domain有关系.所以直接copy密码肯定是不行的. 

   最简单的解决方案:

   把PasswordEncrypted="{3DES}ZoggSsTPrnoaWIW4+eIDgQ==".换成Password="123456",后者写的是明文,启动的时候他们是同样的效果. 如果启动前congfig.xml中写的是明文,启动的过程中,weblogic会自动的把它转换成密文格式. 完毕!

   

   

 

转载于:https://www.cnblogs.com/ethanchan/archive/2010/03/01/1675535.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值