You must first Upload a JDBC Driver to Fusion Server.
Upload a JDBC Driver to Fusion Server
Upload a JDBC Driver to Fusion Server
The JDBC V1 connector is supported, and fetches documents from a relational database via SQL queries. Under the hood, this connector implements the Solr DataImportHandler (DIH) plugin.Fusion stores JDBC drivers in the blob store. You can upload a driver using the Fusion UI or the Blob Store API.
How to upload a JDBC driver using the Fusion UI
- In the Fusion UI, navigate to System > Blobs.
- Click Add.
-
Select JDBC Driver.
The “New ‘JDBC Driver’ Upload” panel appears. -
Click Choose File and select the .jar file from your file system.
-
Click Upload.
The new driver’s blob manifest appears.
How to install a JDBC driver using the API
-
Upload the JAR file to Fusion’s blob store using the
/blobs/{id}
endpoint. Specify an arbitrary blob ID, and aresourceType
value ofplugin:connector
, as in this example:Success response:Fusion automatically publishes the event to the cluster, and the listeners perform the driver installation process on each node.If the blob ID is identical to an existing one, the old driver will be uninstalled and the new driver will installed in its place. To get the list of existing blob IDs, run:curl -u USERNAME:PASSWORD https://FUSION_HOST:FUSION_PORT/api/blobs
-
To verify the uploaded driver, run:
Where the
BLOB_ID
is the name specified during upload, such as “mydriver” above. A success response looks like this:
How to manually upload a JDBC V1 driver for Fusion 4.x.x releases
For Fusion 4.x.x release levels, it is recommended that you upload the JDBC driver jar files manually. This prevents some issues with dynamically loading the driver causing errors, particularly with Oracle and Microsoft SQL drivers.The following steps specify how to upload a JDBC driver JAR file to Fusion manually. The example uses the Microsoft SQL Server JDBC drivermssql-jdbc-6.6.2-jre8.jar
file.- Delete the JDBC V1 driver uploaded using the Blob store upload window.
-
Save the JDBC V1 driver JAR file to the
apps/lib
folder. For example:apps\libs\mssql-jdbc-6.2.2.jre8.jar
-
Open the
apps/jetty/connectors-classic/webapps/connectors-extra-classpath.txt
file and add the following line:apps/libs/mssql-jdbc-6.2.2.jre8.jar
- Restart connectors-classic.
- Specify the JDBC driver class name in the Manually uploaded JDBC Driver Name field.
- Enter com.microsoft.sqlserver.jdbc.SQLServerDriver in the JDBC Driver Name field.
Example
An example of a JDBC Index Stage setup Upload stage config via POST to Fusion REST API endpointapi/index-stages/instances
Configuration
When entering configuration values in the UI, use unescaped characters, such as
\t
for the tab character. When entering configuration values in the API, use escaped characters, such as \\t
for the tab character.