技术文章 - CS251020

无法连接到 Windchill,出现“BadPaddingException - Given final block not properly padded”

已修改: 14-Apr-2025   


注意:本文已使用机器翻译软件翻译,以方便非英语客户阅读。但翻译内容可能包含语法错误或不准确之处。请注意, PTC对本文所含信息的翻译准确性及使用后果不承担任何责任。请在 此处 查看本文的英文原始版本以便参考。有关机器翻译的更多详情,请单击 此处
感谢您告诉我们。我们将尽快审阅此译文。

适用于

  • Windchill PDMLink 10.1 F000 to 13.0

说明

  • 无法连接到 Windchill,出现以下错误:
     BadPaddingException - Given final block not properly padded WTException: javax.crypto.BadPaddingException

    弹出错误信息
     wt.util.WTRuntimeException: wt.util.WTException: javax.crypto.BadPaddingException: Given final block not properly padded Nested exception is: javax.crypto.BadPaddingException: Given final block not properly padded; nested exception is wt.util.WTException: javax.crypto.BadPaddingException: Given final block not properly padded Nested exception is javax.crypto.BadPaddingException: Given final block not properly padded javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.] with root cause javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. at com.sun.crypto.provider.CipherCore.unpad(CipherCore.java:975) at com.sun.crypto.provider.CipherCore.fillOutputBuffer(CipherCore.java:1056) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:853) at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:446) at javax.crypto.Cipher.doFinal(Cipher.java:2164) at wt.intersvrcom.SiteSecurity.decryptPrivateKey(SiteSecurity.java:573) at wt.intersvrcom.SiteSecurity.getPrv(SiteSecurity.java:203) at wt.intersvrcom.SiteInfoCache.getSecretKey(SiteInfoCache.java:526) at wt.intersvrcom.StandardInterSvrComService.getSecretKey(StandardInterSvrComService.java:2122) at wt.intersvrcom.MacAuthenticator.getSecretKeyByDisablingAccess(MacAuthenticator.java:184) at wt.intersvrcom.MacAuthenticator.sign(MacAuthenticator.java:119) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.ptc.core.appsec.FoundationHolder.sign(FoundationHolder.java:282) at com.ptc.core.appsec.CSRFNonce$1.call(CSRFNonce.java:321) at com.ptc.core.appsec.CSRFNonce$1.call(CSRFNonce.java:318) at wt.httpgw.WTContextBeanHandler.runOperation(WTContextBeanHandler.java:268) at wt.httpgw.WTContextBeanHandler.runOperation(WTContextBeanHandler.java:253) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.ptc.core.appsec.CSRFNonce.initializeMac(CSRFNonce.java:316) at com.ptc.core.appsec.CSRFNonce.initialize(CSRFNonce.java:161) at com.ptc.core.appsec.CSRFNonce.newCSRFNonce(CSRFNonce.java:130) at com.ptc.core.appsec.CSRFProtector.addNonce(CSRFProtector.java:373) at com.ptc.core.appsec.CSRFProtector.getNonce(CSRFProtector.java:198) at com.ptc.core.appsec.CSRFProtector.getNonce(CSRFProtector.java:176) at com.ptc.core.appsec.CSRFProtector.getNonce(CSRFProtector.java:160) at com.ptc.core.appsec.CSRFProtector.getNonce(CSRFProtector.java:138) at org.apache.jsp.WEB_002dINF.jsp.shell_jsp._jspService(shell_jsp.java:214)

  • 方法服务器日志

     ERROR [ajp-nio-127.0.0.1-8010-exec-8] org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Windchill].[MVCDispatcher] - Servlet.service() for servlet [MVCDispatcher] in context with path [/Windchill] threw exception [wt.util.WTRuntimeException: wt.util.WTException: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. Nested exception is: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. Nested exception is: wt.util.WTException: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption. Nested exception is: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.] with root cause javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
这是文章 251020 的 PDF 版本,可能已过期。最新版本 CS251020