Lỗi này javax.crypto.badpaddingexception given final block not properly padded năm 2024

The error "javax.crypto.BadPaddingException: Given final block not properly padded" is poorly worded. It means that the lqe.key file being used is the wrong one and can not decrypt the data in LQE.

Diagnosing The Problem

Review the lqe.log for the error message mentioned and in case the trace matches, follow through the instructions provided below

Resolving The Problem

1. Stop the IBM LQE application server/ process

2. Run the following SQL queries

SELECT akey FROM kv_table_lqe WHERE akey LIKE 'inboundauthconfig%'; SELECT akey FROM kv_table_lqe WHERE akey LIKE 'pgsconfig%';

3. Run the following SQL query SELECT akey FROM kv_table_lqe WHERE akey LIKE 'node%';

Note: SQL (2) should return 1 entry each SQL (3) should return 2 entries.

4. Confirm the value in file /server/conf/lqe/lqe.node.id on the IBM LQE server matches the value of 1 of the results of SQL (3) Else, modify the lqe.node.id file content to match the value seen in the output of SQL (3)

example:

lqe.node.id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

And

SELECT akey FROM kv_table_lqe WHERE akey LIKE 'node%';

returns..

node; nodeid="PropertyGraph" node; nodeid="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

NOTE : If there are any discrepency on steps 3 or 4, reach out to IBM Software Support for a more thorough check. Else continue to Step 5.

5. Run the following SQL queries

DELETE FROM kv_table_lqe WHERE akey LIKE 'inboundauthconfig%';

DELETE FROM kv_table_lqe WHERE akey LIKE 'pgsconfig%';

6. Start the IBM LQE application server/ process.

Document Location

Worldwide

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSUB2H","label":"IBM Engineering Lifecycle Optimization - Engineering Insights"},"Component":"lqe;Lifecycle Query Engine","Platform":[{"code":"PF006","label":"CentOS"},{"code":"PF016","label":"Linux"},{"code":"PF051","label":"Linux on IBM Z Systems"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0.6;6.0.6.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

This website uses cookies to ensure you get the best experience. Learn More.

Accept

  • Ask
  • Blogs
  • Chat
  • Download
  • Feedback
  • Help
  • Learn
  • Projects
  • /dev/24
  • Log In

Ask Questions and Find Answers

Receive an error when running updatedb, upgradeui, or maxinst: "Given final block not properly padded"

Cause

Encrypted maximo.properties password

Answer

When trying to execute either updatedb, upgradeui (Maximo upgrade tools), or maxinst you receive the following error messages:

javax.crypto.BadPaddingException: Given final block not properly padded at com.ibm.crypto.provider.AESCipher.engineDoFinal(Unknown Source) at com.ibm.crypto.provider.AESCipher.engineDoFinal(Unknown Source) at javax.crypto.Cipher.doFinal(Unknown Source) at psdi.util.MXCipher.decData(MXCipher.java:229) at psdi.util.MXProperties.loadPropsFromStream(MXProperties.java:138) at psdi.util.MXProperties.loadProperties(MXProperties.java:59) at psdi.tools.CleanDatabase.getConnection(Unknown Source) at psdi.tools.CleanDatabase.action(Unknown Source) at psdi.tools.CleanDatabase.main(Unknown Source) psdi.util.MXSystemException: system

major

at psdi.util.MXCipher.decData(MXCipher.java:235) at psdi.util.MXProperties.loadPropsFromStream(MXProperties.java:138) at psdi.util.MXProperties.loadProperties(MXProperties.java:59) at psdi.tools.CleanDatabase.getConnection(Unknown Source) at psdi.tools.CleanDatabase.action(Unknown Source) at psdi.tools.CleanDatabase.main(Unknown Source)

Caused by: Encrypted password in maximo.properties

To fix, change the maximo.properties file extension to .sav and then rename the maximo.properties.orig (unencrypted version) to maximo.properties and rerun either the upgradui or maxinst command.

Note: The maximo.properties file should be automatically re-encrypted following the completion of the upgrade. If not, just run the following script to re-encrypt password in the maximo.properties file:

\tools\maximo\encryptproperties.bat

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"ARM Category":[{"code":"a8m50000000CbPGAA0","label":"General"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.1.0;7.5.0;7.6.0;7.6.1"},{"Product":{"code":"SSLKTY","label":"Maximo Asset Management for IT"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"","label":"All"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SSKTXT","label":"Tivoli Change and Configuration Management Database"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}},{"Product":{"code":"SS6HJK","label":"Tivoli Service Request Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]