Announcement Announcement Module
Collapse
No announcement yet.
No TaskExecutor has been set, defaulting to synchronous executor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No TaskExecutor has been set, defaulting to synchronous executor

    Hello,
    i am trying to run batch application through commandline job runner ,Its getting terminated and
    It is displaying as follows in console.. could you please help me out...Thank you in advance

    2012-12-07 20:04:15,807 INFO [org.springframework.context.support.ClassPathXmlAp plicationContext] - <Refreshing org.springframework.context.support.ClassPathXmlAp plicationContext@a61164: startup date [Fri Dec 07 20:04:15 IST 2012]; root of context hierarchy>
    2012-12-07 20:04:15,838 INFO [org.springframework.beans.factory.xml.XmlBeanDefin itionReader] - <Loading XML bean definitions from class path resource [META-INF/spring/module-context.xml]>
    2012-12-07 20:04:15,995 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'PapillonAccount': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.S impleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.J obParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]>
    2012-12-07 20:04:16,338 INFO [org.springframework.beans.factory.config.PropertyP laceholderConfigurer] - <Loading properties file from class path resource [batch.properties]>
    2012-12-07 20:04:16,354 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Overriding bean definition for bean 'autherisedInvoicePreparedStatementSetter': replacing [Generic bean: class [uk.co.pruhealth.papillon.batch.read.AutherisedInvo icePreparedStatementSetter]; scope=step; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=false; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in class path resource [META-INF/spring/module-context.xml]] with [Root bean: class [org.springframework.aop.scope.ScopedProxyFactoryBe an]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined in class path resource [META-INF/spring/module-context.xml]=]=>
    2012-12-07 20:04:16,370 INFO [org.springframework.beans.factory.support.DefaultL istableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@988707: defining beans [org.springframework.batch.core.scope.internalStepS cope,org.springframework.beans.factory.config.Cust omEditorConfigurer,org.springframework.batch.core. configuration.xml.CoreNamespacePostProcessor,invoi ceAutherised,invoicePaid,invoiceRollback,paymentRe ceived,PapillonAccount,walkerAccountingInvoiceAuth erisedReader,walkerAccountingInvoicePaidReader,wal kerAccountingInvoiceRollbackReader,walkerAccountin gPaymentReceivedReader,autherisedInvoicePreparedSt atementSetter,walkerAccountingProcessor,walkerAcco untingWriter,walkerAccountingDataWriter,walkerAcco untingDao,jobRepository,transactionManager,healTra nsactionManager,batchExceptionListner,stopListener ,batchException,dataSource,healDataSource,org.spri ngframework.beans.factory.config.PropertyPlacehold erConfigurer#0,healDataBaseConfig,walkerAccounting RowMapper,org.springframework.context.annotation.i nternalConfigurationAnnotationProcessor,org.spring framework.context.annotation.internalAutowiredAnno tationProcessor,org.springframework.context.annota tion.internalRequiredAnnotationProcessor,org.sprin gframework.context.annotation.internalCommonAnnota tionProcessor,jobLauncher,scopedTarget.autherisedI nvoicePreparedStatementSetter]; root of factory hierarchy>
    2012-12-07 20:04:16,651 INFO [org.springframework.batch.core.launch.support.Simp leJobLauncher] - <No TaskExecutor has been set, defaulting to synchronous executor.>

  • #2
    Is there an exception or something? The output you posted all looks normal.

    Comment


    • #3
      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>
      Last edited by mminella; Dec 10th, 2012, 04:57 PM. Reason: Formatting...

      Comment


      • #4
        The only obvious thing I see is that your job's missing a final step (you have invoiceAutherised going to invoicePaid which goes to invoiceRollback but invoiceRollback does not exist in the configuration posted).

        Comment


        • #5
          sorry, while posting xml i missed it,my problem was due to applicationContextxml not getting loaded completely.
          Thanks

          Comment

          Working...
          X