Hello @ibacher@dkayiwa@druchniewicz@pwargulak .
Am trying to come up a setup using ETL for openmrs/cfl instance but using this module.When i try to test extraction of data on openmrs using mysql server url as jdbc:mysql://localhost:3306/openmrs. i get a succes extraction. However when i try to use Microsoft SQL server. using this jdbc url jdbc:sqlserver://localhost:1433/ICEA";. i get a connection failure.
This error is about connectivity on Microsoft SQL server, the error indicates that they are no suitable drivers, however, drivers exist on this line. To me it as if it allows one single parameter url , when you create an instance of second url as a parameter to pass a second jdbc url, then it throws connectivity issues on Mssql.
At the earliest point you can detect you’ll need a SQL server driver in the module (you could, for example, do this in the started() method of the module activator). The automatic detection of JDBC drivers doesn’t really work with OpenMRS modules.
Technical explanation:
The Java DriverManager uses the ServiceLoader class to find any registered JDBC drivers the first time a call to getConnection(), getDriver(), or getDrivers() happens. The ServiceLoader scans the current classpath for any JDBC drivers and loads them, at which point, they register themselves with the DriverManager. Once this is done, the ServiceLoader stores the list of classes loaded and will consistently return the same results.
In OpenMRS, we call getConnection() relatively early on in the startup process. At the point where that runs, however, no modules are loaded or available on the classpath, so any JDBC drivers packaged into modules will not be found by the ServiceLoader.
Was able to fix this. By doing a docker cp /home/user/OpenMRS/Workspace/openmrs-module-etllite/omod/target/etllite-1.1.11-SNAPSHOT/lib/mssql-jdbc-7.4.1.jre8.jar containerId:/usr/local/tomcat/lib/mssql-jdbc-7.4.1.jre8.jar.
Am trying to do an ETL to loading patients from a certain db into specifically openmrs patient Table basing on this module ETL,
i was able to fix all the configurations and finished the Load velocity function, but a its still bit my understanding why am not able to see my data into openmrs Patient table , Perhaps patient details arent lfetched collectively,