java - 创建名称为 'Test_flow' : Cannot create inner bean '(inner bean) 的 bean 时出错

标签 java mule-studio anypoint-studio servicenow munit

我已经为 Test_flow 创建了简单的测试套件,但是当我尝试运行该流程时出现错误。

java.lang.RuntimeException: org.mule.api.config.ConfigurationException: Error creating bean with name 'Test_flow': Cannot create inner bean '(inner bean)#6a12c7a8' of type [com.mulesoft.module.batch.BatchInputBlock] while setting bean property 'inputBlock'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#6a12c7a8': Cannot create inner bean '(inner bean)#1d408060' of type [org.mule.config.spring.factories.PollingMessageSourceFactoryBean] while setting bean property 'messageSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1d408060': Cannot create inner bean '(inner bean)#1a500561' of type [com.sungardas.osstools.modules.servicenowrest.generated.processors.SysHistorySetQueryAllValuesMessageProcessor] while setting bean property 'messageProcessor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1a500561': Cannot resolve reference to bean 'ServiceNowREST__Default_Configuration' while setting bean property 'moduleObject'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'ServiceNowREST__Default_Configuration' is defined (org.mule.api.lifecycle.InitialisationException)

    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:59)
    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:45)
    at org.mule.munit.remote.RemoteRunner.runTestSuite(RemoteRunner.java:75)
    at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:55)
    at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39)

我执行的步骤:

  1. 使用 Munit Test Suit 向导为 Test_flow 和子流程创建基本测试套件
  2. 未在该测试套件中添加任何内容(即模拟、变量、断言条件)
  3. 运行基本测试套件,每次我都会收到该错误

我正在使用 Anypoint studio 6.2 EE 版本和 3.8.3 mule 运行时。

最佳答案

您是否在测试套件中导入了 XML 配置文件?

示例:

<spring:beans>
    <spring:import resource="classpath:property-test-config.xml"/>
    <spring:import resource="classpath:mock-config-connectors.xml"/>
    <spring:import resource="classpath:contactUpdates-config.xml"/>
</spring:beans>

关于java - 创建名称为 'Test_flow' : Cannot create inner bean '(inner bean) 的 bean 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41673458/

相关文章:

mule - 为 APIKit 的 Mulesoft 中的 MUnit 流引用设置入站属性

java - 以 <ArrayList<String>> 作为值的 HashMap,获取 AnimalHipsters

java - 如何在 mule 中为出站 URL 启用 TLSv1.2

mule - 寻找 Mule Studio 以前版本 (v1.3.1) 的下载

mule - 如何访问调用属性?

performance - 如何使用Mule中的线程工具解决如何解决性能问题?

Java 正则表达式特殊字符转义

java - 使用数组在组合模型中链接打印的方法

java - 如何仅使用其值之一从 Parcelable 数组列表中删除元素?

json - 消费 org.glassfish.grizzly.utils.BufferInputStream@ Mule