创建bean时出错自动装配字段失败;弹簧

时间:2016-02-04 23:18:45

标签: java spring quartz-scheduler

我尝试在weblogic 10.3.6中部署的Web应用程序中使用Spring 4和quartz 2以及java 1.6

尝试部署时,我面临以下异常:

>     <ContextLoader> <initWebApplicationContext> Context initialization failed
>     org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'startup': Autowiring of fields failed; nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Could not autowire field: private
> com.xxx.payment.scheduler.manager.SchedulerManager
> com.xxx.payment.scheduler.Startup.schedulerManager; nested exception
> is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'schedulerBean' defined in class path resource
> [META-INF/spring/applicationContext-scheduler.xml]: Instantiation of
> bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class
> [org.springframework.scheduling.quartz.SchedulerFactoryBean]:
> Constructor threw exception; nested exception is
> java.lang.NoClassDefFoundError
>       at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:243)

应用程序上下文:

<context:annotation-config />
    <context:component-scan base-package="com.xxx.payment" />
    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/WCMAppsDS" />

    <bean id="schedulerBean"
        class="org.springframework.scheduling.quartz.SchedulerFactoryBean">

        <property name="configLocation" value="classpath:/META-INF/quartz.properties" />
        <property name="dataSource" ref="dataSource" />
        <property name="schedulerName" value="quartzScheduler" />
        <property name="overwriteExistingJobs" value="false" />
        <property name="autoStartup" value="true" />
        <property name="applicationContextSchedulerContextKey" value="applicationContext" />
    </bean> 

我需要帮助来解决这个问题

0 个答案:

没有答案