SAP Knowledge Base Article - Public

1466958 - Error: "Logon failed. Unexpected error; nested exception is: java.net.UnknownHostException", when attempting to connect to Salesforce.com from Crystal Reports

Symptom

  • Unable to connect to Salesforce.com
  • Error: "Logon failed. Unexpected error; nested exception is: java.net.UnknownHostException"
  • Can successfully connect to Salesforce.com from other computers.
  • When attempting to connect to Salesforce.com from Crystal Reports, it fails with the following errors:
       
     "Logon failed. 
       Details: Unexpected error; nested exception is: 
       java.net.UnknownHostException: www.salesforce.com"
        
          
      CR 2011 - Proxy Issue.png

Environment

  • Crystal Reports 2008
  • SAP Crystal Reports 2011
  • Salesforce.com

Reproducing the Issue

  1. In Crystal Reports, create new report, and in the "Database Expert", select "Salesforce.com"
  2. Enter the Salesforce.com user credentials and click "OK"
          
    It fails with the error:
        
    "Logon failed. 
     Details: Unexpected error; nested exception is: 
      java.net.UnknownHostException: www.salesforce.com"

Cause

  • It fails because there is a Proxy configured on the network to connect to the Internet, but the proxy setting is not added to the Salesforce.com connection.

Resolution

  • Set the proxy configuration for the Crystal Reports Salesforce.com connectivity in the file: CRConfig.xml:
       
    1. Navigate to the CRConfig.xml file, which is by default at the following location:
        
         - For Crystal Reports 2008: 
            
                 C:\Program Files (x86)\Business Objects\Common\4.0\java
         
         - For Crystal Reports 2011: 
              
                 C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\

    2. Open the CRConfig.xml file in a text editor, like: Notepad.

    3. Add the following lines to the <SForce> section of the XML file, with your proxy settings:
           
         <UseProxy>TRUE</UseProxy> 
         <ProxyAddress> Add the proxy name here </ProxyAddress> 
         <ProxyPort> Add the proxy port number here </ProxyPort>
                      
      Below is an example of how the xml file will look after adding the proxy setting for the Salesforce.com connection,
      if the proxy name is: MyProxy, and the port number: 1234

          
           <SForce>
              <UseProxy>TRUE</UseProxy>
                    <ProxyAddress>MyProxy</ProxyAddress>
                    <ProxyPort>1234</ProxyPort>
                    <CacheRowSetSize>100</CacheRowSetSize>
                    <QueryBatchSize>2000</QueryBatchSize>
                    <SocketTimeout>600000</SocketTimeout>
                    <BatchLookupCacheJoinSize>200</BatchLookupCacheJoinSize>
           </SForce>
             
        
      Note: If you do not know the proxy setting at your company, contact your IT Administrator, or look at the proxy setting in Internet Explorer.

Keywords

CR, SForce , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011