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
tony2009tony2009 

Data loader error : FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log

Hi Guys, 

 

I am trying to use data loader command line uploading the csv data. 

 

But everytime I got some error message like:

 

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
Access is denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java
:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:3
07)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.ja
va:295)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurat
or.java:176)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfi
gurator.java:191)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOM
Configurator.java:523)
at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.ja
va:436)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:999)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:867)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:773)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionCon
verter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at com.salesforce.dataloader.process.ProcessRunner.<clinit>(ProcessRunne
r.java:82)

 

From http://files.meetup.com/1589707/Force.com%20Certified%20Developer.pdf, I know this file locate in %TEMP%

 

But my %TEMP% envirenment variable is C:\Users\TonyG\AppData\Local\Temp.

 

 

my config file looks like:

 

<beans>

<bean class="com.salesforce.dataloader.process.ProcessRunner" id="BusinessUnits1"
singleton="false">
<property name="name" value="BusinessUnits1" />
<property name="configOverrideMap">
<map>
<entry key="sfdc.debugMessages" value="true"/>
<entry key="sfdc.debugMessagesFile"
value="C:\Users\TonyG\Desktop\v8\1.log"/>
<entry key="sfdc.endpoint" value="https://login.salesforce.com" />
<entry key="sfdc.username" value="XXXX@XXXX.com" />
<entry key="sfdc.password" value="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" />
<entry key="process.encryptionKeyFile" value="C:\Users\TonyG\Desktop\v8\key.txt" />
<entry key="sfdc.timeoutSecs" value="600" />
<entry key="sfdc.loadBatchSize" value="200" />
<entry key="sfdc.entity" value="xpl__BusinessUnit__c" />
<entry key="process.operation" value="upsert" />
<entry key="sfdc.externalIdField" value="xpl__ExternalID__c" />
<entry key="process.mappingFile" value="C:\Users\TonyG\Desktop\v8\mapping\BusinessUnits.sdl" />
<entry key="dataAccess.name" value="C:\Users\TonyG\Desktop\v8\split\BusinessUnits1.csv" />
<entry key="dataAccess.type" value="csvRead" />
<entry key="process.outputSuccess" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_success.csv" />
<entry key="process.outputError" value="C:\Users\TonyG\Desktop\v8\results\BusinessUnits1_error.csv" />
<entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800" />
</map>
</property>
</bean>

</beans>

 

 

The data can be insert into salesforce successfully, but I keep receiving this error message.

 

How can I fix this problem?

  

Thanks in advance.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
GSBassoGSBasso

Issue is with the jar file dataloader-24.0.0-jar-with-dependencies.jar.

 

The jar contains a log4j.xml file that explicitly references the folder C:\Users\jeffrey.lai\AppData\Local\Temp.

 

This appears to have been fixed in later versions (certainly 26.0).

 

Note that if you don't uninstall Data Loader 24.0 (i.e. don't delete the jar) but simply install a newer version of Data Loader on top of 24.0 the issue may continue to occur.

All Answers

AmitSahuAmitSahu

I have not tried yet... but it seems that you are working on Windows 7 which has some additional security to work like this.

 

You can try running the command in Administrator mode. or you can try chaing the following :

 

1. You will find a file called Log-conf.xml in the Dataloader installed directory.

 

2. Open that file in any editor and search for the block :

 

<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="${java.io.tmpdir}/sdl.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="100KB" />
<param name="MaxBackupIndex" value="1" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} %M (%F:%L) - %m%n"/>
</layout>
</appender>

 

3. Change the path for log file (Bolded letters) to some other directory ,i.e. on D drive 

 

4. Save the file | Reboot the system (if possible but not mendatory)

 

NOTE : take a backup of the above file before you change anything on that....

 

tony2009tony2009

Thanks for your quick solution!

 

Yes, I do use Windows 7.

 

But I cannot find Log-conf.xml file for data loader installed directory.

 

I am using data loader v24.

 

Here is all the files under data loader installed directory.

 

https://docs.google.com/document/d/14jLTfDZ7FmfWouEtXr2u3YTzkFx2xJvOkjOlx6FJXs8/edit?pli=1

 

Regards

Tony

AmitSahuAmitSahu

That file has  to be some where on your system only..

 

On XP the path is C:\Documents and Settings\Administrator\Application Data\salesforce.com\Data Loader 24.0.0

 

Update :

 

Windows 7 path : C:\Users\AdminUserName\AppData\Roaming\salesforce.com\Data Loader 24.0.0

 

 

 

 

tony2009tony2009

I changed the path to "C:\Users\TonyG\Desktop\v8\sdl.log",  "C:/Users/TonyG/Desktop/v8/sdl.log" , "C:\\Users\\TonyG\\Desktop\\v8\\sdl.log" and different name . But I got the same error message.

 

<log4j:configuration>
<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="C:\Users\TonyG\Desktop\v8\sdl2.log" />
<param name="Append" value="true" />
<param name="MaxFileSize" value="100KB" />
<param name="MaxBackupIndex" value="1" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p [%t] %C{2} %M (%F:%L) - %m%n"/>
</layout>
</appender>

....

 

 the error message is 

 

java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
Access is denied)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java
:207)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:3
07)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.ja
va:295)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurat
or.java:176)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfi
gurator.java:191)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOM
Configurator.java:523)
at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.ja
va:436)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:999)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:867)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java
:773)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionCon
verter.java:483)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
at org.apache.log4j.Logger.getLogger(Logger.java:117)
at com.salesforce.dataloader.process.ProcessRunner.<clinit>(ProcessRunne
r.java:82)

 

 

 

Regards

Tony

AmitSahuAmitSahu

Can you try using some other drive ?

AtulRAtulR

hi,

 

I keep the file (sdl.log) on another drive still facing error.

 

log4j:ERROR setFile(null,true) call failed.

java.io.FileNotFoundException: C:\Users\jeffrey.lai\AppData\Local\Temp\sdl.log (
The system cannot find the path specified)

 

I am on window 7.

 

Is there other way out for this?

 

Thank you

tony2009tony2009

I am still facing the same problem after changing to other drive....

REM_CRMREM_CRM

Not sure if this will help but... I was getting the same error message (Vista, Data Loader version 24).

 

In my case the problem was that I started with a process-conf.xml file that was from version 16.  There is one change in the definition of the bean. 

 

Version 16: class="com.salesforce.lexiloader.process.ProcessRunner"

 

Version 24: class="com.salesforce.dataloader.process.ProcessRunner"

 

All I did was change the class command from the V16 version to the V24 version and it worked.

 

Hope that helps.

Deepak BanthiaDeepak Banthia

Hi Tony

 

Did anyone get the solution for this error. I am also getting the same error.

Kindly response back immediately

 

Thanks in Advance

Deepak

GSBassoGSBasso

Issue is with the jar file dataloader-24.0.0-jar-with-dependencies.jar.

 

The jar contains a log4j.xml file that explicitly references the folder C:\Users\jeffrey.lai\AppData\Local\Temp.

 

This appears to have been fixed in later versions (certainly 26.0).

 

Note that if you don't uninstall Data Loader 24.0 (i.e. don't delete the jar) but simply install a newer version of Data Loader on top of 24.0 the issue may continue to occur.

This was selected as the best answer
Dave EckbladDave Eckblad

GSBasso's answer is definitely correct in my case.  I'm using DL v24 with Cliq and was able to edit the log4j.xml file in the .jar with WinRAR. I replaced the offending line with

<param name="File"   value="${java.io.tmpdir}/sdl.log" />