jBPM Persistence: Unable to build EntityManagerFactory

放肆的年华 提交于 2019-12-04 13:31:32

I found a solution for my Problem. Normally the JBPMHelper loads the jBPM directly from the jar:

public static Properties getProperties() {
    Properties properties = new Properties();
    try {
        properties
            .load(JBPMHelper.class.getResourceAsStream("/jBPM.properties"));
    } catch (Throwable t) {
    // do nothing, use defaults
    }

    return properties;
}

I replaced the loading Mechanism and now it is loading the jBPM.properties correctly:

public static Properties getProperties() {
    Properties properties = new Properties();
    try {
        InputStream input
            = new FileInputStream("./resources/META-INF/jBPM.properties");
        properties.load(input);
        System.out.println("RPOP"+properties.toString());
    } catch (Throwable t) {
    // do nothing, use defaults
    }

    return properties;
}

(My answer adapted from BartoszKP - thanks)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!