It's all about the answers!

Ask a question

How to fix OSCL authentication against JAS 6.0.5 ifix001 with ERROR 22001: A truncation error was encountered trying to shrink VARCHAR ?


Ulf Arne Bister (1.3k413) | asked Jan 11 '18, 9:05 a.m.

Hi,

Setup as follows:
Distributed JTS with Apps on Liberty authenticating against Jazz Authorization Server (JAS) 6.0.5 ifix001, using Derby. All on RHEL Linux.
Using an RTC Eclipse Client I can authenticate against either /ccm , /qm or /rm server fine.
Using a 3rd party integration in the same Eclipse Client (pure::variants) I get an authentication error and find in the JAS logfile:

com.ibm.ws.security.oauth20.plugins.db.CachedDBOidcTokenStore E Internal error adding token: A truncation error was encountered trying to shrink VARCHAR '{xor}OiYVNz0YPDYQNhUWCiUWbhE2FWZxOiYVJTsIFjYQNhULEQoZDwkaahQ&' to length 2048.
[...]
ERROR 22001: A truncation error was encountered trying to shrink VARCHAR '{xor}OiYVNz0YPDYQNhUWCiUWbhE2FWZxOiYVJTsIFjYQNhULEQoZDwkaahQ&' to length 2048.
              at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)

Did anybody encounter something similar? Do you have an idea what the underlying problem is or how to fix it?

best,
Arne

Accepted answer


permanent link
Shubjit Naik (1.5k1613) | answered Jan 11 '18, 12:41 p.m.
edited Jan 11 '18, 1:02 p.m.

 HI Arne


This issue is seen with the default Derby database. This problem occurs when a userid connected to too many LDAP groups tries to logon to the RTC server using oidc, TOKENSTRING column is too small.

You could use a DERBY DB Viewe, example Squirrel Client and increase the TOKENSTRING Column size.

Here is the Defect

Best Regards
Shubjit

Ulf Arne Bister selected this answer as the correct answer

Comments
1
Ulf Arne Bister commented Jan 16 '18, 3:49 a.m.

The workaround did the trick. I had to increase TOKENSTRING column to 16384 Bytes and then the error message went away. For this I used DBVisualizer. JAS Liberty had to be stopped for that measure because the embedded Derby does not like multiple connections apparently.
Thanks for the quick help!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.