Announcement Announcement Module
Collapse
No announcement yet.
Could not open JDBC Connection for transaction java.sql.SQLException: ORA-00923: Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Could not open JDBC Connection for transaction java.sql.SQLException: ORA-00923:

    Hi,

    I need to read the contect from csv file and need insert in to oracle database. I got that exact link(http://www.ecomputercoach.com), but while running that example its throwing error. can any body help on this....the error is...


    ERROR - Job Terminated in error:
    org.springframework.transaction.CannotCreateTransa ctionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected
    )
    at org.springframework.jdbc.datasource.DataSourceTran sactionManager.doBegin(DataSourceTransactionManage r.java:238)
    at org.springframework.transaction.support.AbstractPl atformTransactionManager.getTransaction(AbstractPl atformTransactionManager.java:374)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.createTransactionIfNecessary(Tr ansactionAspectSupport.java:263)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:101)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy0.getLastJobExecution(Unknown Source)
    at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:85)
    at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 07)
    at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
    Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected
    )
    at org.apache.commons.dbcp.BasicDataSource.createData Source(BasicDataSource.java:1244)
    at org.apache.commons.dbcp.BasicDataSource.getConnect ion(BasicDataSource.java:882)
    at org.springframework.jdbc.datasource.DataSourceTran sactionManager.doBegin(DataSourceTransactionManage r.java:200)
    ... 9 more
    Caused by: java.sql.SQLException: ORA-00923: FROM keyword not found where expected

    at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 745)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:207)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe (T4CStatement.java:801)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescri be(T4CStatement.java:841)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
    at oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1274)
    at org.apache.commons.dbcp.DelegatingStatement.execut eQuery(DelegatingStatement.java:208)
    at org.apache.commons.dbcp.PoolableConnectionFactory. validateConnection(PoolableConnectionFactory.java: 332)
    at org.apache.commons.dbcp.BasicDataSource.validateCo nnectionFactory(BasicDataSource.java:1268)
    at org.apache.commons.dbcp.BasicDataSource.createData Source(BasicDataSource.java:1240)
    ... 11 more

  • #2
    here are the files..........what i am using and facing problem

    DB-JOBREPOSITORY.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="jobRepository-dataSource"
    class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@10.106.65.159:1531:eba" />
    <property name="username" value="xxxxx" /> <!-- your user id. e.g. root-->
    <property name="password" value="xxxxx" /> <!-- your password-->
    <property name="maxIdle" value="10"/>
    <property name="maxActive" value="100"/>
    <property name="maxWait" value="10000"/>
    <property name="validationQuery" value="select 1"/>
    <property name="testOnBorrow" value="false"/>
    <property name="testWhileIdle" value="true"/>
    <property name="timeBetweenEvictionRunsMillis" value="1200000"/>
    <property name="minEvictableIdleTimeMillis" value="1800000"/>
    <property name="numTestsPerEvictionRun" value="5"/>
    <property name="defaultAutoCommit" value="false"/>
    </bean>

    <bean id="jobRepository-transactionManager"
    class="org.springframework.jdbc.datasource.DataSou rceTransactionManager" lazy-init="true">
    <property name="dataSource" ref="jobRepository-dataSource" />
    </bean>

    <bean id="jobRepository"
    class="org.springframework.batch.core.repository.s upport.JobRepositoryFactoryBean">
    <property name="dataSource" ref="jobRepository-dataSource" />
    <property name="transactionManager" ref="jobRepository-transactionManager"/>
    <property name="databaseType" value="oracle" />
    <property name="tablePrefix" value="batch_"/>
    </bean>

    <bean id="asyncTaskExecutor"
    class="org.springframework.core.task.SimpleAsyncTa skExecutor"/>
    <bean id="syncTaskExecutor"
    class="org.springframework.core.task.SyncTaskExecu tor" />

    <bean id="jobLauncher"
    class="org.springframework.batch.core.launch.suppo rt.SimpleJobLauncher">
    <property name="jobRepository" ref="jobRepository"/>
    </bean>
    <bean id="jobExplorer"
    class="org.springframework.batch.core.explore.supp ort.JobExplorerFactoryBean"
    p:dataSource-ref="jobRepository-dataSource" p:tablePrefix="batch_" />
    </beans>


    ApplicationDB.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

    <bean id="test-dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
    <property name="url" value="jdbc:oracle:thin:@10.106.65.159:1531:eba" />
    <property name="username" value="xxxxxx" />
    <property name="password" value="xxxxxxx" />
    <property name="maxIdle" value="10"/>
    <property name="maxActive" value="100"/>
    <property name="maxWait" value="10000"/>
    <property name="validationQuery" value="select 1"/>
    <property name="testOnBorrow" value="false"/>
    <property name="testWhileIdle" value="true"/>
    <property name="timeBetweenEvictionRunsMillis" value="1200000"/>
    <property name="minEvictableIdleTimeMillis" value="1800000"/>
    <property name="numTestsPerEvictionRun" value="5"/>
    <property name="defaultAutoCommit" value="true"/>
    </bean>

    <bean id="testDB-transactionManager" class="org.springframework.jdbc.datasource.DataSou rceTransactionManager" lazy-init="true">
    <property name="dataSource" ref="test-dataSource" />
    </bean>

    </beans>




    FileToTableJob.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:batch="http://www.springframework.org/schema/batch"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns="http://www.springframework.org/schema/p"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-2.0.xsd
    http://www.springframework.org/schema/batch
    http://www.springframework.org/schem...-batch-2.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schem...ng-aop-2.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    <!--<import resource="MEMORY-JOBREPOSITORY.xml"/> -->
    <import resource="DB-JOBREPOSITORY.xml"/>

    <import resource="ApplicationDB.xml"/>

    <bean id="playerFileItemReader" class="org.springframework.batch.item.file.FlatFil eItemReader">
    <!-- <property name="resource" value="classpath:input/player.csv" /> -->
    <property name="resource" value="file:e:\player.csv" />
    <property name="lineMapper">
    <bean class="org.springframework.batch.item.file.mapping .DefaultLineMapper">
    <property name="lineTokenizer">
    <bean class="org.springframework.batch.item.file.transfo rm.DelimitedLineTokenizer">
    <property name="delimiter" value=","/>
    <property name="names" value="ID,lastName,firstName,position,debutYear,fi nalYear" />
    </bean>
    </property>
    <property name="fieldSetMapper">
    <bean class="PlayerFieldSetMapper" />
    </property>
    </bean>
    </property>
    </bean>

    <bean id="careerProcessor" class="CareerProcessor" />

    <bean id="playerDBWriter" class="org.springframework.batch.item.database.Jdb cBatchItemWriter">
    <property name="assertUpdates" value="false" />
    <property name="itemSqlParameterSourceProvider">
    <bean name="sqlParameterSourceProvider" id="sqlParameterSourceProvider" class="org.springframework.batch.item.database.Bea nPropertyItemSqlParameterSourceProvider" />
    </property>
    <property name="sql" value="insert into PLAYER (PLAYER_ID, FIRST_NAME, LAST_NAME, POSITION, DEBUT_YEAR, FINAL_YEAR,CAREER_LENGTH) values (:id, :lastName , :firstName , osition , :debutYear ,:finalYear, :careerLength)"/>
    <property name="dataSource" ref="test-dataSource" />
    </bean>

    <bean id="dynamicJobParameters" class="DynamicJobParameters" />

    <batch:job id="careerProcessorJob" job-repository="jobRepository" incrementer="dynamicJobParameters">

    <batch:step id="step1">
    <batch:tasklet transaction-manager="jobRepository-transactionManager" >
    <batch:chunk reader="playerFileItemReader" processor="careerProcessor" writer="playerDBWriter" commit-interval="10" />
    </batch:tasklet>
    </batch:step>
    </batch:job>

    </beans>
    Last edited by Rams; Apr 26th, 2011, 01:49 AM.

    Comment


    • #3
      1) I would suggest not putting your password on a public forum.

      2) The error is clear, look at it.
      ORA-00923: FROM keyword not found where expected
      3) this is your error and a fix

      Code:
      <property name="validationQuery" value="select 1"/>
      Should be:
      Code:
      <property name="validationQuery" value="select 1 from dual"/>

      Comment


      • #4
        Hi Bwawok,

        Thanks for your valuable suggession and also thanks for you valuable response.

        i changed the satatement from <property name="validationQuery" value="select 1"/> to

        <property name="validationQuery" value="select 1 from dual"/>

        but still i am facing the other problem....( actually i am reading the data from .csv file and insert in to the DB)

        can you please look this error.....

        ERROR - Job Terminated in error:
        org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from batch_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?]; nested exception is java.sql.SQLException: ORA-00942: table or view does not exist

        at org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator.doTranslate(SQLErrorCodeSQLExcep tionTranslator.java:220)
        at org.springframework.jdbc.support.AbstractFallbackS QLExceptionTranslator.translate(AbstractFallbackSQ LExceptionTranslator.java:72)
        at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:607)
        at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:641)
        at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:670)
        at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:678)
        at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:710)
        at org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:187)
        at org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.getJobInstance(JdbcJobInstanceDao.j ava:221)
        at org.springframework.batch.core.repository.support. SimpleJobRepository.getLastJobExecution(SimpleJobR epository.java:246)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:307)
        at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
        at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
        at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
        at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
        at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy0.getLastJobExecution(Unknown Source)
        at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:85)
        at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 07)
        at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
        Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

        at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 745)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4 CPreparedStatement.java:216)
        at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:810)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
        at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:850)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
        at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3339)
        at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3384)
        at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeQuery(DelegatingPreparedStatement.java:93 )
        at org.springframework.jdbc.core.JdbcTemplate$1.doInP reparedStatement(JdbcTemplate.java:648)
        at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:591)
        ... 21 more

        Comment


        • #5
          Originally posted by Rams View Post
          Hi Bwawok,

          Thanks for your valuable suggession and also thanks for you valuable response.

          i changed the satatement from <property name="validationQuery" value="select 1"/> to

          <property name="validationQuery" value="select 1 from dual"/>

          but still i am facing the other problem....( actually i am reading the data from .csv file and insert in to the DB)

          can you please look this error.....

          ERROR - Job Terminated in error:
          org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from batch_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?]; nested exception is java.sql.SQLException: ORA-00942: table or view does not exist

          at org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator.doTranslate(SQLErrorCodeSQLExcep tionTranslator.java:220)
          at org.springframework.jdbc.support.AbstractFallbackS QLExceptionTranslator.translate(AbstractFallbackSQ LExceptionTranslator.java:72)
          at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:607)
          at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:641)
          at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:670)
          at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:678)
          at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:710)
          at org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:187)
          at org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.getJobInstance(JdbcJobInstanceDao.j ava:221)
          at org.springframework.batch.core.repository.support. SimpleJobRepository.getLastJobExecution(SimpleJobR epository.java:246)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:307)
          at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
          at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
          at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
          at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
          at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
          at $Proxy0.getLastJobExecution(Unknown Source)
          at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:85)
          at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 07)
          at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
          Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

          at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:331)
          at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:288)
          at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 745)
          at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4 CPreparedStatement.java:216)
          at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:810)
          at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
          at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:850)
          at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
          at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3339)
          at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3384)
          at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeQuery(DelegatingPreparedStatement.java:93 )
          at org.springframework.jdbc.core.JdbcTemplate$1.doInP reparedStatement(JdbcTemplate.java:648)
          at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:591)
          ... 21 more
          Hi now i am getting another error..........

          ERROR - Job Terminated in error:
          org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [FileToFileJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:349)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
          at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
          at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
          at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:80)
          at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
          at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
          at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
          at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
          at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
          at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:1 90)
          at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
          Caused by: java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
          at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:143)
          at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:336)
          ... 14 more

          Comment


          • #6
            Originally posted by Rams View Post
            Hi now i am getting another error..........

            ERROR - Job Terminated in error:
            org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [FileToFileJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:349)
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
            at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
            at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:80)
            at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
            at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
            at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
            at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
            at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
            at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:1 90)
            at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
            Caused by: java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
            at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:143)
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:336)
            ... 14 more
            the error is.....

            ERROR - Job Terminated in error:
            org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [FileToFileJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:349)
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
            at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
            at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
            at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:80)
            at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
            at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
            at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
            at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
            at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
            at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:1 90)
            at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
            Caused by: java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
            at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:143)
            at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:336)
            ... 14 more

            Comment


            • #7
              Originally posted by Rams View Post
              the error is.....

              ERROR - Job Terminated in error:
              org.springframework.beans.factory.BeanDefinitionSt oreException: IOException parsing XML document from class path resource [FileToFileJob.xml]; nested exception is java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
              at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:349)
              at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:310)
              at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
              at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
              at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
              at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:212)
              at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:113)
              at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:80)
              at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:123)
              at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:422)
              at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:352)
              at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:139)
              at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:83)
              at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:1 90)
              at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
              Caused by: java.io.FileNotFoundException: class path resource [FileToFileJob.xml] cannot be opened because it does not exist
              at org.springframework.core.io.ClassPathResource.getI nputStream(ClassPathResource.java:143)
              at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:336)
              ... 14 more
              can any body help on this......!

              Comment


              • #8
                FileNotFoundException

                Hello,

                the FileNotFoundException is simply saying it can't find the file "FileToFileJob.xml" on the class path, so you should check if this is in the correct location!

                As this file seems to be your initial Spring Context I'm a bit confused, this was working before otherwise you wouldn't have gotten the error you initially wrote about.

                Best wishes,
                Robin

                Comment


                • #9
                  Hi Robin,

                  I am sorry wrong post, this it not FileToFileJob.xml

                  The actuall error is here...... can you please help on this...........



                  ERROR - Job Terminated in error:
                  org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar [SELECT JOB_INSTANCE_ID, JOB_NAME from batch_JOB_INSTANCE where JOB_NAME = ? and JOB_KEY = ?]; nested exception is java.sql.SQLException: ORA-00942: table or view does not exist

                  at org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator.doTranslate(SQLErrorCodeSQLExcep tionTranslator.java:220)
                  at org.springframework.jdbc.support.AbstractFallbackS QLExceptionTranslator.translate(AbstractFallbackSQ LExceptionTranslator.java:72)
                  at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:607)
                  at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:641)
                  at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:670)
                  at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:678)
                  at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:710)
                  at org.springframework.jdbc.core.simple.SimpleJdbcTem plate.query(SimpleJdbcTemplate.java:187)
                  at org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.getJobInstance(JdbcJobInstanceDao.j ava:221)
                  at org.springframework.batch.core.repository.support. SimpleJobRepository.getLastJobExecution(SimpleJobR epository.java:246)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:307)
                  at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:182)
                  at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :149)
                  at org.springframework.transaction.interceptor.Transa ctionInterceptor.invoke(TransactionInterceptor.jav a:106)
                  at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :171)
                  at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:204)
                  at $Proxy0.getLastJobExecution(Unknown Source)
                  at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:85)
                  at org.springframework.batch.core.launch.support.Comm andLineJobRunner.start(CommandLineJobRunner.java:2 07)
                  at org.springframework.batch.core.launch.support.Comm andLineJobRunner.main(CommandLineJobRunner.java:25 4)
                  Caused by: java.sql.SQLException: ORA-00942: table or view does not exist

                  at oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
                  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:331)
                  at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoe r.java:288)
                  at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java: 745)
                  at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4 CPreparedStatement.java:216)
                  at oracle.jdbc.driver.T4CPreparedStatement.executeFor Describe(T4CPreparedStatement.java:810)
                  at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1039)
                  at oracle.jdbc.driver.T4CPreparedStatement.executeMay beDescribe(T4CPreparedStatement.java:850)
                  at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1134)
                  at oracle.jdbc.driver.OraclePreparedStatement.execute Internal(OraclePreparedStatement.java:3339)
                  at oracle.jdbc.driver.OraclePreparedStatement.execute Query(OraclePreparedStatement.java:3384)
                  at org.apache.commons.dbcp.DelegatingPreparedStatemen t.executeQuery(DelegatingPreparedStatement.java:93 )
                  at org.springframework.jdbc.core.JdbcTemplate$1.doInP reparedStatement(JdbcTemplate.java:648)
                  at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:591)
                  ... 21 more

                  Comment


                  • #10
                    table or view does not exist

                    Hi Rams,

                    the error says that Spring-Batch cannot find the table "batch_JOB_INSTANCE" in your oracle database.

                    Maybe you forgot to create the tables in you schema (try looking at "schema-oracle10g.sql") or maybe the table was created in a different schema and you forgot to create synonyms? Maybe there are missing rights?

                    Try creating a session with your oracle database outside of spring, but by using the same connection settings, and test if the following select works: "SELECT JOB_INSTANCE_ID, JOB_NAME from batch_JOB_INSTANCE". Work from there!

                    Best wishes,
                    Robin

                    Comment


                    • #11
                      Hi Robin,

                      Thanks for your good response.

                      Actually i had created the table in Oracle10g database. but dont know about schema and synonyms.

                      The table structure is like this....


                      CREATE TABLE PLAYER (
                      PLAYER_ID INT unsigned NOT NULL ,
                      FIRST_NAME VARCHAR(20) NOT NULL ,
                      LAST_NAME VARCHAR(20) NOT NULL ,
                      POSITION VARCHAR(3) ,
                      DEBUT_YEAR INT,
                      FINAL_YEAR INT,
                      CAREER_LENGTH DOUBLE
                      );

                      can you pls help on this...

                      Comment


                      • #12
                        Spring Table

                        Hello Rams,

                        As the "MEMORY-JOBREPOSITORY.xml" is commented out and the "DB-JOBREPOSITORY.xml" you actually need to create the DB tables for the spring-batch REPOSITORY itself. This repository is used to create the controlling/metadata for the spring-batchframework.

                        But if you are starting to learn about spring-batch you could work without! For production environments you should always use a database, the in memory solution has it's problems...

                        Anyway for now:
                        You should uncomment the MEMORY jobrepository import statement in FileToTableJob.xml and comment the DB import.

                        So go from this:
                        <!--<import resource="MEMORY-JOBREPOSITORY.xml"/> -->
                        <import resource="DB-JOBREPOSITORY.xml"/>

                        to this:
                        <import resource="MEMORY-JOBREPOSITORY.xml"/>
                        <!--<import resource="DB-JOBREPOSITORY.xml"/> -->

                        hopefully nothing else was changed which might break the setup.

                        Your "Job-Repository" will now be in memory, the tables you use for the job itself are still in oracle.

                        Best wishes,
                        Robin

                        Comment


                        • #13
                          Hi bwawok/robinkrom,

                          It is working fine. I am very greatfull thanks you both for make me to complete this task.

                          Thanks Thanks Thanks............

                          Thanks & Regards,
                          Rams

                          Comment


                          • #14
                            Hi robin,

                            now i want run batch using DB-JOBREPOSITORY.xml and i had created the DB instances like the following way....
                            Code:
                            CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID NUMBER NOT NULL);
                            CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID NUMBER NOT NULL) 
                            CREATE TABLE BATCH_JOB_SEQ (ID NUMBER NOT NULL) 
                            CREATE TABLE BATCH_JOB_INSTANCE
                              (
                                JOB_INSTANCE_ID NUMBER PRIMARY KEY   ,
                                JOB_NAME        VARCHAR(100) NOT NULL,
                                JOB_KEY         VARCHAR(2500)
                              )
                            Code:
                            CREATE TABLE BATCH_JOB_PARAMS
                              (
                                JOB_INSTANCE_ID NUMBER NOT NULL,
                                TYPE_CD         VARCHAR(6) NOT NULL,
                                KEY_NAME        VARCHAR(100) NOT NULL,
                                STRING_VAL      VARCHAR(250),
                                DATE_VAL        DATE,
                                LONG_VAL        NUMBER,
                                DOUBLE_VAL DOUBLE PRECISION,
                                CONSTRAINT JOB_INSTANCE_PARAMS_FK FOREIGN KEY (JOB_INSTANCE_ID) REFERENCES BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
                              )
                            
                            CREATE TABLE BATCH_JOB_EXECUTION
                              (
                                JOB_EXECUTION_ID NUMBER PRIMARY KEY ,
                                VERSION          NUMBER,
                                JOB_INSTANCE_ID  NUMBER NOT NULL,
                                CREATE_TIME      DATE NOT NULL,
                                START_TIME       DATE NULL,
                                END_TIME         DATE NULL,
                                STATUS           VARCHAR(10),
                                EXIT_CODE        VARCHAR(20),
                                EXIT_MESSAGE     VARCHAR(2500),
                                LAST_UPDATED     DATE,
                                CONSTRAINT JOB_INSTANCE_EXECUTION_FK FOREIGN KEY (JOB_INSTANCE_ID) REFERENCES BATCH_JOB_INSTANCE(JOB_INSTANCE_ID)
                              )
                            
                            
                            CREATE TABLE BATCH_STEP_EXECUTION
                              (
                                STEP_EXECUTION_ID NUMBER PRIMARY KEY ,
                                VERSION           NUMBER NOT NULL,
                                STEP_NAME         VARCHAR(100) NOT NULL,
                                JOB_EXECUTION_ID  NUMBER NOT NULL,
                                START_TIME TIMESTAMP NOT NULL,
                                END_TIME TIMESTAMP NULL,
                                STATUS             VARCHAR(10),
                                COMMIT_COUNT       NUMBER,
                                READ_COUNT         NUMBER,
                                FILTER_COUNT       NUMBER,
                                WRITE_COUNT        NUMBER,
                                READ_SKIP_COUNT    NUMBER,
                                WRITE_SKIP_COUNT   NUMBER,
                                PROCESS_SKIP_COUNT NUMBER,
                                ROLLBACK_COUNT     NUMBER,
                                EXIT_CODE          VARCHAR(20),
                                EXIT_MESSAGE       VARCHAR(2500),
                                LAST_UPDATED TIMESTAMP,
                                CONSTRAINT JOB_EXECUTION_STEP_FK FOREIGN KEY (JOB_EXECUTION_ID) REFERENCES BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
                              ) 
                            
                            CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT
                              (
                                JOB_EXECUTION_ID NUMBER PRIMARY KEY,
                                SHORT_CONTEXT    VARCHAR2(2500) NOT NULL,
                                SERIALIZED_CONTEXT VARCHAR2(4000),
                                CONSTRAINT JOB_EXEC_CTX_FK FOREIGN KEY (JOB_EXECUTION_ID) REFERENCES BATCH_JOB_EXECUTION (JOB_EXECUTION_ID)
                              )
                            
                            CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT
                              (
                                STEP_EXECUTION_ID NUMBER PRIMARY KEY,
                                SHORT_CONTEXT     VARCHAR2(2500) NOT NULL,
                                SERIALIZED_CONTEXT VARCHAR2(4000),
                                CONSTRAINT STEP_EXEC_CTX_FK FOREIGN KEY (STEP_EXECUTION_ID) REFERENCES BATCH_STEP_EXECUTION(STEP_EXECUTION_ID)
                              )
                            and my DB-JOBREPOSITORY.xml is
                            Code:
                            <?xml version="1.0" encoding="UTF-8"?>
                            <beans xmlns="http://www.springframework.org/schema/beans"
                            xmlns:p="http://www.springframework.org/schema/p"
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                            xsi:schemaLocation="http://www.springframework.org/schema/beans 
                            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 
                            
                            <bean id="jobRepository-dataSource" 
                            class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> 
                            <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" /> 
                            <property name="url" value="jdbc:oracle:thin:@1X.XXX.XX.XXX:XXXX:XXXX" /> 
                            <property name="username" value="XXXXX" /> <!-- your user id. e.g. root--> 
                            <property name="password" value="XXXXX" /> <!-- your password-->
                            <property name="maxIdle" value="10"/> 
                            <property name="maxActive" value="100"/> 
                            <property name="maxWait" value="10000"/> 
                            <property name="validationQuery" value="select 1 from dual"/> 
                            <property name="testOnBorrow" value="true"/> 
                            <property name="testWhileIdle" value="true"/> 
                            <property name="timeBetweenEvictionRunsMillis" value="1200000"/> 
                            <property name="minEvictableIdleTimeMillis" value="1800000"/> 
                            <property name="numTestsPerEvictionRun" value="5"/> 
                            <property name="defaultAutoCommit" value="false"/> 
                            </bean> 
                            
                            <bean id="jobRepository-transactionManager" 
                            class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="true">
                            <property name="dataSource" ref="jobRepository-dataSource" /> 
                            </bean>
                            
                            <bean id="jobRepository" 
                            class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean">
                            <property name="dataSource" ref="jobRepository-dataSource" />
                            <property name="transactionManager" ref="jobRepository-transactionManager"/>
                            <property name="databaseType" value="oracle" />
                            <property name="tablePrefix" value="batch_"/>
                            </bean>
                            
                            <bean id="asyncTaskExecutor" 
                            class="org.springframework.core.task.SimpleAsyncTaskExecutor"/>
                            <bean id="syncTaskExecutor" 
                            class="org.springframework.core.task.SyncTaskExecutor" />
                            
                            <bean id="jobLauncher" 
                            class="org.springframework.batch.core.launch.support.SimpleJobLauncher"> 
                            <property name="jobRepository" ref="jobRepository"/> 
                            </bean>
                            <bean id="jobExplorer" 
                            class="org.springframework.batch.core.explore.support.JobExplorerFactoryBean" 
                            p:dataSource-ref="jobRepository-dataSource" p:tablePrefix="batch_" />
                            </beans>
                            and i am getting the following error...
                            Code:
                            org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jobRepository' defined in class path resource [DB-JOBREPOSITORY.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                            	at java.security.AccessController.doPrivileged(Native Method)
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
                            	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
                            	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
                            	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
                            	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
                            	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
                            	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
                            	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
                            	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
                            	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
                            	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
                            	at org.springframework.batch.core.launch.support.CommandLineJobRunner.start(CommandLineJobRunner.java:190)
                            	at org.springframework.batch.core.launch.support.CommandLineJobRunner.main(CommandLineJobRunner.java:254)
                            	at FileToTableMain.main(FileToTableMain.java:8)
                            Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamException
                            	at org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer.init(XStreamExecutionContextStringSerializer.java:65)
                            	at org.springframework.batch.core.repository.dao.XStreamExecutionContextStringSerializer.afterPropertiesSet(XStreamExecutionContextStringSerializer.java:60)
                            	at org.springframework.batch.core.repository.dao.JdbcExecutionContextDao.afterPropertiesSet(JdbcExecutionContextDao.java:155)
                            	at org.springframework.batch.core.repository.support.JobRepositoryFactoryBean.createExecutionContextDao(JobRepositoryFactoryBean.java:169)
                            	at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean.getTarget(AbstractJobRepositoryFactoryBean.java:139)
                            	at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean.initializeProxy(AbstractJobRepositoryFactoryBean.java:129)
                            	at org.springframework.batch.core.repository.support.AbstractJobRepositoryFactoryBean.afterPropertiesSet(AbstractJobRepositoryFactoryBean.java:135)
                            	at org.springframework.batch.core.repository.support.JobRepositoryFactoryBean.afterPropertiesSet(JobRepositoryFactoryBean.java:126)
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
                            	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
                            	... 17 more
                            can you please correct me............
                            can any body correct me here..........
                            Last edited by Rams; May 16th, 2011, 09:09 AM. Reason: format not proper

                            Comment


                            • #15
                              any body can help here....

                              Comment

                              Working...
                              X