• Matt Bingham
  • NEWBIE
  • 15 Points
  • Member since 2014
  • Engineer
  • BigAss


Badges

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hello,

As part of my managed package I'm using the standard Salesforce functionality Exception.getStackTraceString() to get the stacktrace of an exception as a String for better error handling and logging. Unfortunately, this functionality seems to work differently depending on the org the package is installed in, i.e. I get full stacktraces for one org but no stacktraces at all in all other orgs.

There is no documentation in the official docs as to when stacktraces are produced or any possible settings for enabling/disabling stacktraces for managed packages. This feature is critical for being able to quickly fix bugs and any help would be greatly appreciated. 
Hi All,

Since the Spring '16 update a lot of my tests went in the red. It seems that the exception.getStackTraceString() method doesn't return any info anymore. Is anyone else seeing this?

I use the getStackTraceString() method to get info about the class in which the exception occurred. Does anyone know a workaround?

Regards,
Robert.
I am trying to automate a data load using the Command Line tools and have everything working smoothly but it is taking 10x longer than if I do it through the Data Loader GUI.

Below is an exert from my process-conf.xml

>     <bean id="csvUpsertOrderItem"
>           class="com.salesforce.dataloader.process.ProcessRunner"
>           singleton="false">
>         <description>Upsert Transaction Headers into Orders standard object.</description>
>         <property name="name" value="csvUpsertOrderItem"/>
>         <property name="configOverrideMap">
>             <map>
>                 <entry key="sfdc.debugMessages" value="false"/>
>                 <entry key="sfdc.endpoint" value="CUSTOM ENDPOINT"/>
>                 <entry key="sfdc.username" value="USERNAME"/>
>                 <entry key="sfdc.password" value="ENCRYPTED PASSWORD"/>
>                 <entry key="process.encryptionKeyFile" value="C:\Program Files (x86)\salesforce.com\Data Loader\bin\key.txt"/>
>                 <entry key="sfdc.timeoutSecs" value="540"/>
>                 <entry key="sfdc.loadBatchSize" value="2000"/>
>                 <entry key="sfdc.entity" value="OrderItem"/>
>                 <entry key="process.operation" value="upsert"/>
>                 <entry key="sfdc.useBulkApi" value="true"/>
>                 <entry key="sfdc.bulkApiSerialMode" value="true"/>
>                 <entry key="sfdc.externalIdField" value="SlId__c"/>
>                 <entry key="process.mappingFile" value="C:\Users\User\Google Drive\Automation\OrdersLine21Jan.sdl"/>
>                 <entry key="process.outputError" value="C:\Users\User\downloads\Logs\errorUpsertOrderItem.csv"/>
>                 <entry key="process.outputSuccess" value="C:\Users\User\downloads\Logs\successUpsertOrderItem.csv"/>
>                 <entry key="dataAccess.name" value="C:\Users\User\Google Drive\Automation\JAEG_TransactionDetails.csv" />
>                 <entry key="dataAccess.type" value="csvRead" />
>             </map>
>         </property>     </bean>

From my research, it seems to be something to do with either the debug log (I think most likely) or batch size.

I have set the sfdc.debugMessages to 'false' so it is not writing the files but it does seem to write it to the command screen.  I feel this could be causing the problem, is there a default log setting?  Maybe a process command setting?

In the data loader document http://resources.docs.salesforce.com/200/6/en-us/sfdc/pdf/salesforce_data_loader.pdf it says the max sfdc.loadBatchSize is 200 but through the UI it sets it to 2000 when batch is true.  If that does restrict it, that could explain it.

I just cant find anything recent about this problem, anyone had any luck doing this at full pace recently?
Hello,

I want implement Queueable Apex on Sandbox (Winter 15) and I follow the example on this article : https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_queueing_jobs.htm but when i launch test class, i have this error :  "This method is not implemented" 
And, in Debug log, i have : FATAL_ERROR Internal Salesforce.com Error

Code apex : 
public class AsyncExecutionExample implements queueable {
    public void execute(queueablecontext context) {
        system.debug('test');
    }
}

On my Dev Org, this code works.

Someone already encountered this problem? Thank you for your help

Hi Chatter Gurus,

 

We've created an OAuth 2.0 application that works perfectly against the standard SFDC environment using the basic (non-customized) developer and production environments.  We point the web application to point to login.salesforce.com URL for authorization of the remote application and everything works perfectly from point of "Allow" of the authentication through to the callback where we store token information etc. in our application for future requests.  This works as designed.

 

