No, its not throwing any exception,i tried to run in debug mode,its getting terminated soon after loading configuration context xml
its not going to execute method of job
my configuration xml is as follows
Code:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/batch http://www.springframework.org/schem...-batch-2.1.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schem...g-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schem...-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schem...ontext-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schem...g-util-3.0.xsd">
<description>SalesForce Java Batch</description>
<!-- Entire Job Part -->
<batch:job id="PapillonAccount">
<batch:step id="invoiceAutherised" next="invoicePaid">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk
reader="walkerAccountingInvoiceAutherisedReader"
processor="walkerAccountingProcessor"
writer="walkerAccountingWriter"
commit-interval="100" />
<!-- commit-interval="${batch.jdbc.commit.interval}" /> -->
<!-- retry-limit="${batch.jdbc.retry.limit}" -->
<batch:listeners>
<batch:listener ref="batchExceptionListner" />
</batch:listeners>
</batch:tasklet>
</batch:step>
<batch:step id="invoicePaid" next="invoiceRollback">
<batch:tasklet transaction-manager="transactionManager">
<batch:chunk
reader="walkerAccountingInvoicePaidReader"
processor="walkerAccountingProcessor"
writer="walkerAccountingWriter"
commit-interval="100" />
<!-- commit-interval="${batch.jdbc.commit.interval}" /> -->
<!-- retry-limit="${batch.jdbc.retry.limit}" -->
<batch:listeners>
<batch:listener ref="batchExceptionListner" />
</batch:listeners>
</batch:tasklet>
</batch:step>
<!-- commit-interval="${batch.jdbc.commit.interval})" /> -->
<!-- retry-limit="${batch.jdbc.retry.limit}" -->
</batch:job>
<!-- Invoice Authorised Reader Part -->
<bean id="walkerAccountingInvoiceAutherisedReader" class="org.springframework.batch.item.database.StoredProcedureItemReader">
<property name="dataSource" ref="dataSource" />
<property name="procedureName" value="PKG_PAPILLON_WALKER.Pr_Getpiaevents" />
<property name="fetchSize" value="50"/>
<property name="parameters">
<list>
<bean class="org.springframework.jdbc.core.SqlParameter">
<constructor-arg index="0" value="iProcessDate" />
<constructor-arg index="1">
<util:constant static-field="java.sql.Types.DATE" />
</constructor-arg>
</bean>
<bean class="org.springframework.jdbc.core.SqlOutParameter">
<constructor-arg index="0" value="invoiceAutheriseds"/>
<constructor-arg index="1">
<util:constant static-field="oracle.jdbc.OracleTypes.CURSOR"/>
</constructor-arg>
</bean>
</list>
</property>
<property name="refCursorPosition" value="2"/>
<property name="preparedStatementSetter" ref="autherisedInvoicePreparedStatementSetter"/>
<property name="rowMapper"><bean class="WalkerAccountingRowMapper" /></property>
</bean>
<!-- Invoice Paid Reader Part -->
<bean id="walkerAccountingInvoicePaidReader" class="org.springframework.batch.item.database.StoredProcedureItemReader">
<property name="dataSource" ref="dataSource" />
<property name="procedureName" value="PKG_PAPILLON_WALKER.PR_getPIPEvents" />
<property name="fetchSize" value="50"/>
<property name="parameters">
<list>
<bean class="org.springframework.jdbc.core.SqlParameter">
<constructor-arg index="0" value="iProcessDate" />
<constructor-arg index="1">
<util:constant static-field="java.sql.Types.DATE" />
</constructor-arg>
</bean>
<bean class="org.springframework.jdbc.core.SqlOutParameter">
<constructor-arg index="0" value="invoiceAutheriseds"/>
<constructor-arg index="1">
<util:constant static-field="oracle.jdbc.OracleTypes.CURSOR"/>
</constructor-arg>
</bean>
</list>
</property>
<property name="refCursorPosition" value="2"/>
<property name="preparedStatementSetter" ref="autherisedInvoicePreparedStatementSetter"/>
<property name="rowMapper"><bean class="WalkerAccountingRowMapper" /></property>
</bean>
<!-- Writer Part -->
<bean id="walkerAccountingProcessor" class="WalkerAccountingDataProcessor" />
<bean id="walkerAccountingWriter" class="org.springframework.batch.item.support.CompositeItemWriter">
<property name="delegates">
<list>
<ref local="walkerAccountingDataWriter" />
</list>
</property>
</bean>
<bean id="walkerAccountingDataWriter" class="WalkerAccountingDataWriter" >
<property name="walkerAccountingDao" ref="walkerAccountingDao" />
</bean>
<bean id="walkerAccountingDao" class="WalkerAccountingDaoImpl">
<property name="dataSource" ref="healDataSource" />
</bean>
<!-- Common Part -->
<bean id="jobRepository"
class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean">
<property name="transactionManager" ref="transactionManager" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="healTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="healDataSource" />
</bean>
<!-- Listener configurations -->
<bean id="batchExceptionListner"
class="BatchExceptionListner">
<property name="batchExceptionDao" ref="batchException" />
</bean>
<bean id="stopListener" class="listener.StopListener" />
<!-- Exception details -->
<bean id="batchException"
class="BatchExceptionDaoImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${batch.jdbc.driver}"/>
<property name="url" value="${batch.jdbc.url}"/>
<property name="username" value="${batch.jdbc.user}"/>
<property name="password" value="${batch.jdbc.password}"/>
</bean>
<bean id="healDataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="${heal.batch.jdbc.driver}"/>
<property name="url" value="${heal.batch.jdbc.url}"/>
<property name="username" value="${heal.batch.jdbc.user}"/>
<property name="password" value="${heal.batch.jdbc.password}"/>
</bean>
<context:property-placeholder location="classpath:batch.properties" />
</beans>