+ Start a Discussion
MONICA JARAMILLO FUENTESMONICA JARAMILLO FUENTES 

Upgrade of Data Loader from version 36 to 38, scripts.

Hi Everyone, 

I will like to upgrade my version of data loader from v36 to v38, I had allready installed the new version, but for the batch process I have the following error: 

Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'.
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:80)
    at com.salesforce.dataloader.dao.database.DatabaseContext.checkConnection(DatabaseContext.java:72)
    at com.salesforce.dataloader.dao.database.DatabaseReader.checkConnection(DatabaseReader.java:244)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
    ... 8 more
2017-01-23 08:52:11,989 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process Account
java.lang.RuntimeException: com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'.
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:162)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'.
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:88)
    at com.salesforce.dataloader.dao.database.DatabaseContext.checkConnection(DatabaseContext.java:72)
    at com.salesforce.dataloader.dao.database.DatabaseReader.checkConnection(DatabaseReader.java:244)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
    ... 2 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver'
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:80)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
    ... 8 more

I have all ready download the ojdbc6.jar and add it to the path java/bin, but I still with the error, can you please help me?

Thank you. 

Mónica Jaramillo 
SandhyaSandhya (Salesforce Developers) 
Hi Monica,

Please make sure that the classpath knows where the driver files are.  If you're using the batch command line then you can do that using the -classpath parameter e.g
 
java.exe -classpath ..\DataLoader.jar;"c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msbase.jar";"c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\msutil.jar";"c:\program files\Microsoft SQL Server 2000 Driver for JDBC\lib\mssqlserver.jar"
etc 

Please refer below link for the same.

https://developer.salesforce.com/forums/?id=906F00000008pOOIAY

Hope this helps you!

If this helps you, please mark it as solved.

Thanks and Regards
Sandhya
MONICA JARAMILLO FUENTESMONICA JARAMILLO FUENTES
Hi Sandhya, 

Sorry, but no, I remain with the error, and sorry I copy the wrong message, with the changes I made in the script for the upgrade, the error that it's giving me is the next one: 

2017-01-23 12:45:37,247 ERROR [Account] database.DatabaseContext initConnection (DatabaseContext.java:87) - Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'.
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:80)
    at com.salesforce.dataloader.dao.database.DatabaseContext.checkConnection(DatabaseContext.java:72)
    at com.salesforce.dataloader.dao.database.DatabaseReader.checkConnection(DatabaseReader.java:244)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
    ... 8 more
2017-01-23 12:45:37,247 FATAL [main] process.ProcessRunner topLevelError (ProcessRunner.java:238) - Unable to run process Account
java.lang.RuntimeException: com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'.
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:162)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:100)
    at com.salesforce.dataloader.process.ProcessRunner.main(ProcessRunner.java:253)
Caused by: com.salesforce.dataloader.exception.DataAccessObjectInitializationException: Database error encountered during connecting for database configuration: Account_BicomToSF_PRODUCCION.  Sql error: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'.
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:88)
    at com.salesforce.dataloader.dao.database.DatabaseContext.checkConnection(DatabaseContext.java:72)
    at com.salesforce.dataloader.dao.database.DatabaseReader.checkConnection(DatabaseReader.java:244)
    at com.salesforce.dataloader.process.ProcessRunner.run(ProcessRunner.java:134)
    ... 2 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
    at com.salesforce.dataloader.dao.database.DatabaseContext.initConnection(DatabaseContext.java:80)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)
    ... 8 more

With the new version of data loader it ask for a odbc from oracle, but it gave me that message, could you please help me?, 

Thank you, Regards

Mónica Jaramillo 
SandhyaSandhya (Salesforce Developers) 
The error which you are receiving  "Cannot load JDBC driver class " seems like the Path of your JDBC driver is not accessible. There are some links which will help you to understand the issue or concept.  Download the appropriate JDBC Driver from here:

http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

So if using Oracle 11g R2, then they would download ojdbc6.jar. Place it into the same folder as the process.bat file, then modify the process bat to add a reference to it in the -cp parameter. Like so:

..\Java\bin\java.exe -cp ..\dataloader-25.0.0-uber.jar;ojdbc6.jar

This ensures that driver is available when needed.

https://developer.salesforce.com/docs/atlas.en-us.dataLoader.meta/dataLoader/installing_the_data_loader.htm
 
Thanks and Regards
Sandhya