在RuntimeEnvironment中包含BPMN文件的问题

时间:2018-05-03 13:58:26

标签: spring hibernate junit jbpm spring-bean

我是JBPM的新手我试图用spring和JBPM配置Junit。我遇到的问题是在加载应用程序上下文xml时运行测试用例。我得到以下例外。

<a href="geenscript.html" onclick="FrameUpdate(3005); return false;">Update 3005</a>

<a href="geenscript.html" onclick="FrameUpdate(3017); return false;">Update 3017</a>
<script type="text/javascript">
    function FrameUpdate(value) {
        parent.boven.location.href = `${value}-n.htm`;
        parent.onder.location.href = `${value}-t.htm`;
    }
</script>

在下面找到配置它添加了assest

失败
    java.lang.IllegalStateException: Failed to load ApplicationContext

...
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'runtimeEnvironment': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Cannot add asset: Process Compilation error Type mismatch: cannot convert from boolean to Object
    Type mismatch: cannot convert from boolean to Object,
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:175)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:127)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1600)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
        ... 44 more
    Caused by: java.lang.IllegalArgumentException: Cannot add asset: Process Compilation error Type mismatch: cannot convert from boolean to Object
    Type mismatch: cannot convert from boolean to Object,
        at org.jbpm.runtime.manager.impl.SimpleRuntimeEnvironment.addAsset(SimpleRuntimeEnvironment.java:171)
        at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:341)
        at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.addAsset(RuntimeEnvironmentBuilder.java:74)
        at com.citi.common.workflow.factory.RuntimeEnvironmentFactoryBean.getObject(RuntimeEnvironmentFactoryBean.java:135)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
        ... 49 more

我正在使用JBPM-6.5.0我也尝试将类文件编译为JAVA 1.7但仍然得到相同的错误任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

在我的pom中包含以下依赖项解决了这个问题。

        <dependency>
            <groupId>org.jbpm</groupId>
            <artifactId>jbpm-test</artifactId>
            <version>${jbpm.version}</version>
            <scope>test</scope>
        </dependency>