Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Error while closing item reader

  1. #11

    Default

    We are not trying to kill the job execution. Data in the database is not proper. No all the item processed.
    We had some test in local environment:
    Test1: Run the same code (Same Database backups) in windows. No connection reset occurs.
    Test2: Run The Same code (Same Database backups) in Linux. We are getting connection reset.

    NOte: Production Environment is AIX.

    Jre version is same for both windows and linux.
    What could be the reasons?
    Thanks & Regards,
    Arun Duraisamy

  2. #12

    Default

    Are you are still getting the reader closed error ?

    What is the pooling mechanism you are using ?
    What about transaction boundaries...can you make sure that you are sure you are using the same transaction across the whole step?

  3. #13

    Default

    Yes we are getting the reader closed error.

    This is my job configuration. In the processor we are using opensession and close session to processing the business.

    Code:
    <job id="Process_New_Plan_InstructionJob" restartable="true"
    		parent="common_Abstract_ParentJob" xmlns="http://www.springframework.org/schema/batch">
    		<!-- Process all pending instructions of a single plan. -->
    		<step id="Process_New_Plan_InstructionStep">
    			<tasklet allow-start-if-complete="true">
    				<chunk reader="commonStepListItemReader" processor="batchRunTaskListProcessorWrapper"
    					writer="commonStepListWriter" commit-interval="${commitInterval}"
    					skip-limit="${skipLimit}" retry-limit="${retryLimit}">
    					<skippable-exception-classes>
    						<include
    							class="my.application.batch.core.exception.EpsilonBatchBusinessException" />
    						<include class="org.hibernate.exception.LockAcquisitionException" />
    					</skippable-exception-classes>
    					<retryable-exception-classes>
    						<include class="org.hibernate.exception.LockAcquisitionException" />
    					</retryable-exception-classes>
    				</chunk>
    				<listeners>
    					<listener ref="stepListItemJobListener" />
    					<listener ref="promotionListener" />
    				</listeners>
    			</tasklet>
    		</step>
    Thanks & Regards,
    Arun Duraisamy

  4. #14

    Default

    Arun I do not see any taskexecutor in your config..how are you implementing the mutithreading then ? how are you using your transaction manager...can you keep the transaction manager in the step level and try running the job.

  5. #15

    Default

    Transaction manager is there in the step level. (Sorry copy paste mistake).

    MultiThreading logic:
    Jvm first load the job and as per business, we will split the records in to different list(Called BatchList). Each batchList contain number of records to process(Called BatchListItems). Note: We will not get duplicate records in the Items.

    As per number of lists we have start 5 or 10 threads. Each thread will pick a list and process the items.
    Thanks & Regards,
    Arun Duraisamy

  6. #16

    Thumbs up

    Hi All,
    The Connection Closed Exception and Connection Already closed exception occured due to do some configuration issues in the Windows Server 2003 SP2.

    http://www.sqlcoffee.com/Troubleshooting004.htm
    Thanks & Regards,
    Arun Duraisamy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •