关于kettle环境初始化 KettleEnvironment.init() 报错的解决



Unable to get VFS File object for filename 'G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib' : Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:180) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:121) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:117) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:125) 2022/04/15 10:13:05 - General - ... 28 more 2022/04/15 10:13:05 - General - Caused by: org.apache.commons.vfs2.FileSystemException: Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.FileSystemException.requireNonNull(FileSystemException.java:87) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:733) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:682) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:637) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:176) 2022/04/15 10:13:05 - General - ... 31 more 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Unexpected error searching for jar files in lib/ folder next to 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-salesforce-plugin/pdi-salesforce-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : org.pentaho.di.core.exception.KettleFileException: 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Unable to list jar files in plugin folder 'G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib' 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Unable to get VFS File object for filename 'G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib' : Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Unable to get VFS File object for filename 'G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib' : Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:143) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.BasePluginType.createUrlClassLoader(BasePluginType.java:649) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:706) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:184) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginRegistry.registerType(PluginRegistry.java:605) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:577) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:545) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:146) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:101) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:82) 2022/04/15 10:13:05 - General - at com.showdor.kettle.init.KettleInit.afterPropertiesSet(KettleInit.java:29) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) 2022/04/15 10:13:05 - General - at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) 2022/04/15 10:13:05 - General - at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) 2022/04/15 10:13:05 - General - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) 2022/04/15 10:13:05 - General - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) 2022/04/15 10:13:05 - General - at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) 2022/04/15 10:13:05 - General - at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) 2022/04/15 10:13:05 - General - at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) 2022/04/15 10:13:05 - General - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) 2022/04/15 10:13:05 - General - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) 2022/04/15 10:13:05 - General - at com.showdor.kettle.KettleApplication.main(KettleApplication.java:29) 2022/04/15 10:13:05 - General - Caused by: org.pentaho.di.core.exception.KettleFileException: 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Unable to get VFS File object for filename 'G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib' : Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:180) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:121) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:117) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.plugins.PluginFolder.findJarFiles(PluginFolder.java:125) 2022/04/15 10:13:05 - General - ... 28 more 2022/04/15 10:13:05 - General - Caused by: org.apache.commons.vfs2.FileSystemException: Could not find file with URI "G:\kettle\apps\var\file-rep\plugins\pdi-salesforce-plugin\lib" because it is a relative path, and no base URI was provided. 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.FileSystemException.requireNonNull(FileSystemException.java:87) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:733) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.ConcurrentFileSystemManager.resolveFile(ConcurrentFileSystemManager.java:91) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:682) 2022/04/15 10:13:05 - General - at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:637) 2022/04/15 10:13:05 - General - at org.pentaho.di.core.vfs.KettleVFS.getFileObject(KettleVFS.java:176) 2022/04/15 10:13:05 - General - ... 31 more 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/elasticsearch-bulk-insert-plugin/elasticsearch-bulk-insert-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/kettle-json-plugin/kettle-json-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/kettle-s3csvinput-plugin/kettle-s3csvinput-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-core-plugins/pdi-core-plugins-ui-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-pur-plugin/pdi-pur-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-xml-plugin/pdi-xml-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-big-data-plugin/pentaho-big-data-legacy-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-big-data-plugin/pentaho-big-data-legacy-amazon-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-cassandra-plugin/pentaho-cassandra-plugin-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/platform-utils-plugin/pdi-platform-utils-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/VerticaBulkLoader/vertica-bulkloader-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/elasticsearch-bulk-insert-plugin/elasticsearch-bulk-insert-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/kettle-json-plugin/kettle-json-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/kettle-s3csvinput-plugin/kettle-s3csvinput-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-core-plugins/pdi-core-plugins-ui-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-pur-plugin/pdi-pur-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pdi-xml-plugin/pdi-xml-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-big-data-plugin/pentaho-big-data-legacy-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-big-data-plugin/pentaho-big-data-legacy-amazon-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-cassandra-plugin/pentaho-cassandra-plugin-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/pentaho-googledrive-vfs/pentaho-googledrive-vfs-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file:///G:/kettle/apps/var/file-rep/plugins/platform-utils-plugin/pdi-platform-utils-plugin-core-9.2.0.0-290.jar' 2022/04/15 10:13:05 - General - ERROR (version 9.1.0.0-324, build 9.1.0.0-324 from 2020-09-07 05.09.05 by buildguy) : Error while finding annotations for jar plugin: 'file://

 以上是发生的错误。

通过代码定位,发生的异常是 java.io.IOException:invalid constant type:18.

通过搜索,网上解决办法是引入如下依赖,最终的解决结果是,模块中要排除javassist依赖,现下看。

        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.20.0-GA</version>
        </dependency>

  引入后,再次重试,还是不行。

曲折的过程不再赘述,kettle的集成的问答很少,没有其它办法还是先沿着这个方向去找。

通过查看依赖,可以使用以下命令输出依赖

输入命令:mvn dependency:tree

如果要输出到文件,找到pom文件的位置 进入命令行

输入: mvn dependency:tree >d:/tree.txt

然后搜索一下看哪里还引用了javassist,最终发现其它模块里引用了ognl里引用了

<groupId>javassist</groupId>
<artifactId>javassist</artifactId>

注意groupdId是javassist不是org.javassist

那就把这个忽略掉
<exclusions>
<exclusion>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>

因为在这个服务模块中,我不需要使用ognl所以,我是直接把ognl忽略掉。这样项目模块中再也没有javassist依赖了,再次启动成功,不再报如上的错误

 

posted @ 2022-04-15 10:35  xusir  阅读(1573)  评论(0编辑  收藏  举报
自成e家