You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Pentaho Spoon中JNDI连接PostgreSQL报错,求解决方法

问题

已在Pentaho Spoon的jdbc.properties文件中添加以下配置:

test_conn/type=javax.sql.DataSource
test_conn/driver=org.postgresql.Driver
test_conn/url=jdbc:postgres://dummyurl.com:5432/postgres
test_conn/user=testuser
test_conn/password=12345

选择JNDI作为数据库访问方式时,出现如下错误:

Error connecting to database [Test DB] 
:org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database
No suitable driver found for jdbc:postgres://

确认凭据正确,可通过PgAdmin等其他工具正常连接数据库,求解决方法。

解决方案

  • 修正JDBC URL协议
    Postgres的JDBC URL标准协议是jdbc:postgresql://,而非配置中的jdbc:postgres://,这是触发错误的核心原因。修改jdbc.properties中的URL配置:

    test_conn/url=jdbc:postgresql://dummyurl.com:5432/postgres
    
  • 确认PostgreSQL驱动已部署
    检查Pentaho Spoon安装目录下的data-integration/lib文件夹,确认存在PostgreSQL的JDBC驱动jar包(如postgresql-42.x.x.jar,版本需与PostgreSQL服务器版本兼容)。若缺失,下载对应版本的驱动jar包放入该目录后,重启Pentaho Spoon。

  • 验证JNDI配置路径与名称

    1. 确保修改的jdbc.properties位于Pentaho Spoon默认读取路径data-integration/simple-jndi/下,而非其他位置。
    2. 在Spoon中创建JNDI连接时,输入的JNDI名称需与配置前缀完全一致(即test_conn),避免拼写错误。

内容的提问来源于stack exchange,提问作者Vinit Shetye

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 16:25:24