数据挖掘 - java集成kettle API报相关karaf的错误

 青岛大学MBA校友件_176 发布于 2022-10-27 00:22

测试代码:

pom.xml文件:

http://maven.apache.org/maven-v4_0_0.xsd">
    4.0.0
    com.firewarm
    testKettle
    war
    0.0.1-SNAPSHOT
    testKettle Maven Webapp
    http://maven.apache.org<;/url>
    
        
            mine
            public Releases
            default
            http://app.firewarm.com:8088/nexus/content/groups/public/
        
    
    
        5.1.9
        7.0.0.3-59
    
    
        
            cn.firewarm.utils
            basicUtils
            0.0.3-SNAPSHOT
        
        
            mysql
            mysql-connector-java
            ${mysql-connector-java.version}
        
        
            org.safehaus.jug
            jug
            2.0.0
            
            lgpl
        
        
            commons-pool
            commons-pool
            1.6
        
        
            commons-dbcp
            commons-dbcp
            1.4
        

        
            pentaho-kettle
            kettle-core
            ${kettle-version}
        
        
            pentaho-kettle
            kettle-engine
            ${kettle-version}
        
        
            pentaho
            pdi-osgi-bridge-core
            ${kettle-version}
        
        
            pentaho
            pentaho-platform-extensions
            ${kettle-version}
            
                
                    xbean
                    org.apache.xbean
                
            
        
        
            com.google.guava
            guava
            19.0
        
        
        
            ch.qos.logback
            logback-classic
            1.1.2
        
        
            ch.qos.logback
            logback-core
            1.1.2
        
        


    
    
        testKettle
    

java文件

public class TestKettle {
    public static void main(String[] args) {
        runTransformation("C:/Users/lighting/Downloads/pdi-ce-7.0.0.0-25/data-integration/test.ktr");
    }

    public static void runTransformation(String filename) {
        try {
            System.setProperty("KETTLE_HOME", "C:/Users/lighting/Downloads/pdi-ce-7.0.0.0-25");
            KettleEnvironment.init();
            TransMeta transMeta = new TransMeta(filename);
            Trans trans = new Trans(transMeta);
            String[] pars = {};
            trans.execute(pars);
            trans.waitUntilFinished();
            if (trans.getErrors() > 0) {
                throw new RuntimeException("There were errors during transformation execution.");
            }
        } catch (KettleException e) {
            System.out.println(e);
        }
    }
}

报错信息:

11:29:15,963 WARN  [KarafBoot] Karaf not found in standard dir of './system/karaf' 
11:29:15,974 ERROR [KarafBoot] Error starting Karaf
java.io.FileNotFoundException: Source '.\system\karaf' does not exist
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:866)
    at org.apache.commons.io.FileUtils.copyDirectory(FileUtils.java:814)
    at org.pentaho.platform.osgi.KarafBoot.startup(KarafBoot.java:187)
    at org.pentaho.di.osgi.registryExtension.OSGIPluginRegistryExtension.init(OSGIPluginRegistryExtension.java:105)
    at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:558)
    at org.pentaho.di.core.KettleClientEnvironment.init(KettleClientEnvironment.java:101)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:96)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:74)
    at testKettle.TestKettle.runTransformation(TestKettle.java:24)
    at testKettle.TestKettle.main(TestKettle.java:18)
11:30:56,443 ERROR [KarafLifecycleListener] The Kettle Karaf Lifecycle Listener failed to execute properly after waiting for 100 seconds. Releasing lifecycle hold, but some services may be unavailable.
2017/03/23 11:30:56 - test - 为了转换解除补丁开始  [test]

查找了相关资料,不知道如何解决

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有