Quartz のスケジュール中にこのエラーが発生します。data-source-context.xml
Schedular は開始していますが、Bean の作成中にファイルで失敗しました。
環境の値が oracle のシステム変数を宣言する必要がありますか?
data-source-context.xml ファイル
<bean id="environment" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="java.lang.System" />
<property name="targetMethod" value="setProperty" />
<property name="arguments">
<list>
<value>environment</value>
<bean class="java.lang.System" factory-method="getProperty">
<constructor-arg>
<value>environment</value>
</constructor-arg>
<!-- The default value of the environment property -->
<constructor-arg>
<value>oracle</value>
</constructor-arg>
</bean>
</list>
</property>
</bean>
コンソール:
Jan 2, 2013 4:06:00 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4a804a80: display name [org.springframework.context.support.ClassPathXmlApplicationContext@4a804a80]; startup date [Wed Jan 02 16:06:00 GMT+05:30 2013]; root of context hierarchy
Jan 2, 2013 4:06:00 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [DWH/DWH-config.xml]
Jan 2, 2013 4:06:00 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [global-config.xml]
Jan 2, 2013 4:06:00 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [data-source-context.xml]
Jan 2, 2013 4:06:00 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@4a804a80]: org.springframework.beans.factory.support.DefaultListableBeanFactory@24152415
Jan 2, 2013 4:06:00 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@24152415: defining beans [dataSource,sessionFactory,transactionManager,environment,overrideProperties,placeholderProperties,lobHandler,incrementerParent,tm,jobRegistryBeanPostProcessor,jobRegistry,jobRepository,mapJobInstanceDao,mapJobExecutionDao,mapStepExecutionDao,jdbcTemplate,jobLauncher,essJob,essStep,essSkipStep,backOff,customEditorConfigurer,DWHDailyJob,initTask,directory,reader,dbWriter,skiplis,exitTask,inpFile,clean,cleanUpTask,temp]; root of factory hierarchy
[DWHMJobDetail] Job Terminated in error:
** org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'environment' defined in class path resource [data-source-context.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException **
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478)
at