-1

I am using the MSSQL database for WSO2 API manager 3.2.0 and want to use analytics. When I changed the database to MSSQL, this error appeared. How can I solve this problem?

enter image description here

enter image description here

nahid afzali
  • 73
  • 1
  • 8

1 Answers1

1

You need to add the MSSQL JDBC driver to the <API-M_ANALYTICS_HOME>/lib directory to use MSSQL as the external database for Analytics. I have tried with mssql-jdbc version 8.2.2.jre8. Since mssql-jdbc depends on OSGi Service JDBC you will need to add that jar as well to the <API-M_ANALYTICS_HOME>/lib directory. You may use the following links to download the jars,

OSGi Service JDBC - https://mvnrepository.com/artifact/org.osgi/org.osgi.service.jdbc/1.0.1

Microsoft JDBC Driver For SQL Server - https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/8.2.2.jre8

If you still face issues after adding the above jars, please add the complete stack trace related to the error. You can find the logs in the carbon.log file located at <API-M_ANALYTICS_HOME>/wso2/worker/logs.

sanoJ
  • 2,935
  • 2
  • 8
  • 18
  • Sanoj, I think you can copy the non-osgi driver to `/jars` then you shouldn't need the OSGI dependencies. Or you can simply copy the OSGIed driver from APIM dropins directory(APIM_HOME/repository/components/dropins) and copy it to the `/lib` directory. Please correct me if I'm wrong :) – ycr Sep 29 '22 at 13:57
  • Yes, we can follow that approach as well @ycr. Thanks for pointing that out. – sanoJ Sep 30 '22 at 03:32
  • @sanoJ this error now appears: "Error getting SSO auth URL","bundle.js:110 POST https://localhost:9643/login/analytics-dashboard 500 (Internal Server Error)". how do I solve it? – nahid afzali Oct 03 '22 at 07:06
  • @ycr this error now appears: "Error getting SSO auth URL","bundle.js:110 POST localhost:9643/login/analytics-dashboard 500 (Internal Server Error)". how do I solve it? – nahid afzali Oct 03 '22 at 07:06