Our customer has a my domain URL configured through SFDC, i.e.: https://na8.salesforce.com/help/doc/en/domain_name_overview.htm

 

The problem is that there is some issue is happening with the application when it is deployed to or customer's environment.  There is a problem in the OAuth application shortly after the customer user logs in for the OAuth application authentication which is causing the complete OAuth flow to fail.  Here's the flow after our application is deployed to the client and we've verified the application is started and all standard system checks pass as working:

  1. Our OAuth web client application calls for an authorization url by pointing to the base URL of login.salesforce.com
  2. User clicks on the new authorization URL and an OAuth windows appears for login.salesforce.com
  3. the user logs in at the login.salesforce.com login page
  4. The user is presented with the allow or deny application page
  5. The user "Allows" authorization of the Remote Access application

At the last step, once the user clicks "Allow", the URL in the address bar of the OAuth authorization window changes to the customer's company "My Domain" URL, for example,

https://customernamehere.my.salesforce.com/setup/secur/RemoteAccessAuthorizationPage.apexp?source=l86Hcy6qEKtWNqzXVErZDlmcRQs0D_HBE55M........

 

...and the callback fails.  At this point we are hoping the discussion boards can lend some insight.

 

We are not APEX developers per se, so we are not sure if the RemoteAccessAuthorizationPage.apexp page is something custom our customer has developed or if this is something standard with some SFDC configuration we are not aware of.

 

There are NO error messages returned to the OAuth client application.  We are not sure what log to ask the client to refererence if there is one that can be referenced for this failed OAuth Flow.

 

We have been unable to replicate the error in our test environments.

 

If someone could lend some insight to the issue abve that would be greatly appreciated.

 

Cheers,

Christian

Hi All,

 

when I am loading a visualforce page, I want the local system IP address to be printed on the screen .Is there any way  to do this?.

 

If any example with code will much appriciated.

 

 

When using the Identity URL, I have a client who is getting Bad_OAuth_Token. The same code works in the same instance for other clients. The instance is na16.

The code is:
static public String protocolAndHost {
        get {
            if (protocolAndHost == null) {
                //memoize
                String orgId = UserInfo.getOrganizationId();
                String userId = UserInfo.getUserId();
                String sessionId = UserInfo.getSessionId();

                //use getSalesforceBaseUrl within batches and schedules (not Visualforce), and fix inconsistent protocol
                if (sessionId == null) return Url.getSalesforceBaseUrl().toExternalForm().replace('http:', 'https:');

                PageReference pr = new PageReference('/id/' + orgId + '/' + userId);
                pr.getParameters().put('oauth_token', sessionId);
                pr.getParameters().put('format', 'json');

                //within test context use url class, else derive from identity api
                String data = Test.isRunningTest() ? '{"urls": {"rest": "' + Url.getSalesforceBaseUrl().toExternalForm() + '"}}' : pr.getContent().toString();
                Map<String,Object> result = (Map<String,Object>)Json.deserializeUntyped(data);
                Map<String,Object> urls = (Map<String,Object>)result.get('urls');

                //compose pod from the REST endpoint
                Url rest = new Url((String)urls.get('rest'));
                protocolAndHost = rest.getProtocol() + '://' + rest.getHost();
            }

            return protocolAndHost;
        }
    }


The error return is:
403 status code return from request to https://na16.salesforce.com/id/00Dj0000001tO6KEAU/005j000000BYfmLAAT?format=json&oauth_token=00Dj0000001tO6K%21AQwAQHsiQOYRd7vpLI2.iY0vRYMzUbbiXUkZQiLdx593O2hxAbtIrbjU3TfYa6KTNPBAeVA.Pg3pUQQOrWlJgbsbG7ppWcU8&inline=1
An unexpected error has occurred. Your solution provider has been notified.

Please help!
Hello,

I want implement Queueable Apex on Sandbox (Winter 15) and I follow the example on this article : https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_queueing_jobs.htm but when i launch test class, i have this error :  "This method is not implemented" 
And, in Debug log, i have : FATAL_ERROR Internal Salesforce.com Error

Code apex : 
public class AsyncExecutionExample implements queueable {
    public void execute(queueablecontext context) {
        system.debug('test');
    }
}

On my Dev Org, this code works.

Someone already encountered this problem? Thank you for your help