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
OmshiOmshi 

Data Loader - Error creating Data Access Object

Hi,

 

I'm newbie to salesforce.com.

I'm trying to export data from salesforce.com to SQL Server 2005 through

the Apex Data Loader.

When I run the process through command line I get this error:

FATAL [databaseExportAccountVeryShort] controller.Controller createDao (Controller.java:186) - Error creating data access object

Here is my database-conf.xml:

 

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
  <bean id="dbDataSource"
      class="org.apache.commons.dbcp.BasicDataSource"
      destroy-method="close">
    <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="url" value="jdbc:sqlserver://Localhost:1433;databaseName=MyDatabase;"/>
    <property name="username" value="MyUser"/>
    <property name="password" value="MyPassword"/>
  </bean>
  <bean id="Account_DataLoader"
      class="com.salesforce.lexiloader.dao.database.DatabaseConfig"
      singleton="true">
    <property name="sqlConfig" ref="insertAccountVeryShort"/>
    <property name="dataSource" ref="dbDataSource"/>
  </bean>
  <bean id="insertAccountVeryShort"
      class="com.salesforce.lexiloader.dao.database.SqlConfig" singleton="true">
    <property name="sqlString">
        <value>
            INSERT INTO dbo.Account_DataLoader (Id,Account_Open_Date__c)
            VALUES (@Id@, @Account_Open_Date__c@)
        </value>
    </property>
    <property name="sqlParams">
        <map>
            <entry key="Id" value="java.lang.String"/>
            <entry key="Account_Open_Date__c"  value="java.lang.String"/>
        </map>
    </property>
  </bean>
</beans>

 

I have a matching part in process-conf.xml with dataAccess.type=databaseWrite

and in my command line the process name is insertAccountVeryShort.

 

Can anyone help me with that?

 

Thanks,

Omshi.

NiloveNilove

hey,

 

I am having the same problem. Did you get it working?

 

Thanks

NIlesh 

Amber Parsons 2Amber Parsons 2
I found that I get this error when I try to extract data to a file located in a folder that is git was initialized in.  As soon as I select a folder that is not managed by git then it works just fine.
kjunkjun
@Amber Parson 2, I also changed where I extract my data and it worked. 
Wajih Naqvi 8Wajih Naqvi 8
I got the same error, I was trying to override a previous/existing export. And I had that file open, off course when I closed the file it worked.