加载属性文件时出现问题

时间:2018-05-15 17:03:19

标签: spring

我有一个应用程序(Spring 4和SpringBatch 3),它试图加载database.xml上下文,并引用包含一些特定于env的值的application.propeties。尽管有很多关于位置值的试验,但我无法说服它找到applicaiton.properties文件。

database.xml文件:

<beans xmlns="http://www.springframework.org/schema/beans">

<bean id="configproperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="location" value="file:///C:\\Users\\JamesDePaul\\spring-batch-sample\\blueCostWeb\\src\\main\\resources\\application.properties" />
      <property name="ignoreResourceNotFound" value="false" />
</bean>

<bean id="placeholderProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="properties" ref="configproperties"/>
</bean>
<bean id="dataSource"
    class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
    <property name="driverClass" value="${datasource.database.driverClassName}" />
    <property name="jdbcUrl" value="${datasource.database.url}" />
    <property name="user" value="${datasource.database.username}" />
    <property name="password" value="${datasource.database.password}" />
</bean>

application.properties文件:

datasource.database.driverClassName=com.ibm.db2.jcc.DB2Driver
datasource.database.url=jdbc:db2://localhost:50000/bluecost
datasource.database.username=db2user
datasource.database.password=db2pass

Stacktrace就在这里:

    INFO: Initializing Spring root WebApplicationContext
    2018-05-15 10:55:41 INFO  ContextLoader:285 - Root WebApplicationContext: initialization started
    2018-05-15 10:55:41 INFO  XmlWebApplicationContext:510 - Refreshing Root WebApplicationContext: startup date [Tue May 15 10:55:41 MDT 2018]; root of context hierarchy
    2018-05-15 10:55:41 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-resources-2.0.0.BUILD-SNAPSHOT.jar!/org/springframework/batch/admin/web/resources/webapp-config.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/integration/configuration-context.xml]
    2018-05-15 10:55:42 INFO  PropertiesFactoryBean:172 - Loading properties file from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-integration-core-4.1.2.RELEASE.jar!/META-INF/spring.integration.default.properties]
    2018-05-15 10:55:42 INFO  IntegrationRegistrar:315 - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/integration/file-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/integration/jmx-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/integration/launcher-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/integration/restart-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/manager/data-source-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/manager/env-context.xml]
    2018-05-15 10:55:42 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/manager/execution-context.xml]
    2018-05-15 10:55:42 INFO  DefaultListableBeanFactory:829 - Overriding bean definition for bean 'dummy': replacing [Generic bean: class [java.util.Date]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-resources-2.0.0.BUILD-SNAPSHOT.jar!/org/springframework/batch/admin/web/resources/webapp-config.xml]] with [Generic bean: class [java.util.Date]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/manager/execution-context.xml]]
    2018-05-15 10:55:43 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-manager-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/manager/jmx-context.xml]
    2018-05-15 10:55:43 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-batch-admin-resources-2.0.0.BUILD-SNAPSHOT.jar!/META-INF/spring/batch/bootstrap/resources/resources-context.xml]
    2018-05-15 10:55:43 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [org/springframework/batch/admin/bootstrap/batch.properties]
    2018-05-15 10:55:43 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [batch-default.properties]
    2018-05-15 10:55:43 WARN  PropertyPlaceholderConfigurer:181 - Could not load properties from class path resource [batch-default.properties]: class path resource [batch-default.properties] cannot be opened because it does not exist
    2018-05-15 10:55:43 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [batch-db2.properties]
    2018-05-15 10:55:43 INFO  DefaultConfiguringBeanFactoryPostProcessor:130 - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel 
    2018-05-15 10:55:43 INFO 
    2018-05-15 10:55:44 INFO  PropertiesFactoryBean:172 - Loading properties file from URL [jar:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/lib/spring-integration-core-4.1.2.RELEASE.jar!/META-INF/spring.integration.default.properties]
    2018-05-15 10:55:44 INFO  ThreadPoolTaskScheduler:165 - Initializing ExecutorService  'taskScheduler'
    2018-05-15 10:55:45 INFO  JobRepositoryFactoryBean:183 - No database type set, using meta data indicating: DB2
    2018-05-15 10:55:45 INFO  ThreadPoolTaskExecutor:165 - Initializing ExecutorService 
    2018-05-15 10:55:45 INFO  SimpleJobServiceFactoryBean:215 - No database type set, using meta data indicating: DB2
    2018-05-15 10:55:46 INFO  GatewayProxyFactoryBean$MethodInvocationGateway:97 - started fileSender
    2018-05-15 10:55:46 INFO  GatewayProxyFactoryBean:97 - started fileSender
    2018-05-15 10:55:46 INFO  ThreadPoolTaskExecutor:165 - Initializing ExecutorService 
