+ Start a Discussion
Ben DunlapBen Dunlap 

Unknown/Java exceptions in previously working code after Summer '12 update

My sandbox appears to have been updated to Summer '12 over the weekend and previously-working code is now failing with unknown or Java exceptions -- which makes me suspect internal bugs from the update. Two specific examples I've seen so far:

 

1) A trigger that assembles a singleEmailMessage and calls Messaging.sendEmail() at the end is failing on the sendEmail() with:

 

EXCEPTION_THROWN [65]|System.EmailException: SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, java.lang.Boolean cannot be cast to java.lang.String: []

 2) A very simple VF page, which uses a standard controller, now fails to render. I get this error in lieu of the page:

 

java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.util.Date 

In this case the logs in the developer console don't even show the error so it seems like the problem occurs after all Apex code has executed (there is a small VF component involved that has a custom controller).

 

That's what I've seen so far today. On a related note: was there an announcement of the sandbox upgrade that I just missed or ignored? Should I be watching a feed that I'm not watching? I don't see anything on Twitter, in the developer.force.com blogs, or here in the forums (other than other users posting about their own difficulties)

 

Best Answer chosen by Admin (Salesforce Developers) 
Ben DunlapBen Dunlap

FWIW problem #1 in my OP is now gone. Apparently a bug somewhere was fixed.

All Answers

Ben DunlapBen Dunlap

Pls disregard #2 above (the VF page problem). My fault but I erroneously attributed it to the upgrade.

 

#1 is different, though -- I have a unit-test that worked on Friday but now fails and the code that is failing is in a trigger. Neither the trigger nor the unit-test has changed since well before the last time the test passed.

manubkkmanubkk

I am having issues too after deploying code working in Spring '12 to Summer '12, and here are some of the errors I came across so far:

 

  • Visualforce Error: Unsupported type common.api.soap.wsdl.PicklistEntry encountered.
  • Visualforce Error: System.TypeException: Collection store exception adding all LIST<SObject> to LIST<SomeObject>
  • Visualforce Error: Value 'false' cannot be converted from Boolean to DateTime
  • Visualforce Error: java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

Surely, something has changed with SF's new release that is causing existing code to break.

 

Ben DunlapBen Dunlap

FWIW problem #1 in my OP is now gone. Apparently a bug somewhere was fixed.

This was selected as the best answer
TehNrdTehNrd

I am seeing this one:

 

Unsupported type common.api.soap.wsdl.ID encountered.

 

This has completely hosed an AppExchange Package I was working on.

TehNrdTehNrd

Here is a very simple example to reproduce the issue I am seeing. This was working fine before the Summer12 update.

 

Page:

<apex:page controller="wsdlBug">
    {!recordTypeSchema.RecordTypeId}
</apex:page>

 

Controller:

public with sharing class wsdlBug {
	   
    public Schema.RecordTypeInfo recordTypeSchema {get; set;}
    
    //Constructor
    public wsdlBug(){
        recordTypeSchema = Schema.SObjectType.Account.getRecordTypeInfos()[0];
    }
}

 

-Jason

craigmhcraigmh

Doesn't even work if you change the Version back for the Page/Class.

 

Interesting how this works, though:

 

public with sharing class wsdlBug {
    public Id recordTypeSchema { get; set; }
    
    public wsdlBug() {
        recordTypeSchema = Schema.SObjectType.Account.getRecordTypeInfos()[0].getRecordTypeId();
    }
}

 

<apex:page controller="wsdlBug">
    {!recordTypeSchema}
</apex:page>