Announcement Announcement Module
Collapse
No announcement yet.
spring nub needs help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring nub needs help

    Been working through the errors as they come.

    While debugging I get this error in the detailed description: Error creating bean with name 'loadStagingBTEplDataStep': Cannot resolve reference to bean 'mssDSABTEplWriter' while setting bean property 'itemWriter'

    Job XML:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:p="http://www.springframework.org/schema/p"
    	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:batch="http://www.springframework.org/schema/batch"
    	xmlns:context="http://www.springframework.org/schema/context"
    
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
        http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.1.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
    
    	<!-- Measurement Support System Data Source Properties -->
    	<bean id="mssDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
    		<property name="url" value="jdbc:oracle:thin:@abdev054:1521:BTDBDEV" />
    		<property name="username" value="BTDBADMIN" />
    		<property name="password" value="telus123" />
    	</bean>
    
    	<bean id="transactionManager"
    		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="mssDataSource" />
    	</bean>
    
    	<bean id="mssJdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
    		<property name="dataSource" ref="mssDataSource" />
    	</bean>
    
    
    	<bean id="jobRepository"
            class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"
            p:dataSource-ref="mssDataSource"
            p:transactionManager-ref="transactionManager" />
    
    	<bean id="jobLauncher"
    		class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
    		<property name="jobRepository" ref="jobRepository"/>
    	</bean>
    
    	<batch:job id="loadStagingBTEplDataJob">
    			
    		<batch:step id="loadStagingBTEplDataStep">
    			<batch:tasklet  transaction-manager="transactionManager">
    				<batch:chunk reader="stagingBTEplReader" writer="mssDSABTEplWriter"	
    					commit-interval="50"/>
    			</batch:tasklet>
    		</batch:step>
    	</batch:job>
    
    	
    	
    	<bean id="stagingBTEplReader" class="org.springframework.batch.item.file.FlatFileItemReader">
    		<property name="resource" value="file://abdev053.corp.ads/BTTDataStore/Raw_Data/March/JOB_FAMILY_XREF.txt" />
    		<property name="linesToSkip" value="1" />
    		<property name="lineMapper">
    			<bean class="org.springframework.batch.item.file.mapping.DefaultLineMapper">
    				<property name="lineTokenizer">
    					<bean
    						class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer">
    						<property name="delimiter" value="	"/>
    						<property name="names"
    							value="RESOURCE_TITLE_MEANING,JOB_TITLE_FAMILY,CHANGES/>" />
    					</bean>
    				</property>
    				<property name="fieldSetMapper" ref="stagingBTEplFieldSetMapper" />
    			</bean>
    		</property>
    	</bean>
    
    	<bean id="stagingBTEplFieldSetMapper" 
    			class="Spring.Mapper"/>
    
    	<bean id="JobFamilyDAO" class="Base.JobFamilyDAO"
    		p:dataSource-ref="mssDataSource" />
    	
    	<bean id="mssDSABTEplWriter" class="Spring.StagingBTEplWriter">
    		<property name="dao" ref="JobFamilyDAO" />
    	</bean>
    	
    </beans>

  • #2
    Can't see any obvious errors (apart from strange naming conventions in cpackage and bean names). You could post a stack trace? Since this is a straight Spring DI question, you might get more help on the Spring Framework forum.

    Comment

    Working...
    X