My Solr 8.10.1 data-importhandler indexer is throwing error when trying to import from MySQL5.7.
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because "this.serverVariables" is null
I was alarmed by the occurence of jdbc4
in there.
My environment variables: JAVA_HOME: C:\Program Files\Java\jdk-17.0.1 PATH: C:\Program Files\Java\jdk-17.0.1\bin;C:\Program Files (x86)\Java\jre1.8.0_311\bin
I have jdbc9 in my solr folder: \solr-8.10.1\dist\mssql-jdbc-9.4.0.jre8.jar
So I searched my entire drive for jdbc and found just 1 occurrence of jdbc4 in D:\solr431_DELETEME\example\lib\sqljdbc4.jar
, which I've also deleted, but the error above keeps occurring.
data-config.xml
<dataSource type="JdbcDataSource" name="ds-wordpress" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/wpmydb" user="<myuser>" password="<mypwd>" />
My configuration does work on my local machine, so it MUST be a setting on the server, I just don't know what it is.
I already checked here: MySQLNonTransientConnectionException Could not create connection to database server. Caused by: java.lang.NullPointerException
And tried this URL too, but to no avail: url="jdbc:mysql://localhost:3306/wpmydb?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&serverTimezone=GMT"
What else can I try?