• DuffAlthaus
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I'm getting an error when trying to query SQL Server and insert into SFDC using Data Loader.    Invalid Fetch Size.
I'm connecting using ODBC so not sure where I can set Featch size.
2014-06-19 11:03:24,097 ERROR [CountInsertDB] action.AbstractAction handleExcept
ion (AbstractAction.java:200) - Exception occured during loading
com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Dat
abase error encountered during setup of the database configuration: queryEmploye
rCounts.  Sql error: Invalid Fetch Size.
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:149)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:110)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:98)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractActio
n.java:116)
        at com.salesforce.dataloader.controller.Controller.executeAction(Control
ler.java:124)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: java.sql.SQLException: Invalid Fetch Size
        at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:141)
        ... 7 more
22227 [CountInsertDB] ERROR com.salesforce.dataloader.action.InsertAction  - Exc
eption occured during loading
com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Dat
abase error encountered during setup of the database configuration: queryEmploye
rCounts.  Sql error: Invalid Fetch Size.
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:149)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:110)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:98)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractActio
n.java:116)
        at com.salesforce.dataloader.controller.Controller.executeAction(Control
ler.java:124)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: java.sql.SQLException: Invalid Fetch Size
        at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:141)
        ... 7 more
2014-06-19 11:03:24,122 ERROR [CountInsertDB] progress.NihilistProgressAdapter d
oneError (NihilistProgressAdapter.java:58) - Database error encountered during s
etup of the database configuration: queryEmployerCounts.  Sql error: Invalid Fet
ch Size.
22252 [CountInsertDB] ERROR com.salesforce.dataloader.action.progress.NihilistPr
ogressAdapter  - Database error encountered during setup of the database configu
ration: queryEmployerCounts.  Sql error: Invalid Fetch Size.
I'm getting an error when trying to query SQL Server and insert into SFDC using Data Loader.    Invalid Fetch Size.
I'm connecting using ODBC so not sure where I can set Featch size.
2014-06-19 11:03:24,097 ERROR [CountInsertDB] action.AbstractAction handleExcept
ion (AbstractAction.java:200) - Exception occured during loading
com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Dat
abase error encountered during setup of the database configuration: queryEmploye
rCounts.  Sql error: Invalid Fetch Size.
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:149)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:110)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:98)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractActio
n.java:116)
        at com.salesforce.dataloader.controller.Controller.executeAction(Control
ler.java:124)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: java.sql.SQLException: Invalid Fetch Size
        at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:141)
        ... 7 more
22227 [CountInsertDB] ERROR com.salesforce.dataloader.action.InsertAction  - Exc
eption occured during loading
com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Dat
abase error encountered during setup of the database configuration: queryEmploye
rCounts.  Sql error: Invalid Fetch Size.
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:149)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:110)
        at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseRe
ader.java:98)
        at com.salesforce.dataloader.action.AbstractAction.execute(AbstractActio
n.java:116)
        at com.salesforce.dataloader.controller.Controller.executeAction(Control
ler.java:124)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:149)
        at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.jav
a:100)
        at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.ja
va:253)
Caused by: java.sql.SQLException: Invalid Fetch Size
        at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingSt
atement.java:279)
        at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(Data
baseReader.java:141)
        ... 7 more
2014-06-19 11:03:24,122 ERROR [CountInsertDB] progress.NihilistProgressAdapter d
oneError (NihilistProgressAdapter.java:58) - Database error encountered during s
etup of the database configuration: queryEmployerCounts.  Sql error: Invalid Fet
ch Size.
22252 [CountInsertDB] ERROR com.salesforce.dataloader.action.progress.NihilistPr
ogressAdapter  - Database error encountered during setup of the database configu
ration: queryEmployerCounts.  Sql error: Invalid Fetch Size.

