function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abdul Mujeeb ShaikAbdul Mujeeb Shaik 

Error: Cannot coerce from class core.apexpages.el.adapters.RuntimeTypeMetadataELAdapter to class java.lang.Boolean

I am Getting this Error when i run/save the vf page:
Error: Cannot coerce from class core.apexpages.el.adapters.RuntimeTypeMetadataELAdapter to class java.lang.Boolean    

this is my vf code:
<apex:repeat value="{!mapkeys}" var="key">
<!--    <apex:column headerValue="{!key}"> </apex:column>-->
    
    <apex:dataTable value="{!mapprofile[key]}" var="v" width="30%" border="2">
 <apex:column value="{!v.SObjectType}"  headerValue="Sobject Name"/> 
             <apex:column value="{!v.PermissionsRead}" headerValue="Read"/>
             <apex:column value=" {!v.PermissionsCreate}" headerValue="Creat"/>
<apex:column value=" {!v.PermissionsEdit}" headerValue="Edit"/> 
<apex:column value=" {!v.PermissionsDelete}" headerValue="Delete"/>  
</apex:dataTable>
    
    
        <!--<apex:outputText value="{!yourMap[key]}"/> -->
    
</apex:repeat>

and i dont know how to clear this bug, i searched here and also i googled  but no luck , 
can any one quickly respond to my post please.

thanks in advance.
Best Answer chosen by Abdul Mujeeb Shaik
bob_buzzardbob_buzzard
I've seen this issue crop up a few times, and it seems to be related to using a repeat variable as the key to the map - {!mapProfile[key]}.  Some people have had success changing the var property name - e.g. change 'key' to a different name. Aside from that the best advice is to open a case with Salesforce, assuming you have premier support. 

All Answers

bob_buzzardbob_buzzard
I've seen this issue crop up a few times, and it seems to be related to using a repeat variable as the key to the map - {!mapProfile[key]}.  Some people have had success changing the var property name - e.g. change 'key' to a different name. Aside from that the best advice is to open a case with Salesforce, assuming you have premier support. 
This was selected as the best answer
Abdul Mujeeb ShaikAbdul Mujeeb Shaik
Thank you Bob_Buzzard, I changed the Property name key to k. now this time No Error But there is no Result to display. i used Rerender also the outputpanel but still no Result. 
The updated code looks like this.
 
<apex:repeat value="{!mapkeys}" var="k">
<!--    <apex:column headerValue="{!key}"> </apex:column>-->
    
    <apex:dataTable value="{!mapprofile[k]}" var="v" width="30%" border="2">
 <apex:column value="{!v.SObjectType}"  headerValue="Sobject Name"/> 
             <apex:column value="{!v.PermissionsRead}" headerValue="Read"/>
             <apex:column value=" {!v.PermissionsCreate}" headerValue="Creat"/>
<apex:column value=" {!v.PermissionsEdit}" headerValue="Edit"/> 
<apex:column value=" {!v.PermissionsDelete}" headerValue="Delete"/>  
</apex:dataTable>
 </apex:repeat>

Can u pls help me out , but the map and the values in the conrtroller is correct ,i ckecked in debuglog.
But i want to display in Visulaforce Page.

Thanks in Advance.
Collen Mayer 6Collen Mayer 6
Just wondering if anyone has had luck solving this?  Changing the name of the key in my map didn't work either. 
Deepak Goyal 52Deepak Goyal 52

Hi @bob_buzzard changing the variable name is also not working for me. Please can you suggest some other way.

I have problem like: 
Cannot coerce of class com.force.swag.soap.DateOnlyWrapper to class java.lang.Boolean (incompatible type)
Error is in expression '<![CDATA[{!abc}]]>' in component <apex:relaxedContent> in page expenseajaxbroker