The issue is resolved by rebooting the POE switches, somehow few POE switches had stopped broadcasting the mac adddress of the AP infra vlans due to which the mac was not reaching to the core switch. Once we rebooted those switches the mac started broadcasting on core and then it worked.
The switch model number is WS-C3560X-24P. Could there be any bug on the switch? This is the IOS we are using in switch
You will find documented details of the Bug in the link below. No suggested solutions.
Bug ID: CSCuh46442
LAP displays %CAPWAP-3-ERRORLOG messages when AP join to WLC
%CAPWAP-3-ERRORLOG: Invalid event 10 & state 5 combination.
%CAPWAP-3-ERRORLOG: CAPWAP SM handler: Failed to process message type 10 state 5.
%CAPWAP-3-ERRORLOG: Failed to handle capwap control message from controller
%CAPWAP-3-ERRORLOG: Failed to process encrypted capwap packet from 172.22.170.1
Known Affected Releases: