我有最新版本的Kettle / PDI。 Carte使用以下配置在Windows上本地运行:
<slave_config>
<slaveserver>
<name>master1</name>
<hostname>localhost</hostname>
<port>8081</port>
<master>Y</master>
</slaveserver>
<repository>
<name>PDI Repo</name>
<username>username</username>
<password>password</password>
</repository>
</slave_config>
在.kettle / repositories.xml中:
<repositories>
<connection>
<name>PDI Repo</name>
<server>127.0.0.1</server>
<type>MYSQL</type>
<access>Native</access>
<database>pdi</database>
<port>3306</port>
<username>username</username>
<password>Encrypted password</password>
<servername/>
<data_tablespace/>
<index_tablespace/>
<attributes>
<attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
<attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
<attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
<attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
<attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
<attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
<attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
<attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
<attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
<attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
<attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
<attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
</attributes>
</connection>
<repository>
<id>KettleDatabaseRepository</id>
<name>PDI Repo</name>
<description>PDI Repo</description>
<connection>PDI Repo</connection>
</repository>
</repositories>
您会注意到这些与存储库数据库的某些特定配置几乎是默认配置。通过Spoon,我创建了一个简单的转换,它在数据库表上运行select,对列执行一些简单的计算,并返回一些JSON。
如果我告诉转换在master1上运行,它会工作并吐出JSON。
如果我再次运行完全相同的命令,则会出错:
2016/01/29 10:05:53 - PDI Repo - ERROR (version 6.0.1.0-386, build 1 from 2015-12-03 11.37.25 by buildguy) : Error disconnecting from database :
2016/01/29 10:05:53 - PDI Repo - Unable to commit repository connection
2016/01/29 10:05:53 - PDI Repo -
2016/01/29 10:05:53 - PDI Repo - Error comitting connection
2016/01/29 10:05:53 - PDI Repo - at java.lang.Thread.run (Thread.java:745)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.trans.step.RunThread.run (RunThread.java:121)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.trans.step.BaseStep.markStop (BaseStep.java:2992)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.trans.Trans$1.stepFinished (Trans.java:1233)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.trans.Trans.fireTransFinishedListeners (Trans.java:1478)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.www.BaseJobServlet$3.transFinished (BaseJobServlet.java:170)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.repository.kdr.KettleDatabaseRepository.disconnect (KettleDatabaseRepository.java:1655)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate.disconnect(KettleDatabaseRepositoryConnectionDelegate.java:257)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.repository.kdr.delegates.KettleDatabaseRepositoryConnectionDelegate.commit(KettleDatabaseRepositoryConnectionDelegate.java:283)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.core.database.Database.commit (Database.java:738)
2016/01/29 10:05:53 - PDI Repo - at org.pentaho.di.core.database.Database.commit (Database.java:757)
我不明白为什么第一次请求后与存储库数据库的连接失败。尽管出现此错误,Carte仍继续运行,但在通过URL访问时会抛出这样的错误:
<webresult>
<result>ERROR</result>
<message>Unexpected error executing the transformation:
java.lang.NullPointerException
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:128)
at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:106)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2716)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2684)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2661)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2641)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2606)
at org.pentaho.di.trans.TransMeta.<init>(TransMeta.java:2569)
at org.pentaho.di.www.ExecuteTransServlet.loadTransformation(ExecuteTransServlet.java:316)
at org.pentaho.di.www.ExecuteTransServlet.doGet(ExecuteTransServlet.java:232)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)</message>
<id />
</webresult>
我挖掘了堆栈跟踪的代码,这意味着Repository对象是null
。因此,出于某种原因,Carte可以连接到PDI存储库,但是当它成功一次时,出现错误并且它会丢失连接并且无法再找到转换。