oracle Weblogic 部署异常:PaddingException:无法执行取消填充:填充字节无效

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12911771/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:33:48  来源:igfitidea点击:

Weblogic Deployment Exception : PaddingException: Could not perform unpadding: invalid pad byte

oracleweblogicweblogic-10.xjdeveloper

提问by MaVRoSCy

This question is asked (and answered) just to sharesome knowledge with the SO Community.

提出(并回答)这个问题只是为了与 SO 社区分享一些知识。

I have recently came up with a deployment Exception of my web application (after receiving some changes from the SVN Repository) that said:

我最近提出了我的 Web 应用程序的部署异常(在收到来自 SVN 存储库的一些更改后),它说:

< Error > < Deployer > with ID '1350377960779' for task '1'. Error is: 'com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.' com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte. at com.rsa.jsafe.c.a(Unknown Source) at com.rsa.jsafe.JSAFE_SymmetricCipher.decryptFinal(Unknown Source) at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:124) at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:184) at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96) Truncated. see log file for complete stacktrace Caused By: com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad byte.

<错误> <部署者> ID 为“1350377960779”的任务“1”。错误是:“com.rsa.jsafe.JSAFE_PaddingException:无法执行取消填充:填充字节无效。” com.rsa.jsafe.JSAFE_PaddingException:无法执行取消填充:填充字节无效。在 com.rsa.jsafe.ca(未知来源) 在 com.rsa.jsafe.JSAFE_SymmetricCipher.decryptFinal(未知来源) 在 weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decryptBytes(JSafeEncryptionServiceImpl.java:124) 在 weblogic.security。 internal.encryption.JSafeEncryptionServiceImpl.decryptString(JSafeEncryptionServiceImpl.java:184) 在 weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt(ClearOrEncryptedService.java:96) 被截断。

回答by MaVRoSCy

Googling to find an answer was not very helpful. After examining the files received from my SVN repository, i noticed that a jdbc application resource was changed.

谷歌搜索找到答案并不是很有帮助。检查从我的 SVN 存储库收到的文件后,我注意到 jdbc 应用程序资源已更改。

Examining the jdbc resource more closely i found that it was using the password-encryptedproperty which is used only for production environments

更仔细地检查 jdbc 资源,我发现它正在使用password-encrypted仅用于生产环境的属性

<password-encrypted>{AES}some+very+long+encrypted+string</password-encrypted>

So I commented out this property and used the property used for the development environment:

所以我注释掉了这个属性,使用了开发环境使用的属性:

 <properties>
     <property>
        <name>user</name>
        <value>MY_USER</value>
     </property>
     <property>
        <name>password</name>
        <value>MY_PASS_IN_PLAIN_TEXT</value>
     </property>
  </properties>

And that worked just fine.

这工作得很好。

回答by Mindbender

I just had this problem, and all I had to do was save the page on the Connection Pool page while the password was blank. Of course then it would fail. Then put in the password and save again. This time no Pad byte error and it conencts without fail.

我刚刚遇到了这个问题,我所要做的就是在密码为空时将页面保存在连接池页面上。当然,那它会失败。然后输入密码并再次保存。这次没有Pad字节错误并且它没有失败地连接。

回答by dchang

I clicked MaVRoSCy own response as usefull, because it works. But the downside it's that your password became visible (might not be a problem at development env).

我点击了 MaVRoSCy 自己的响应,认为它很有用,因为它有效。但缺点是您的密码变得可见(在开发环境中可能不是问题)。

This problem with password encryption can be overcome by reencrypting your password at your weblogic instance.

密码加密的这个问题可以通过在您的 weblogic 实例上重新加密您的密码来克服。

To do so, go to your weblogic domain, ex: ORACLE_HOME\user_projects\domains\YOUR_DOMAIN

为此,请转到您的 weblogic 域,例如:ORACLE_HOME\user_projects\domains\YOUR_DOMAIN

And execute this command: java weblogic.security.Encrypt YOUR_PASSWORD

并执行此命令: java weblogic.security.Encrypt YOUR_PASSWORD

This will output something like: {AES}0gcupcB95gtlr6VYnT3TZK5PxiATDuIUe3kRKd3b/Ag=

这将输出如下内容: {AES}0gcupcB95gtlr6VYnT3TZK5PxiATDuIUe3kRKd3b/Ag=

This is your encrypted password for your weblogic instance.

这是您的 weblogic 实例的加密密码。

Then just replace it at your password-encryptedproperty inside datasource xml configuration.

然后只需在数据源 xml 配置中的密码加密属性中替换它。

<password-encrypted>{AES}0gcupcB95gtlr6VYnT3TZK5PxiATDuIUe3kRKd3b/Ag=</password-encrypted>