Solr DIH无法工作,显示错误信息:java.library.path中无sqljdbc_auth。

huangapple go评论83阅读模式
英文:

Solr DIH not working with error no sqljdbc_auth in java.library.path

问题

使用 Solr 8.5.2 Docker 镜像,我需要使用 DIH 从 SQL Server 导入数据。

我正在加载 sqljdbc42.jar 并将其复制到 /opt/solr/contrib/dataimporthandler/,以便加载该文件。

我遇到了以下错误:

完整导入失败:java.lang.RuntimeException:
java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: 无法执行查询...

原因是:java.lang.UnsatisfiedLinkError: 在
java.library.path 中没有 sqljdbc_auth:[/usr/java/packages/lib、/usr/lib64、/lib64、/lib、/usr/lib]
at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)...
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.(AuthenticationJNI.java:41)...
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3132)...
...
at java.sql/java.sql.DriverManager.getConnection(Unknown Source)...

我的 SQL Server 托管在远程 Windows 服务器上。

如何修复这个问题,并且在使用 Docker 时使用 DIH 从 SQL Server 导入数据?

英文:

Using Solr 8.5.2 docker image, I need to import a data using DIH from SQL Server.

I am loading sqljdbc42.jar and copying it at /opt/solr/contrib/dataimporthandler/ to load the same.

I am getting following error:

> Full Import failed:java.lang.RuntimeException:
> java.lang.RuntimeException:
> org.apache.solr.handler.dataimport.DataImportHandlerException: Unable
> to execute query....
>
> Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in
> java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib,
> /usr/lib] at java.base/java.lang.ClassLoader.loadLibrary(Unknown
> Source) at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
> at java.base/java.lang.System.loadLibrary(Unknown Source) at
> com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:41)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3132)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:43)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3123)
> at
> com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7505)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2445)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1981)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1628)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1459)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:773)
> at
> com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1168)
> at java.sql/java.sql.DriverManager.getConnection(Unknown Source)

My SQL Server is hosted on remote Windows Server.

How to fix this and use DIH to import data from SQL Server with Docker?

答案1

得分: 0

这个问题已经通过从连接字符串中移除"integratedSecurity"参数来解决。

英文:

This has been resolved by removing parameter for integratedSecurity from connection string.

huangapple
  • 本文由 发表于 2020年7月24日 01:49:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/63060245.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定