数据挖掘 - java集成kettle API报相关karaf的错误
PHP中文网
PHP中文网 2017-04-18 10:51:36
[Java讨论组]

测试代码:

pom.xml文件:


    4.0.0
    com.firewarm
    testKettle
    war
    0.0.1-SNAPSHOT
    testKettle Maven Webapp
    http://maven.apache.org
    
        
            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]

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

PHP中文网
PHP中文网

认证0级讲师

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号