1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SalesforceのDataLoaderをProxy(Basic認証)環境下で利用する方法

Posted at

前提条件

DataLoader : v63.0
この記事は、2025/05頃に書かれています。

バージョンや時代によってはセキュリティの制限の掛かり方が変わる可能性があります。
公式ドキュメントに書かれていても良いような気がするものの、それっポイ情報が見当たらず、DataLoaderのJARファイルをデコンパイルとかして解決したので、同じハマり方をした人に届いたらいいな?と自分への備忘も兼ねて

DataloaderのProxy関連の設定

DataloaderのHTTPクライアントは内部的に2系統利用されている。

  • 純粋なHTTPS通信
    org.apache.http.impl.client.HttpClientBuilder
    を使っている。

javaの起動オプションでProxy情報(Basic認証情報)を引数で渡す

  • Salesforceが提供するAPIをDataloderが実行する時
    Saleforceが独自拡張したHTTPクライアント

GUIからProxyの設定が可能

GUIからの設定

「メニュー」→「settings」→「settings」

をひらいて、

image.png

  • Proxy host:
  • Proxy port:
  • Proxy username:
  • Proxy password:

を設定して、「OK」ボタンを押下する。

「メニュー」→「File」→「Exit」
で、DataLoaderを、きちんと終了する。

※ 再度、dataloader.batを起動して、きちんと設定が保存されていること確認する。

javaの起動引数の与え方

org.apache.http.impl.client.HttpClientBuilder
で動作しているHTTPクライアントには、Dataloader設定ファイルの内容は作用しないため、
dataloader_v63.0.0\util\util.bat
を直接編集します。

:runDataLoader
    CALL :checkJavaVersion
    java -cp "%~dp0..\*" com.salesforce.dataloader.process.DataLoaderRunner %*
    EXIT /b %ERRORLEVEL%

上記の、javaを起動している部分(java -cp ~)に引数を追加します。

  • -Djdk.http.auth.proxying.disabledSchemes=""
  • -Djdk.http.auth.tunneling.disabledSchemes=""
  • -Dhttp.proxyHost=Proxyホスト名
  • -Dhttp.proxyPort=Proxyポート番号
  • -Dhttp.proxyUser=ユーザ名
  • -Dhttp.proxyPassword=パスワード
  • -Dhttps.proxyHost=Proxyホスト名
  • -Dhttps.proxyPort=Proxyポート番号
  • -Dhttps.proxyUser=ユーザ名
  • -Dhttps.proxyPassword=パスワード
:runDataLoader
    CALL :checkJavaVersion
java  -Djdk.http.auth.proxying.disabledSchemes=""  -Djdk.http.auth.tunneling.disabledSchemes=""  -Dhttp.proxyHost=Proxyホスト名  -Dhttp.proxyPort=Proxyポート番号  -Dhttp.proxyUser=ユーザ名  -Dhttp.proxyPassword=パスワード  -Dhttps.proxyHost=Proxyホスト名  -Dhttps.proxyPort=Proxyポート番号  -Dhttps.proxyUser=ユーザ名  -Dhttps.proxyPassword=パスワード -cp "%~dp0..\*" com.salesforce.dataloader.process.DataLoaderRunner %*
    EXIT /b %ERRORLEVEL%

<参考>

AWSの相談・お困りごとありましたら、、、

AWSの活用方法や、お困りごとの相談、随時、お仕事の受付しております。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?