Pentaho 错误 - ConnectionServiceImpl.ERROR_0009 - 连接到数据库 [null] 失败

Posted

技术标签:

【中文标题】Pentaho 错误 - ConnectionServiceImpl.ERROR_0009 - 连接到数据库 [null] 失败【英文标题】:Pentaho Error - ConnectionServiceImpl.ERROR_0009 - Connection to database [null] failed 【发布时间】:2017-07-08 15:38:17 【问题描述】:

我正在尝试设置与 mysql 服务器(本地主机)的 pentaho 连接。但是,当我尝试测试连接时,会出现此错误 "ConnectionServiceImpl.ERROR_0009 - Connection to database [null] failed"。关于服务器的信息应该是正确的。 资料图片:

[我在 MySQL 中没有 root 帐户的密码] 和 MySQL 连接器文件已插入到 pentaho 服务器 lib 文件夹中。

连接器文件夹图片:

我查找了日志文件,并发现了有关我的连接测试的信息:

2017-07-08 17:12:02,915 ERROR [org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl] Error Start: Pentaho pentaho-platform-core 7.1.0.0-12
2017-07-08 17:12:02,915 ERROR [org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl] ::: Can't get connection from Pool
org.pentaho.platform.api.data.DBDatasourceServiceException: java.lang.RuntimeException: PooledDatasourceHelper.ERROR_0009 - Unable to pool Data Source [ Data_Warehouse_Incidenti ]. Cannot initialize org.gjt.mm.mysql.Driver.
    at org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceHelper.setupPooledDataSource(PooledDatasourceHelper.java:319)
    at org.pentaho.platform.plugin.services.connections.sql.SQLConnection.initDataSource(SQLConnection.java:581)
    at org.pentaho.platform.plugin.services.connections.sql.SQLConnection.connect(SQLConnection.java:597)
    at org.pentaho.platform.plugin.services.connections.sql.SQLConnection.setProperties(SQLConnection.java:108)
    at org.pentaho.platform.engine.services.connection.PentahoConnectionFactory.getConnection(PentahoConnectionFactory.java:124)
    at org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl.testConnection(ConnectionServiceImpl.java:323)
    at org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionService.testConnection(ConnectionService.java:240)
    at sun.reflect.GeneratedMethodAccessor367.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
    at org.pentaho.platform.web.servlet.JAXRSPluginServlet.service(JAXRSPluginServlet.java:112)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.pentaho.platform.web.servlet.JAXRSPluginServlet.service(JAXRSPluginServlet.java:117)
    at org.pentaho.platform.web.servlet.PluginDispatchServlet.service(PluginDispatchServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:195)
    at com.pentaho.platform.web.http.filters.PentahoEnterpriseWebContextFilter.doFilter(SourceFile:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:115)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:191)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
    at org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter.doFilterInternal(PentahoBasicProcessingFilter.java:125)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:271)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at com.pentaho.ui.servlet.SystemStatusFilter.doFilter(SourceFile:87)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:114)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.pentaho.platform.web.http.filters.WebappRootForwardingFilter.doFilter(WebappRootForwardingFilter.java:70)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.pentaho.platform.web.http.filters.PentahoPathDecodingFilter.doFilter(PentahoPathDecodingFilter.java:34)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2521)
    at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2510)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: PooledDatasourceHelper.ERROR_0009 - Unable to pool Data Source [ Data_Warehouse_Incidenti ]. Cannot initialize org.gjt.mm.mysql.Driver.
    at org.pentaho.platform.engine.services.connection.datasource.dbcp.PooledDatasourceHelper.setupPooledDataSource(PooledDatasourceHelper.java:167)
    ... 96 more
2017-07-08 17:12:02,917 ERROR [org.pentaho.platform.dataaccess.datasource.wizard.service.impl.ConnectionServiceImpl] Error end:

我已经寻找了很多解决方案,但我没有找到任何东西。它缺少什么?

【问题讨论】:

当您搜索 Error_0009 时,这似乎是最受欢迎的问题。 - 为什么不使用 MySQL 数据库类型? - 如果您需要通用数据库连接,请检查您的 Driver.class。 mysql-conector-java 包含两个驱动程序:com.mysql.jdbc.Driver 和 org.gjt.mm.mysql.Driver。通过提供提示来帮助 Kettle。 因为 MySQL 数据库类型没有出现在我的列表中。我已按照所有程序安装它,但没有任何结果。我也尝试过提示但没有发生任何事情。 【参考方案1】:

同样的问题,我解决了复制 mysql-connector-java-5.1.42-bin.jar 的问题

tomcat/lib 架构工作台/lib 架构工作台/驱动程序 pentaho-server/data/lib(不确定是否有用) 在pentaho文件夹内的文件夹下名为'jdbc'的文件夹中(我使用了文件系统的搜索功能)

我已停止服务器并重新启动服务器。

这样在照片上的Database Type中出现了“Mysql”选项。

最后我使用 org.gjt.mm.mysql.Driver 作为驱动程序类名字段。

【讨论】:

【参考方案2】:

这里有几件事:

您的 MySQL 服务器是否在 localhost 上运行?它是否在端口3306 上运行? 您确定这是您显示的正确连接吗?在日志中显示Cannot initialize org.gjt.mm.mysql.Driver(旧版本),但在连接窗口中您提供了com.mysql.jdbc.Driver(新版本)。为什么不同= 在我看来,您使用了错误的驱动程序类。连接是否在其他地方定义?

编辑

“pentaho driver jars directory”的第一个结果是this page。它指出外部 jar 必须进入目录

pentaho/jdbc-distribution

之后必须执行一个文件

distribute-files.bat <name of JDBC driver JAR>

然后重新启动服务器。此外,还有您使用的应用程序的文件夹列表。

【讨论】:

是的,我的服务器 si 在 localhost 上运行,端口是 3306。我尝试将旧版本和新版本 (org.gjt.mm.mysql.Driver) 初始化,但错误是相同的。我使用的其他工具(水壶,模式工作台)不需要指定驱动程序类,我只需将 jar 文件放在 lib 文件夹中,所以我很确定驱动程序可以工作,但我不知道如何交给 petaho 服务器

以上是关于Pentaho 错误 - ConnectionServiceImpl.ERROR_0009 - 连接到数据库 [null] 失败的主要内容,如果未能解决你的问题,请参考以下文章

Pentaho 数据集成:错误处理

Pentaho 通用错误处理脚本

Pentaho CDF 错误:对象类型 *Component* 无法映射到有效类

插入 SQL Server 时 Pentaho 错误数据被截断

Pentaho 数据集成输入/输出位类型错误

ORA-00001 / TOP001 - Pentaho 错误处理