'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-configuration-files' has 1 subscriber(s).
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#1
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:83 - Adding {service-activator} as a subscriber to the 'job-configurations' channel
    2018-05-15 10:55:46 INFO  DirectChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-configurations' has 1 subscriber(s).
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#2
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:83 - Adding {service-activator} as a subscriber to the 'job-configuration-requests' channel
    2018-05-15 10:55:46 INFO  DirectChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-configuration-requests' has 1 subscriber(s).
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#3
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:83 - Adding {logging-channel-adapter} as a subscriber to the 'input-files' channel
    2018-05-15 10:55:46 INFO  PublishSubscribeChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.input-files' has 1 subscriber(s).
    2018-05-15 10:55:46 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#4
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel errorChannel
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=errorChannel': registering with JMX server as MBean [spring.application:type=MessageChannel,name=errorChannel]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel nullChannel
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=nullChannel': registering with JMX server as MBean [spring.application:type=MessageChannel,name=nullChannel]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-launches
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-launches': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-launches]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-configurations
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-configurations': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-configurations]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-configuration-files
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-configuration-files': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-configuration-files]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-operator
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-operator': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-operator]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-configuration-requests
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-configuration-requests': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-configuration-requests]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-requests
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-requests': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-requests]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-registrations
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-registrations': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-registrations]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel input-files
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=input-files': registering with JMX server as MBean [spring.application:type=MessageChannel,name=input-files]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:731 - Registering MessageChannel job-restarts
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageChannel,name=job-restarts': registering with JMX server as MBean [spring.application:type=MessageChannel,name=job-restarts]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-configuration-requests,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-configuration-requests,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-restarts,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-restarts,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-configuration-files,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-configuration-files,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-requests,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-requests,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-launches,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-launches,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-operator,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-operator,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-registrations,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-registrations,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=job-configurations,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=job-configurations,bean=anonymous]
    2018-05-15 10:55:46 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=errorLogger,bean=internal': registering with JMX server as MBean [spring.application:type=MessageHandler,name=errorLogger,bean=internal]
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageHandler,name=input-files,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageHandler,name=input-files,bean=anonymous]
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:662 - Located managed bean 'spring.application:type=MessageSource,name=job-configuration-files,bean=anonymous': registering with JMX server as MBean [spring.application:type=MessageSource,name=job-configuration-files,bean=anonymous]
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:357 - Located managed bean 'spring.application:type=ManagedEndpoint,name=org.springframework.integration.config.ConsumerEndpointFactoryBean#1,bean=endpoint': registering with JMX server as MBean [spring.application:type=ManagedEndpoint,name=org.springframework.integration.config.ConsumerEndpointFactoryBean#1,bean=endpoint]
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:827 - Registered endpoint without MessageSource: spring.application:type=ManagedEndpoint,name=org.springframework.integration.config.ConsumerEndpointFactoryBean#1,bean=endpoint
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:357 - Located managed bean 'spring.application:type=ManagedEndpoint,name=fileSender,bean=endpoint': registering with JMX server as MBean [spring.application:type=ManagedEndpoint,name=fileSender,bean=endpoint]
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:827 - Registered endpoint without MessageSource: spring.application:type=ManagedEndpoint,name=fileSender,bean=endpoint
    2018-05-15 10:55:47 INFO  IntegrationMBeanExporter:406 - started org.springframework.integration.monitor.IntegrationMBeanExporter@5a54c934
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:83 - Adding {logging-channel-adapter} as a subscriber to the 'job-operator' channel
    2018-05-15 10:55:47 INFO  PublishSubscribeChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-operator' has 1 subscriber(s).
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#5
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:83 - Adding {service-activator} as a subscriber to the 'job-requests' channel
    2018-05-15 10:55:47 INFO  DirectChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-requests' has 1 subscriber(s).
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#6
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:83 - Adding {service-activator} as a subscriber to the 'job-restarts' channel
    2018-05-15 10:55:47 INFO  DirectChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-restarts' has 1 subscriber(s).
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#7
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:83 - Adding {service-activator} as a subscriber to the 'job-launches' channel
    2018-05-15 10:55:47 INFO  DirectChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.job-launches' has 1 subscriber(s).
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:97 - started org.springframework.integration.config.ConsumerEndpointFactoryBean#8
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:189 - Registering job execution LoadBMSJob
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:662 - Located managed bean 'spring.application:type=JobExecution,name=LoadBMSJob': registering with JMX server as MBean [spring.application:type=JobExecution,name=LoadBMSJob]
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:189 - Registering job execution LoadBMSJob2
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:662 - Located managed bean 'spring.application:type=JobExecution,name=LoadBMSJob2': registering with JMX server as MBean [spring.application:type=JobExecution,name=LoadBMSJob2]
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:176 - Registering step execution LoadBMSJob/DeleteCountryExclusionStep
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:662 - Located managed bean 'spring.application:type=JobExecution,name=LoadBMSJob,step=DeleteCountryExclusionStep': registering with JMX server as MBean [spring.application:type=JobExecution,name=LoadBMSJob,step=DeleteCountryExclusionStep]
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:176 - Registering step execution LoadBMSJob/insertCountryExclusionStep
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:662 - Located managed bean 'spring.application:type=JobExecution,name=LoadBMSJob,step=insertCountryExclusionStep': registering with JMX server as MBean [spring.application:type=JobExecution,name=LoadBMSJob,step=insertCountryExclusionStep]
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:176 - Registering step execution LoadBMSJob2/insertCountryExclusionStep
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:662 - Located managed bean 'spring.application:type=JobExecution,name=LoadBMSJob2,step=insertCountryExclusionStep': registering with JMX server as MBean [spring.application:type=JobExecution,name=LoadBMSJob2,step=insertCountryExclusionStep]
    2018-05-15 10:55:47 INFO  BatchMBeanExporter:310 - started org.springframework.batch.admin.jmx.BatchMBeanExporter@4c20d050
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:83 - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
    2018-05-15 10:55:47 INFO  PublishSubscribeChannel:69 - Channel 'org.springframework.web.context.WebApplicationContext:/blueCostWeb.errorChannel' has 1 subscriber(s).
    2018-05-15 10:55:47 INFO  EventDrivenConsumer:97 - started _org.springframework.integration.errorLogger
    2018-05-15 10:55:47 INFO  DefaultLifecycleProcessor:341 - Starting beans in phase 1073741823
    2018-05-15 10:55:47 INFO  SourcePollingChannelAdapter:97 - started org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0
    2018-05-15 10:55:47 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from file [C:\Users\JamesDePaul\spring-batch-sample\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\blueCostWeb\WEB-INF\classes\META-INF\spring\batch\jobs\blueCostJob.xml]
    2018-05-15 10:55:47 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [batch/config/database.xml]
    2018-05-15 10:55:47 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [batch/config/context.xml]
    2018-05-15 10:55:47 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [batch/config/dao.xml]
    2018-05-15 10:55:47 INFO  XmlBeanDefinitionReader:317 - Loading XML bean definitions from class path resource [batch/config/drools-context.xml]
    2018-05-15 10:55:47 INFO  GenericApplicationContextFactory$ResourceXmlApplicationContext:510 - Refreshing ResourceXmlApplicationContext:file:/C:/Users/JamesDePaul/spring-batch-sample/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/blueCostWeb/WEB-INF/classes/META-INF/spring/batch/jobs/blueCostJob.xml
    2018-05-15 10:55:47 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [org/springframework/batch/admin/bootstrap/batch.properties]
    2018-05-15 10:55:47 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [batch-default.properties]
    2018-05-15 10:55:47 WARN  PropertyPlaceholderConfigurer:181 - Could not load properties from class path resource [batch-default.properties]: class path resource [batch-default.properties] cannot be opened because it does not exist
    2018-05-15 10:55:47 INFO  PropertyPlaceholderConfigurer:172 - Loading properties file from class path resource [batch-db2.properties]
    2018-05-15 10:55:47 WARN  GenericApplicationContextFactory$ResourceXmlApplicationContext:487 - Exception encountered during context initialization - cancelling refresh attempt
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [batch/config/database.xml]: Could not resolve placeholder 'datasource.database.driverClassName' in string value "${datasource.database.driverClassName}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'datasource.database.driverClassName' in string value "${datasource.database.driverClassName}"
        at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:211)
        at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:223)
        at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:162)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
        at org.springframework.batch.core.configuration.support.GenericApplicationContextFactory$ResourceXmlApplicationContext.<init>(GenericApplicationContextFactory.java:161)
        at org.springframework.batch.core.configuration.support.GenericApplicationContextFactory.createApplicationContext(GenericApplicationContextFactory.java:66)
        at org.springframework.batch.core.configuration.support.AbstractApplicationContextFactory.createApplicationContext(AbstractApplicationContextFactory.java:172)
        at org.springframework.batch.core.configuration.support.DefaultJobLoader.doLoad(DefaultJobLoader.java:158)
        at org.springframework.batch.core.configuration.support.DefaultJobLoader.load(DefaultJobLoader.java:151)
        at org.springframework.batch.core.configuration.support.AutomaticJobRegistrar.start(AutomaticJobRegistrar.java:173)
        at org.springframework.batch.core.configuration.support.AutomaticJobRegistrar.onApplicationEvent(AutomaticJobRegistrar.java:139)
        at org.springframework.batch.core.configuration.support.AutomaticJobRegistrar.onApplicationEvent(AutomaticJobRegistrar.java:46)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
        at 

0 个答案:

没有答案