Hi All,

   I have this piece of code here, given below:

 

     <apex:pageBlock id="tEntryWeekSelectionPageBlock">
         <apex:actionRegion >  
         <apex:pageBlockSection id="selectedWeek" title="Project List for {!$User.FirstName} {!$User.LastName}" columns="2" collapsible="true">
              <apex:pageBlockSectionItem id="selectedWeek">
              <apex:outputLabel for="selectedWeek">Week Beginning</apex:outputLabel>
                  <apex:panelGroup >
                  <apex:selectList value="{!selectedWeek}" multiselect="false" size="1">
                      <apex:selectOptions value="{!Weeks}"/>
                  </apex:selectList>  
                 </apex:panelGroup>
              </apex:pageBlockSectionItem>
              <apex:commandButton value="Go"  action="{!setWeek}" rerender="timeEntryBlock, messageBlock"/>
        </apex:pageBlockSection>
        </apex:actionRegion>  
        </apex:pageBlock>

 

Now the action="{!setWeek}" is working perfectly on click of the button. But now I want to perform the same action on change of value in my apex:selectList value="{!selectedWeek}", when I make the given change to my code , it throws an error.

  <apex:selectList value="{!selectedWeek}" multiselect="false" size="1" onchange="!{setWeek}">

Can anyone please help  me with this?

Hi,

 

I am trying to pull data from MS Access DB and insert into Salesforce. I was having trouble in getting the configuration done.

 

I tried to make it very simple, and created a database TestDBForCLI.mdb with one table TestTable. This table has only two columns and currently only 1 row of data. I am still getting the error message:

  Sql error: Invalid Fetch Size.

 

Process-conf.xml

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
    <bean id="AccessPullProcess"
          class="com.salesforce.dataloader.process.ProcessRunner"
          singleton="false">
        <description>AccountMaster job gets the Customer record updates from ERP (Oracle financials) and uploads them to salesforce using 'upsert'.</description>
        <property name="name" value="AccessPullProcess"/>
        <property name="configOverrideMap">
            <map>
	<entry key="sfdc.debugMessages" value="true"/>
                <entry key="sfdc.debugMessagesFile" value="c:\dataloader\samples\status\accountMasterSoapTrace.log"/>
                <entry key="sfdc.endpoint" value="https://login.salesforce.com"/>
                <entry key="sfdc.username" value="myUserName"/>
                <entry key="sfdc.password" value="myPassword"/>
	<entry key="sfdc.proxyHost" value="myProxy"/>
        	<entry key="sfdc.proxyPort" value="8000"/>
	<entry key="sfdc.timeoutSecs" value="600"/>
                <entry key="sfdc.loadBatchSize" value="200"/>
                <entry key="sfdc.entity" value="Account"/>
                <entry key="process.operation" value="insert"/>
                <entry key="process.mappingFile" value="C:\Documents and Settings\jerun\Desktop\Developer\DataLoader\Jerun\AccMap.sdl"/>
	<entry key="dataAccess.name" value="queryAcc"/>
                <entry key="dataAccess.type" value="databaseRead"/>
                <entry key="process.initialLastRunDate" value="2005-12-01T00:00:00.000-0800"/>
            </map>
        </property>
    </bean>
</beans>

 

Database-conf.xml

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
	<bean id="queryAcc" class="com.salesforce.dataloader.dao.database.DatabaseConfig" singleton="true">
		<property name="sqlConfig" ref="AccountPull"/>
		<property name="dataSource" ref="connectionParams"/>
	</bean>
	<bean id="connectionParams" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName" value="sun.jdbc.odbc.JdbcOdbcDriver"/>
		<property name="url" value="jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Documents and Settings\jerun\Desktop\Developer\DataLoader\Jerun\TestDBForCLI.mdb"/>
		<property name="username" value=""/>
		<property name="password" value=""/>
		<property name="defaultAutoCommit" value="true"/>
	</bean>
	<bean id="AccountPull" class="com.salesforce.dataloader.dao.database.SqlConfig" singleton="true">
		<property name="sqlString">
			<value>select MyName from TestTable</value>
		</property>
		<property name="columnNames">
			<list>
        		<value>MyName</value>				
			</list>
		</property>
	</bean>
</beans>

 

And I got the error message as :

 

