You need to sign in to do that
Don't have an account?

External Entry Point Error
Hi, this is related to my earlier post here
I have a fairly large test method that gives me 90% test coverage in sandbox with no problems, but then when I try to migrate it to production, I’m suddenly getting an external entry point error on the last line. I talked to my co-worker and she says it’s because there is some inconsistency between sandbox and production, but I can’t seem to figure out how to fix it. I checked all the validation rules and things like that and can’t find any inconsistencies.
Has anyone come across this before? When something works well in sandbox but then you have this sort of trouble getting it into production?
I have a fairly large test method that gives me 90% test coverage in sandbox with no problems, but then when I try to migrate it to production, I’m suddenly getting an external entry point error on the last line. I talked to my co-worker and she says it’s because there is some inconsistency between sandbox and production, but I can’t seem to figure out how to fix it. I checked all the validation rules and things like that and can’t find any inconsistencies.
Has anyone come across this before? When something works well in sandbox but then you have this sort of trouble getting it into production?
Ok problem solved. It was an issue of me not filtering out the inactive products. So much trouble for one little line. The interesting part was the actual debugging process. Since I was running out of room in the debug log that came up when I tried to import it, I figured I could run the code in production for a specific contract through the system log. That's where I saw that I was collecting too many products and when it came to using them to look for pricebook entries, the whole thing fell appart because it was looking for inactive products. Just an idea, but if anyone else runs into this sort of problem, you can try debugging through production's system log ^_^
All Answers
Hey
Yes, it happens quite often. Can you post the piece of code causing the problem, and if you have anymore of the error could you post that too please?
Wes
According to the log, it's the last line test.stopTest(); that causes it though it's not very specific. Part of what frustrates me is that it doesn't give me too much information. The idea of the class is that I need to create opportunities from contracts whose end date is 90 days from now.
Hey
Looks okay, I'm thinking it some peculiarity that Salesforce hasn't dealt with properly. Could you move the test method into it's own test class, so that the class containing the schedule code is completely seperate from the class containing it's test code. Just a shot in the dark really..
Wes
If all else fails (and if you have a sandbox to spare) refresh an existing sandbox to make sure you have the most current configuration- and do your testing there.
I usually leave plenty of debug statements in production, so if a problem does arise, it's easier to pinpoint the error.
By the way, you can still run tests in production when you separate the test method.
Ok problem solved. It was an issue of me not filtering out the inactive products. So much trouble for one little line. The interesting part was the actual debugging process. Since I was running out of room in the debug log that came up when I tried to import it, I figured I could run the code in production for a specific contract through the system log. That's where I saw that I was collecting too many products and when it came to using them to look for pricebook entries, the whole thing fell appart because it was looking for inactive products. Just an idea, but if anyone else runs into this sort of problem, you can try debugging through production's system log ^_^
Can anybody give me a clear explanation on the exact meaning of an External Entry Point Error and what causes it? Also, if possible how to fix it as well. Any insight will help .... Thanks in adavance
Developer script exception from Exelon Energy : CreditAppExtension : Attempt to de-reference a null object
Apex script unhandled exception by user/organization: 00570000000sRHO/00D700000008WI2
Visualforce Page: /apex/CreditAppExtension
caused by: System.NullPointerException: Attempt to de-reference a null object
Class.CreditAppExtension.save: line 290, column 16
External entry point
Please help me for solving this error!!
You need to go though the article of salesforce aggregate function. Actually what i understand by seeing your code, you are using the aggregate function SUM() COUNT() in your for loop SOQL query which will give error.
You need to do soemthing like this
" Visualforce Error
System.NullPointerException: Attempt to de-reference a null object
External entry point "
Any suggestions will really help. Thanks in advance.
Code Piece:
<apex:page controller="SinglepicklistforMyBook" action="{!autoRun}" sidebar="false">
<apex:form >
<table align="center" cellpadding="15" >
<td>Select Property Type :-</td>
<td><apex:selectList size="4" value="{!SelectValue}" multiselect="true">
<apex:selectOptions value="{!statusOptions}"/>
</apex:selectList></td>
<tr> <td>List of Selected Values For Books of Type:</td>
<td><apex:outputText label="You have selected:" value="{!SelectValue}" /> </td> </tr>
<div align="center" draggable="false" >
<apex:commandButton style="float:centre" value="Show Result" onclick="{!ShowResult}"/>
<apex:actionSupport reRender="refresh" event="onkeyup" />
</div>
<apex:pageBlock >
<apex:pageblockTable align="center" cellpadding="15" value="{!ShowResult}" var="O" title="List of Selected Books">
<apex:column value="{!O.Name}"/>
<apex:column value="{!O.Status_Book__c}"/>
</apex:pageblockTable>
</apex:pageBlock>
</table>
</apex:form>
</apex:page>
*************************
Controller
*************************
public with sharing class SinglepicklistforMyBook {
public List<SelectOption> statusOptions { get;set; }
public List<String> selectValue {get;set;} //for multiselect
// public string selectValue { get;set; } //in case multiselect =false
List<Book__c> showresult;
public List<Book__c> getShowResult() {
//showresult= [Select Name, Status_Book__c from Book__c where Status_Book__c = :selectValue ]; // for multiselect = false
showresult= [Select Name, Status_Book__c from Book__c where Status_Book__c IN :selectValue]; //for multiselect
return showresult;
}
public void autoRun()
{
Schema.DescribeFieldResult statusFieldDescription = Book__c.Status_Book__c.getDescribe();
statusOptions = new list<SelectOption>();
for (Schema.Picklistentry picklistEntry : statusFieldDescription.getPicklistValues())
{
statusOptions.add(new SelectOption(pickListEntry.getValue(),pickListEntry.getLabel()));
}
}
}
Please try the below code and let me know if it helps
VF
Controller
Just a Quick Suggestion, every time the button is clicked the page will be refreshed. If you do it with the command button action attribute and Refresh Asynchronously only a section of a page, hence improving the User exp. and it will not it the server multiple times. I have added some commented Code, please go through it and if any doubt comes up please let me know.