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
shreemganeshshreemganesh 

Where and how to define the username and password, if we r running from command line

I am trying to run from command line, so i defined bt config.properties file as follow,
 
#Loader Config
#Thu Jun 15 17:39:34 PDT 2006
sfdc.endpoint=https\://www.salesforce.com
sfdc.proxyHost=10.236.145.251
sfdc.proxyPort=8888
sfdc.username=shreemganesh@rediffmail.com
sfdc.password=
sfdc.process=C:\Program Files\salesforce.com\AppExchange Data Loader 8.0\samples\conf\process-conf.xml
sfdc.database=C:\Program Files\salesforce.com\AppExchange Data Loader 8.0\samples\conf\database-conf.xml
 
now for "sfdc.password" whether i have to give actual password or the encrypt value of the actual password or else where to define the username and password
 
my process.config file will be like following,
 
@echo off
if not [%1]==[] goto run
echo.
echo Usage: process ^<configuration directory^> ^[process name^]
echo.
echo      configuration directory -- directory that contains configuration files,
echo          i.e. config.properties, process-conf.xml, database-conf.xml
echo.
echo      process name -- optional name of a batch process bean in process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir AccountInsert
echo.
echo          If process name is not specified, the parameter values from config.properties
echo          will be used to run the process instead of process-conf.xml,
echo          for example:
echo.
echo              process ../myconfigdir
echo.
goto end
:run
set PROCESS_OPTION=
if not [%2]==[] set PROCESS_OPTION=process.name=%2
..\_jvm\bin\java.exe -cp ..\AppExchangeDataLoader.jar -Dsalesforce.config.dir=%1 com.salesforce.lexiloader.process.ProcessRunner %PROCESS_OPTION%
java -Xms256m -Xmx256m -Dsalesforce.config.dir=C:\Program Files\salesforce.com\AppExchange Data Loader 8.0\conf –jar AppExchangeDataLoader.jar

:end
 
so from the command prompt, i am calling as,
 
C:\Program Files\salesforce.com\AppExchange Data Loader 8.0\bin>process ../conf
 
Please help to resolve this issue
chris@ccrnchris@ccrn
I have the encrypted password in both the sample.key file and the process-conf.xml file and recieve the following error.
 
2007-04-12 15:59:17,562 ERROR [accountUpsertProcess] config.Config decryptProper
ty (Config.java:598) - Error loading parameter: sfdc.password of type: java.lang
.String
javax.crypto.BadPaddingException: Given final block not properly padded
        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
        at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275)
        at javax.crypto.Cipher.doFinal(DashoA12275)
        at com.salesforce.lexiloader.security.EncryptionUtil.decryptString(Encry
ptionUtil.java:197)
        at com.salesforce.lexiloader.config.Config.decryptProperty(Config.java:5
92)
        at com.salesforce.lexiloader.config.Config.postLoad(Config.java:547)
        at com.salesforce.lexiloader.config.Config.loadParameterOverrides(Config
.java:573)
        at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.jav
a:106)
        at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.ja
va:228)
2007-04-12 15:59:17,562 FATAL [accountUpsertProcess] process.ProcessRunner run (
ProcessRunner.java:156) - Error loading parameter: sfdc.password of type: java.l
ang.String
Exception in thread "main" java.lang.RuntimeException: com.salesforce.lexiloader
.exception.ParameterLoadException: Error loading parameter: sfdc.password of typ
e: java.lang.String
        at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.jav
a:157)
        at com.salesforce.lexiloader.process.ProcessRunner.main(ProcessRunner.ja
va:228)
Caused by: com.salesforce.lexiloader.exception.ParameterLoadException: Error loa
ding parameter: sfdc.password of type: java.lang.String
        at com.salesforce.lexiloader.config.Config.decryptProperty(Config.java:5
99)
        at com.salesforce.lexiloader.config.Config.postLoad(Config.java:547)
        at com.salesforce.lexiloader.config.Config.loadParameterOverrides(Config
.java:573)
        at com.salesforce.lexiloader.process.ProcessRunner.run(ProcessRunner.jav
a:106)
        ... 1 more
Caused by: javax.crypto.BadPaddingException: Given final block not properly padd
ed
        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
        at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
        at com.sun.crypto.provider.DESCipher.engineDoFinal(DashoA12275)
        at javax.crypto.Cipher.doFinal(DashoA12275)
        at com.salesforce.lexiloader.security.EncryptionUtil.decryptString(Encry
ptionUtil.java:197)
        at com.salesforce.lexiloader.config.Config.decryptProperty(Config.java:5
92)
        ... 4 more
meertagulatimeertagulati

I am getting the same erroron Windows XP Pro

1. I generated a key put it in Sample.key

2. With the same sample.key I generated the encrypted values of my password and verified it, using encrypt.bat utility.

I doubt if the the dataloader picks up the encryption file mentioned in the process-config.xml or not. Coz I tried to remove the same which gives me an error of bad padding whereas it should have been samp.e.key filenotfound.

If anyone knows the right process please help.

Thanks

Meeta

 

meertagulatimeertagulati

:robothappy:

I got the solution !

In your config.properties file have nothing but the enpoint name...there is no need to mention any other info :)

NiruNiru

I want to pass windows username and password from my salesforce to my webservice (.net).. is it possible ?

 

AjuAju
You need to use process_conf.xml for adding proxy information(windows username/pwd).
config.properties will not suffice this.
you will have to keep config.properties almost empty apart from  this info.
sfdc.endpoint=https\://www.salesforce.com

Feel free to reach me if u need any more info.
jotmenow@gmail.com


Ajay