我试图在远程服务器上运行apache-nifi
one服务器和postgresql。
当我试图将记录插入到远程数据库时,我会得到以下错误。
'jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified‘
java.sql.SQLException:无法为连接URL org.postgresql.Driver创建类org.postgresql.Driver驱动程序
这里我使用stringtype=unspecified
,因为它是用于:Column is of type timestamp without time zone but expression is of type character varying : Nifi的解决方案。
在我的PutDatabaseRecord处理器里。
数据库连接URL:jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified
数据库驱动程序类名:org.postgresql.Driver
数据库驱动程序位置:/opt/postgresql-42.2.8.jre6.jar
jar文件放在同一位置的两个服务器上。我遗漏了什么?nifi和数据库应该在同一个服务器中运行吗?
编辑:nifi-log
PutDatabaseRecordid=f1fcb902-a1a2-364e-8223-971e4d0dfa46 2019-10-2907:35:23,062错误计时器驱动的进程线程-8 o.a.n.p.standard.PutDatabaseRecord未能处理会话,原因是org.apache.nifi.processor.exception.ProcessException: java.sql.SQLException:无法为连接URL 'jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified':org.apache.nifi.processor.exception创建类'org.postgresql.Driver‘的JDBC驱动程序。'jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified‘org.apache.nifi.processor.exception.ProcessException:'jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified':无法为连接URL创建类org.postgresql.Driver的JDBC驱动程序:无法为连接URL’jdbc:postgresql//123.456.789.12:5432/test?stringtype=unspecified‘创建类JDBC驱动程序
发布于 2019-10-30 04:40:33
请在数据库连接URL中添加:
并检查
jdbc:postgresql://123.456.789.12:5432/test?stringtype=unspecified
https://stackoverflow.com/questions/58606576
复制相似问题