How do I connect Jaspersoft to Salesforce?
Use the JDBC-ODBC Bridge with the Salesforce ODBC driver to connect Jaspersoft to Salesforce and provide real-time access to your Salesforce objects, enabling you to analyse Salesforce data from your Jaspersoft dashboard.
Jaspersoft is a Java application. To interact with a data source such as Salesforce, a Java application uses a JDBC driver. (JDBC is a Java application programming interface (API) that connects Java to relational databases and other tabular data such as spreadsheets and flat files.)
The Salesforce ODBC driver uses ODBC to connect to Salesforce. ODBC is another data access technology, the Microsoft implementation of which is included with Windows.
The JDBC-ODBC Bridge allows a Java application using JDBC to access an ODBC driver. The JDBC-ODBC Bridge and ODBC driver do not have to be installed on the same machine.
The components necessary to connect Jaspersoft to Salesforce are therefore:
Jaspersoft <-> JDBC-ODBC Bridge <-> Salesforce ODBC driver <-> Salesforce
Installing, licensing, and testing the Salesforce ODBC driver
- Download the Windows Salesforce ODBC driver.
- Install and license the Salesforce ODBC driver on a Windows machine. This does not have to be the same machine as the one where Jaspersoft is installed.
For installation instructions, refer to the Salesforce ODBC driver documentation.
Before you can use the Salesforce ODBC driver to connect Jaspersoft to Salesforce, you need to configure a System ODBC data source. An ODBC data source stores the connection details for the target database (in this case, Salesforce) and the ODBC driver that's required to connect to it (in this case, the Salesforce ODBC driver).
Use ODBC Data Source Administrator to create your Salesforce ODBC driver data source:
- In the Windows Run dialog box, enter:
%windir%\system32\odbcad32.exe
- Choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose
Easysoft ODBC-Salesforce Driver
, and then choose Finish. - Complete the DSN Setup dialog box:
Setting Value DSN Salesforce User Name The name of your Salesforce user. For example, myuser@mydomain.com
.Password The password for your Salesforce user. Token The security token for your Salesforce user, if required. To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains
LOGIN_MUST_USE_SECURITY_TOKEN
, you need to supply one.Salesforce emails the security token to the email address associated with your Salesforce user account. If you have not received a security token, you can regenerate it. Salesforce will then email the new security token to you. To regenerate your security token, log in to Salesforce and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Choose Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.
- Use the Test button to verify that you can successfully connect to Salesforce.
Installing, licensing, and testing the JDBC-ODBC Bridge
- Download the JDBC-ODBC Bridge.
- Install and license the JDBC-ODBC Bridge on the machine where the Salesforce ODBC driver is installed.
For installation instructions, refer to the JDBC-ODBC Bridge documentation.
- In Window Services, make sure that the
Easysoft JDBC-ODBC Bridge Server x64 service
is running, and that theEasysoft JDBC-ODBC Bridge Server service
is stopped (stop the service and in the server properties, set the Startup type toManual
).
Connecting Jaspersoft to Salesforce
You can now connect Jaspersoft to Salesforce:
- Copy
EJOB.jar
to thejasperserver-install\apache-tomcat\lib
folder.EJOB.jar
is installed in the following location on the machine where you installed the JDBC-ODBC Bridge:easysoft_install\Jars
The default location for
easysoft_install
isdrive:\Program Files (x86)\Easysoft Limited\Easysoft JDBC-ODBC Bridge
. - In the Microsoft Management Console on this machine, restart the Jaspersoft service.
- Log in to the Jaspersoft server as "jasperadmin".
- From the Create menu, chose Data Source.
- Complete the form:
Setting Value Name Salesforce
Description Connect Jaspersoft to Salesforce with Easysoft. JDBC Driver Choose Other from the list, and then type easysoft.sql.jobDriver
in the space provided.URL jdbc:easysoft://my_host/my_salesforce_system_dsn
Replace
my_host
with the hostname or IP address of the machine where you installed the JDBC-ODBC Bridge. Replacemy_salesforce_system_dsn
with the name of your Salesforce ODBC driver data source.Username Your Salesforce user name. Password Your Salesforce password. If the JDBC-ODBC Bridge has authentication turned on, which it has by default, you will need to add these parameters to the JDBC URL:
:logonuser=my_windows_user:logonpassword=my_windows_password
Replace
my_windows_user
andmy_windows_password
with a valid Windows user name and password for the machine on which the JDBC-ODBC Bridge is running.