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
VarunCVarunC 

An internal server error has occurred

An internal server error has occurred

 

An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact support@salesforce.com. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.

Thank you again for your patience and assistance. And thanks for using Salesforce!

Error ID: 1973761023-277 (48984707)

 

 

I'm terrified by this error .. I get this when I fire Save from VF page created using TASK standard Controller.

 

whenever this error pops up, it just display a Full WHITE page with the Above Specified Error text, and Nothing Else.

Best Answer chosen by Admin (Salesforce Developers) 
dchasmandchasman
Under the covers the error is a system level exception caused by a ClassCastException: String cannot be cast to Date - can you please post the markup for the page you are trying to save?

All Answers

dchasmandchasman
Under the covers the error is a system level exception caused by a ClassCastException: String cannot be cast to Date - can you please post the markup for the page you are trying to save?
This was selected as the best answer
VarunCVarunC

Thanks, you pointed out very correctly, I was type casting the String value to Date, but it was getting a toll on me as, the type casting was working very well in MOST of the cases, it wa sfailing in some case, so was the error, it would have been very nice if it would have been a little more gracefull error :) ...

 

but anyways .. thanks a bunch :)

dchasmandchasman

Can you still post the example - the exception was happening at a very low level in VF and needs to be fixed (the fix will also result in a good error message).

 

Also, are you working with Development Mode enabled for your user? - normally this will present you with significantly more detailed error information if you have dev mode enabled...

VarunCVarunC

<apex:page standardController="Task" tabStyle="Activities_VF__tab" extensions="extTaskEdit" showHeader="true">
<apex:form >
<apex:sectionHeader title="My Task" subtitle="{!task.Subject}"></apex:sectionHeader>
<apex:pageBlock title="My Task Edit" id="thePageBlock" mode="edit">
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockButtons location="both">
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Save & New Task" action="{!savenewtask}"/>
<apex:commandButton value="Save & New Event" action="{!savenewevent}"/>
<apex:commandButton value="Check Spelling" onclick="doSpell('en', document.getElementById('{!$Component.descr_section.task__description}'), document.location.protocol + '//' + document.location.host + '/servlet/com.spellchecker.net.sproxy.SProxy', true, undefined, undefined, 'Our SpellChecker feature does not support Internet Explorer 3.0. However,it does support the following browsers:IE 4+,Netscape 4+', 'We are sorry,currently we do not support Netscape Navigator 3.0,Internet Explorer 3.0. Please upgrade your browser', 'There is nothing to check', 'Spell Check Navigation', 'Spell Check Content', 'Spell Check Actions', 'Suggest All', 'Hidden Frame - Ignore');return false;" />
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
. . . . . . . . . . . .


. . . . . . . . . .. .

<apex:pageblockSection title="Reminder" id="reminder_section" columns="1">
<apex:inputhidden id="task__remdatetime" value="{!task.ReminderDateTime}" />
<apex:pageBlockSectionItem id="isRemSet">
<apex:outputLabel value="Reminder" for="task__IsReminderSet" />
<apex:pageBlockSectionItem id="remDetails">
<apex:inputfield id="task__IsReminderSet" value="{!task.IsReminderSet}" onclick="togglereminder(this.checked);" /><!-- -->
<apex:pageBlockSectionItem id="remdatetime">
<apex:inputfield id="task__ReminderDate" value="{!proxyReminderDate.Valid_Until__c}" styleclass="FormDataASmaller" />
<apex:selectList id="task__ReminderTime" value="{!reminderTime}" size="1" styleclass="FormDataASmaller">
<apex:selectOptions value="{!ReminderTimesList}"></apex:selectOptions>
</apex:selectList>
</apex:pageBlockSectionItem>
</apex:pageBlockSectionItem>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

Above is the Part of VF code. See here I'm making some adjustment using inputfield, as well as trying to make up for distributed controls for reminders dropdowns.

 

Below is my Apex Code:

 

 

private void doAddReminder()
{
if(taskrecord.IsReminderSet)
{
String stringDate = FormatDate(reminderDate.Valid_Until__c) + ' ' +reminderTime.substring(0,reminderTime.length()-3)+ ':00';
taskrecord.ReminderDateTime = dateTime.valueOf(stringDate);
if(reminderTime.substring(reminderTime.length()-2,reminderTime.length()) == 'PM')
taskrecord.ReminderDateTime = taskrecord.ReminderDateTime.addHours(12);
}
}

private String FormatDate(Date dt) {
string year = String.valueOf(dt.year());
string month = String.valueOf(dt.month());
string day = String.valueOf(dt.day());
string stringDate = year + '-' + month + '-' + day;
return stringDate;
}

Please note that I've now modified the function FormatDate(), after you pointed out that there might be some issues with Date to String conversion. EARLIER it was this INSTEAD of FormatDate function :

 

String.valueOf(reminderDate.Valid_Until__c)

 

In above code, please take the assumptions:

reminderTime is ALWAYS in this Format: 12:00 AM to 11:30 PM
reminderDate.Valid_Until__c is a Date value.

 

I hope it will help, in any case let me know if u need anything else.

 

Thanks.

ehrenfossehrenfoss

Another possible cause:  Calling a controller method with apex:inputText that has a private set method.

 

<apex:inputText value="{!Method}" />

 

public String Method{ get { return 'grrr!'; } private set; }

 

SVSFSVSF

When I am trying to upload a package I am getting the following error can you help with this

 An internal server error has occurred

An error has occurred while processing your request.The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience.


Thank you again for your patience and assistance. And thanks for using salesforce.com!

Error ID: 

Mohammad Asif BangashMohammad Asif Bangash
I also get this error when importing certain Articles  (Knowledge). I am importing several hundred files and about one in every 10 gives me the error. I think it may be related to languages but not 100% sure. Any help is welcome. I have checked and all languages are supported and included in the knowledge settings Thanks, 
Katie MuellerKatie Mueller
I am receiving the same error when saving case comments - does not happen every time I hit save, but this is affecting other team members as well - any other insight to this issue and why it occurs?
 
Jacques CantinJacques Cantin
I am in trailhead in the following topic:
Prepare Your Salesforce Org for Users 
Create a Unique Account List View
and I get this:
An internal server error has occurred
Error ID: 989884208-282514 (593159219)
What do I do?