java集成kettle6.0.1.0-386版本遇见的问题

开发过程中的问题,解决办法是亲测。

1、kettle java 集成以api 方式向carte发送执行job,接收到后能解析kjb文件,不能解析ktr文件;不能正常获取到资源库的名称信息

Unexpected error during transformation metadata load

2018/07/03 13:48:45 - CESHI -

2018/07/03 13:48:45 - CESHI - No repository defined!

2018/07/03 13:48:45 - CESHI -

2018/07/03 13:48:45 - CESHI - 发生了一个错误,当打开/验证 XML 文件 '//CESHI.ktr'!

解决办法,将资源库的name,id赋值到资源库实例化时;将资源库名称set到资源库类中。

2、java 调用carte 子服务,不能传递参数

将参数设置在JobExecutionConfiguration中设置参数是map

解决办法:Map str = new HashMap();

               str.put(FMSPPING, batchNumber);

              jobExecutionConfiguration.setVariables(str);

3、集成环境测试整体流程时在调用到 KettleEnvironment.init();时出现如下异常信息:java.lang.NoClassDefFoundError: com/yss/newrisk/calculationCore/mathlib/inface/mathbase/MathBase

Unable to list jar files in plugin folder 'file:/D:/pdi-ce-6.0.1.0-386new/data-integration/plugins/pentaho-big-data-plugin/plugins/'

Caused by: java.lang.ClassNotFoundException: org.apache.commons.configuration.ConfigurationException

解决办法:查看集成环境中的commons jar包的版本信息与kettle安装包中的commons jar包信息是否相同,不相同则升级。

4、单独初始化kettle环境时可正常运行,但在spring项目中运行确报错,系统环境变量已经设置KETTLE_HOME,报如下错误:

 

org.apache.commons.vfs2.FileSystemException: Could not load VFS configuration from "bundleresource://132.fwk1784652479:7/org/apache/commons/vfs2/impl/providers.xml".

at org.apache.commons.vfs2.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:129)

at org.apache.commons.vfs2.impl.StandardFileSystemManager.init(StandardFileSystemManager.java:68)

    at org.pentaho.di.core.vfs.KettleVFS.(KettleVFS.java:72)

    at org.pentaho.di.core.vfs.KettleVFS.(KettleVFS.java:56)

    at org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:124)

    at org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:116)

    at org.pentaho.di.core.plugins.JarFileCache.getFileObjects(JarFileCache.java:67)

at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:252)

at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:555)

at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:119)

at org.pentaho.di.core.plugins.PluginRegistry.registerType(PluginRegistry.java:598)

    at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:553)

at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:101)

    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:55)

    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:43)

    at com.aa.dsmp.workflow.newrisk.bo.workflow.etl.CallJob.(CallJob.java:63)

at com.aa.dsmp.workflow.newrisk.bo.workflow.etl.CurrentKettleWorkflowScheduleBo.runJobToCarte(CurrentKettleWorkflowScheduleBo.java:432)

at com.aa.dsmp.workflow.newrisk.bo.workflow.etl.CurrentKettleWorkflowScheduleBo.runkettle(CurrentKettleWorkflowScheduleBo.java:390)

at com.aa.dsmp.workflow.newrisk.bo.workflow.etl.CurrentKettleWorkflowScheduleBo.workflow(CurrentKettleWorkflowScheduleBo.java:342)

at com.aa.dsmp.workflow.newrisk.bo.workflow.WorkflowScheduleAbstarct.execute(WorkflowScheduleAbstarct.java:65)

at com.aa.dsmp.workflow.newrisk.bo.workflow.WorkflowScheduleAbstarct$$FastClassByCGLIB$$9f196f3c.invoke()

    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)

at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)

at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)

at com.aa.dsmp.workflow.newrisk.bo.workflow.etl.CurrentKettleWorkflowScheduleBo$$EnhancerByCGLIB$$e89bfa7c.execute()

at com.aa.dsmp.workflow.newrisk.bo.task.SchduleTaskBo$1.trans(SchduleTaskBo.java:91)

at com.aa.dsmp.workflow.service.TransactionService.newTrans(TransactionService.java:21)

at com.aa.dsmp.workflow.newrisk.bo.task.SchduleTaskBo.executeWorkflowsByDay(SchduleTaskBo.java:84)

at com.aa.dsmp.workflow.newrisk.bo.task.SchduleTaskBo.scheduleWorkflow(SchduleTaskBo.java:226)

at com.aa.dsmp.workflow.newrisk.bo.task.AutoSchduleTaskBo.serialExecute(AutoSchduleTaskBo.java:221)

    at com.aa.dsmp.workflow.newrisk.bo.task.AutoSchduleTaskBo.processWorkExecuteEnter(AutoSchduleTaskBo.java:199)

    at com.aa.dsmp.workflow.newrisk.bo.task.AutoSchduleTaskBo.execute(AutoSchduleTaskBo.java:115)

    at com.aa.dsmp.workflow.newrisk.bo.task.AutoSchduleTaskBo.execute(AutoSchduleTaskBo.java:77)

    at org.quartz.core.JobRunShell.run(JobRunShell.java:213)

    at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)

Caused by: org.apache.commons.vfs2.FileSystemException: Could not create file provider of class "org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider".

    at org.apache.commons.vfs2.impl.StandardFileSystemManager.createInstance(StandardFileSystemManager.java:359)

    at org.apache.commons.vfs2.impl.StandardFileSystemManager.addProvider(StandardFileSystemManager.java:261)

    at org.apache.commons.vfs2.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:181)

    at org.apache.commons.vfs2.impl.StandardFileSystemManager.configure(StandardFileSystemManager.java:125)

    ... 39 more

Caused by: java.lang.ClassNotFoundException: org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider not found from bundle [com.aa.sofa.engine.schedule]

    at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:98)

    at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:151)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at org.apache.commons.vfs2.impl.StandardFileSystemManager.createInstance(StandardFileSystemManager.java:354)

    ... 42 more

Caused by: java.lang.ClassNotFoundException: org.apache.commons.vfs2.provider.local.DefaultLocalFileProvider

    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)

    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)

    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

    at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)

    at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)

    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)

    at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:95)

    ... 45 more

org.pentaho.di.core.exception.KettleFileException: 

Unable to list jar files in plugin folder 'plugins'

Unable to get VFS File object for filename 'plugins' : Could not find file with URI "D:\pdi-ce-6.0.1.0-386new\data-integration\plugins" because it is a relative path, and no base URI was provided.

 

刚接触kettle

解决办法:将kettle用到的所有jar包全部升级到跟kettle工具中的lib中的jar包同一个版本

 

 

你可能感兴趣的:(java,kettle)