Weblogic注入失败时MDB的SpringBeanAutowiringInterceptor

Weblogic注入失败时MDB的SpringBeanAutowiringInterceptor,spring,jakarta-ee,message-driven-bean,Spring,Jakarta Ee,Message Driven Bean,我有一个使用EJB和Spring 4的JavaEE 6应用程序,其中有一个简单的MDB,可以接收单个bean注入,但是,每次我向这个MDB发送消息时,都会出现以下日志: com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowir

我有一个使用EJB和Spring 4的JavaEE 6应用程序,其中有一个简单的MDB,可以接收单个bean注入,但是,每次我向这个MDB发送消息时,都会出现以下日志:

com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to invoke public void org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor.autowireBean(javax.interceptor.InvocationContext) on bean class class  app.module.mdb.impl.SpringBeanAutowiringInterceptor2_curj4r_Impl with args: [LifecycleEventCallbackInvocationContext(1495657191)]

..

Caused By: org.springframework.beans.factory.BeanCreationException: Injection of autowired dependencies failed for class [class app.module.mdb.impl.TestMDB]; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private app.module.bizo.impl.TestBOImpl  app.module.mdb.impl.TestMDB.bizo; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [app.module.bizo.impl.TestBOImpl] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
我想知道我做错了什么,因为我已经正确配置了一切

MDB:

博:

配置:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
    xmlns:task="http://www.springframework.org/schema/task"
    xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
    http://www.springframework.org/schema/util    http://www.springframework.org/schema/util/spring-util-4.0.xsd
    http://www.springframework.org/schema/task    http://www.springframework.org/schema/task/spring-task-4.0.xsd">


    <context:annotation-config />
    <context:component-scan base-package="app.module" />

</beans>

XML参考:

<?xml version="1.0" encoding="UTF-8"?>
<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

    <bean id="IDContext" class="org.springframework.context.support.ClassPathXmlApplicationContext">
        <constructor-arg value="/META-INF/app-config.xml" />
    </bean>
</beans>


谢谢。

这是Weblogic服务器上的一个类加载器问题,根据Spring的问题:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:util="http://www.springframework.org/schema/util"
    xmlns:task="http://www.springframework.org/schema/task"
    xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
    http://www.springframework.org/schema/tx      http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
    http://www.springframework.org/schema/util    http://www.springframework.org/schema/util/spring-util-4.0.xsd
    http://www.springframework.org/schema/task    http://www.springframework.org/schema/task/spring-task-4.0.xsd">


    <context:annotation-config />
    <context:component-scan base-package="app.module" />

</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">

    <bean id="IDContext" class="org.springframework.context.support.ClassPathXmlApplicationContext">
        <constructor-arg value="/META-INF/app-config.xml" />
    </bean>
</beans>