2011-09-26 21:25:09,734 ERROR [AccessPullProcess] database.DatabaseReader setupQuery (DatabaseReader.java:146) - Database error encountered during setup of the database configuration: queryAcc.  Sql error: Invalid Fetch Size.
java.sql.SQLException: Invalid Fetch Size
    at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(JdbcOdbcStatement.java:826)
    at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingStatement.java:276)
    at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(DatabaseReader.java:140)
    at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseReader.java:109)
    at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseReader.java:97)
    at com.salesforce.dataloader.util.DAORowUtil.calculateTotalRows(DAORowUtil.java:59)
    at com.salesforce.dataloader.dao.database.DatabaseReader.getTotalRows(DatabaseReader.java:209)
    at com.salesforce.dataloader.action.AbstractLoadAction.<init>(AbstractLoadAction.java:82)
    at com.salesforce.dataloader.action.BasePartnerLoadAction.<init>(BasePartnerLoadAction.java:44)
    at com.salesforce.dataloader.action.InsertAction.<init>(InsertAction.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at com.salesforce.dataloader.action.OperationInfo.instantiateAction(OperationInfo.java:66)
    at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:104)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:124)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:75)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:227)
2011-09-26 21:25:09,750 ERROR [AccessPullProcess] util.DAORowUtil calculateTotalRows (DAORowUtil.java:72) - Error Calculating Total Rows
com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Database error encountered during setup of the database configuration: queryAcc.  Sql error: Invalid Fetch Size.
    at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(DatabaseReader.java:148)
    at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseReader.java:109)
    at com.salesforce.dataloader.dao.database.DatabaseReader.open(DatabaseReader.java:97)
    at com.salesforce.dataloader.util.DAORowUtil.calculateTotalRows(DAORowUtil.java:59)
    at com.salesforce.dataloader.dao.database.DatabaseReader.getTotalRows(DatabaseReader.java:209)
    at com.salesforce.dataloader.action.AbstractLoadAction.<init>(AbstractLoadAction.java:82)
    at com.salesforce.dataloader.action.BasePartnerLoadAction.<init>(BasePartnerLoadAction.java:44)
    at com.salesforce.dataloader.action.InsertAction.<init>(InsertAction.java:44)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at com.salesforce.dataloader.action.OperationInfo.instantiateAction(OperationInfo.java:66)
    at com.salesforce.dataloader.controller.Controller.executeAction(Controller.java:104)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:124)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:75)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:227)
Caused by: java.sql.SQLException: Invalid Fetch Size
    at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(JdbcOdbcStatement.java:826)
    at org.apache.commons.dbcp.DelegatingStatement.setFetchSize(DelegatingStatement.java:276)
    at com.salesforce.dataloader.dao.database.DatabaseReader.setupQuery(DatabaseReader.java:140)
    ... 16 more

 

Any pointers on how to fix this ? Does anybody have a working configuration file for MS Access data extraction ?

 

Regards,

 

Jerun Jose

In Winter 11, we can now have Attachments on Tasks. I have a trigger (after update, after insert, after delete, after undelete) on Attachment which will update a custom field on Task with the Attachment Count. This works fine when adding or deleting Attachments in my Unit Tests as well as through UI on the Attachment screen if I update the attachment.

 

My issue is that if a user is on the Task "Edit" page, there is the button to "Attach File" on the Attachment section which gives you the popup to attach multiple files. When the user adds Attachments via this page the Trigger isn't firing for Attachments. I don't see the Attachment trigger even firing in the debug logs. Very odd. Anyone have any suggestions or similar experience?  Alternative solutions are accepted also.

 

This isn't a typical Master-Detail Relationship so you can't do Roll-Up Summary fields.


Thanks.

I have a question regarding a "export data to excel" on a Visualforce page.

For example, I retrieve a bunch of records of a SObject on the extension class in a List ( like "List<Account>").
I want to create a button or a link on the visualforce page to export all the records inside that list to Excel.

Is that possible, does anybody knows how to do it ?

  • August 30, 2010
  • Like
  • 0