getting issue in calling many bat file in single bat file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
komathi
Posts: 14
Joined: 18 May 2014 04:48

getting issue in calling many bat file in single bat file

#1 Post by komathi » 23 May 2014 21:18

Hi,

I'm calling 4 bat files in a single master bat file. Each bat file insert data in csv to object in salesforce.com.
If i run the individual bat files it works for any number of data (tested upto 25k)
If i run the master bat file, the first call is working fine, but in the second call getting the issue
below is the detail code

Code: Select all

::In Master bat file
call <strong>InsertImportprocessStatus.bat</strong>
echo Inserting the CustomerCodeUsage records in Pre-Staging
call InsertList.bat


Code: Select all

In InsertImportprocessStatus.bat file 

java -cp ../lib/EnhencedDataloader.jar -Dsalesforce.config.dir="../conf" com.salesforce.dataloader.process.ProcessRunnerprocess.name=insertImportprocessStatus


getting error as

ERROR [insertList] client.PartnerClient login (PartnerClient.java:1030) - Error while logging in to web service at: https://test.salesforce.com/services/Soap/u/19.0, error was: Failed to send request to test.salesforce.com/services/Soap/u/19.0
com.sforce.ws.ConnectionException: Failed to send request to https://test.salesforce.com/services/Soap/u/19.0
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:113)
at com.sforce.soap.partner.PartnerConnection.login(PartnerConnection.java:998)
at com.salesforce.dataloader.client.PartnerClient.login(PartnerClient.java:1007)
at com.salesforce.dataloader.client.PartnerClient.connect(PartnerClient.java:105)
at com.salesforce.dataloader.controller.Controller.login(Controller.java:182)
at com.salesforce.dataloader.controller.Controller.login(Controller.java:177)
at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:130)
at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:258)
Caused by: java.net.UnknownHostException: test.salesforce.com
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:97)
at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:82)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
... 7 more



This is my process conf file to load data in salesforce.com, i have similar beans for 3 more objects in same process conf file.

Code: Select all

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="insertprocessStatus" class="com.salesforce.dataloader.process.ProcessRunner" singleton="false">
        <description>Extract Staging Data.</description>
  <!--property name="ftpService" ref="ftpUpload"/-->
  <property name="name" value="insertprocessStatus"/>
         <property name="configOverrideMap">
              <map>
                <entry key="sfdc.debugMessages" value="false"/>
                  <entry key="sfdc.debugMessagesFile" value="../status/accountMasterSoapTrace.log"/>
                  <entry key="sfdc.endpoint" value="https://test.salesforce.com"/>
                  <entry key="sfdc.username" value="mayil@sfdc.com"/>
                  <entry key="sfdc.password"
value="066de8ada127a859f22236802ceab6cd36a20dcca57a11eacba26ec41ac9adb21de4eebc047ac11f"/>
                  <entry key="process.encryptionKeyFile" value="key.txt"/>
                  <entry key="sfdc.timeoutSecs" value="600"/>
                  <entry key="sfdc.loadBatchSize" value="200"/>
                  <entry key="sfdc.entity" value="DataImportprocess__c"/>
                  <entry key="process.operation" value="insert"/>
      <entry key="process.mappingFile" value="../map/DataImportprocessStatusmapper.sdl"/>
                  <entry key="process.outputError" value="../extras/errorDataImportprocessStatus.csv"/>
    <entry key="process.outputSuccess" value="../extras/successDataImportprocessStatus.csv"/>
    <entry key="dataAccess.name" value="../InputCSV/DataImportProcessStatus.csv" />
                  <entry key="dataAccess.type" value="csvRead"/>
                  <entry key="process.initialLastRunDate" value="2014-03-06T00:00:00.000-0800"/>
    <entry key="process.enableLastRunOutput" value="true" />
      <entry key="process.lastRunOutputDirectory" value="../conf/"/>
                   </map>
         </p<span style="background-color: rgb(255, 255, 255); font-family: Arial, Verdana, sans-serif; ">roperty>
</span><span style="background-color: rgb(255, 255, 255); font-family: Arial, Verdana, sans-serif; "></span></bean>

foxidrive
Expert
Posts: 6033
Joined: 10 Feb 2012 02:20

Re: getting issue in calling many bat file in single bat fil

#2 Post by foxidrive » 23 May 2014 23:10

Your problem isn't in batch code...

It looks like website you used doesn't exist. Caused by: java.net.UnknownHostException: test.salesforce.com

penpen
Expert
Posts: 1454
Joined: 23 Jun 2013 06:15
Location: Germany

Re: getting issue in calling many bat file in single bat fil

#3 Post by penpen » 24 May 2014 01:37

I'm not sure if the code is the problem, as the website really exists (browser) and as komathi said:
komathi wrote:If i run the individual bat files it works for any number of data (tested upto 25k)
It could also be, that the main batch file executes "InsertImportprocessStatus.bat" within a wrong path,
so the relative pathes of the java call are wrong, too.
Maybe an old version, or hardcoded default values are used then which leads to an error.
If that is not causing the issue, then there could be other possible reasons, but without code one has to guess.
(For example if using redirected files, a file may be blocked by another batch; environment variables are corrupted; ...).

penpen

Post Reply