Hi Niral,

it looks like you are using JPA / database ticket registry for tickets. And 
probably while storing the OAuth ticket, its serialized length exceeds 
32000 bytes (or chars) which are reserved for the target BODY column in the 
CAS_TICKETS table. Note that you can set *<Logger name=" 
org.apereo.cas.support.oauth.web.endpoints.OAuth20AuthorizeEndpointController 
" level="debug" />*  in your log4j2.xml to see the *whole* exception 
stacktrace and confirm the exact place of failure.

The *solution* should be to change (probably manually) the type of the BODY 
column e.g. to TEXT or whatever long-enough datatype your target database 
supports.

*Reason*: I guess that maybe you've already had a larger column in the 
database and depending on what you've got set in the 
cas.ticket.registry.jpa.ddl-auto setting 
<https://apereo.github.io/cas/6.6.x/ticketing/JPA-Ticket-Registry.html#configuration>,
 
it was changed to CAS's default VARCHAR(32000) or similar during running 
the new CAS - or you are simply using a fresh database instance? And maybe 
in the new CAS version the OAuth ticket 
<https://github.com/apereo/cas/blob/v6.6.9/support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/ticket/BaseOAuth20Token.java>
 
holds more data than before. Even if 32k looks like being sufficient, it 
apparently isn't in this case...

Petr

On Friday, 4 August 2023 at 19:39:40 UTC+2 Ganesh Prasad wrote:

> Hi Niral,
>
> Sorry, I don't have an answer to your question, but I need some help from 
> you. I have been struggling to set up CAS to be an OIDC provider. Can you 
> please help me with the setup by either sending me the overlay you started 
> with (removing all sensitive information, of course), or the steps needed 
> to set it up?
>
> I'm not able to set up anything more complex than just basic CAS.
>
> Thanks and regards,
> Ganesh
>
> On Sat, 5 Aug 2023 at 01:39, Niral Kunadia <[email protected]> wrote:
>
>> Hello,
>>
>> I am trying to integrate mangoapps (external app) with CAS using OIDC 
>> connect. It was working perfectly fine with CAS 6.5.9.
>>
>> I upgraded cas with CAS 6.6.10 and I am getting this error in logs.
>>
>> 2023-08-04 15:26:12,503 ERROR 
>> [org.hibernate.engine.jdbc.batch.internal.BatchingBatch] - <HHH000315: 
>> Exception executing batch [java.sql.BatchUpdateException: data exception: 
>> string data, right truncation ; size limit: 32000 table: CAS_TICKETS 
>> column: BODY], SQL: insert into Cas_Tickets (body, creation_Time, 
>> parent_Id, principal_Id, type, id) values (?, ?, ?, ?, ?, ?)>
>> 2023-08-04 15:26:12,505 WARN 
>> [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - <SQL Error: 3401, 
>> SQLState: 22001>
>> 2023-08-04 15:26:12,507 ERROR 
>> [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] - <data exception: 
>> string data, right truncation ; size limit: 32000 table: CAS_TICKETS 
>> column: BODY>
>>
>> and also this
>> 2023-08-04 15:26:12,527 ERROR 
>> [org.apereo.cas.support.oauth.web.endpoints.OAuth20AuthorizeEndpointController]
>>  
>> - <could not execute batch; SQL [insert into Cas_Tickets (body, 
>> creation_Time, parent_Id, principal_Id, type, id) values (?, ?, ?, ?, ?, 
>> ?)]; nested exception is org.hibernate.exception.DataException: could not 
>> execute batch
>>         HibernateJpaDialect.java:convertHibernateAccessException:280
>>         HibernateJpaDialect.java:translateExceptionIfPossible:233
>>         JpaTransactionManager.java:doCommit:566
>> >
>>
>> -- 
>> - Website: https://apereo.github.io/cas
>> - Gitter Chatroom: https://gitter.im/apereo/cas
>> - List Guidelines: https://goo.gl/1VRrw7
>> - Contributions: https://goo.gl/mh7qDG
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "CAS Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/4c40ec4d-4b21-4ae4-af29-6a4004875f53n%40apereo.org
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/4c40ec4d-4b21-4ae4-af29-6a4004875f53n%40apereo.org?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3c7b9df8-40cb-4e3f-b921-7bced5c89cafn%40apereo.org.

Reply via email to