Announcement Announcement Module
Collapse
No announcement yet.
Problem Running in JOB Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem Running in JOB

    When I am running my job I am getting following error.

    org.springframework.dao.DataAccessResourceFailureE xception: Could not obtain identity(); nested exception is java.sql.SQLException: ORA-00904: "IDENTITY": invalid identifier

    at org.springframework.jdbc.support.incrementer.HsqlM axValueIncrementer.getNextKey(HsqlMaxValueIncremen ter.java:157)
    at org.springframework.jdbc.support.incrementer.Abstr actDataFieldMaxValueIncrementer.nextLongValue(Abst ractDataFieldMaxValueIncrementer.java:103)
    at org.springframework.batch.core.repository.dao.Jdbc JobInstanceDao.createJobInstance(JdbcJobInstanceDa o.java:62)
    at org.springframework.batch.core.repository.support. SimpleJobRepository.createJobExecution(SimpleJobRe pository.java:179)
    at org.springframework.batch.core.launch.support.Simp leJobLauncher.run(SimpleJobLauncher.java:83)
    at org.springframework.batch.sample.AbstractBatchLaun cherTests.testLaunchJob(AbstractBatchLauncherTests .java:87)
    at org.springframework.batch.sample.AbstractValidatin gBatchLauncherTests.testLaunchJob(AbstractValidati ngBatchLauncherTests.java:34)
    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 junit.framework.TestCase.runTest(TestCase.java:154 )
    at junit.framework.TestCase.runBare(TestCase.java:127 )
    at org.springframework.test.ConditionalTestCase.runBa re(ConditionalTestCase.java:76)
    at junit.framework.TestResult$1.protect(TestResult.ja va:106)
    at junit.framework.TestResult.runProtected(TestResult .java:124)
    at junit.framework.TestResult.run(TestResult.java:109 )
    at junit.framework.TestCase.run(TestCase.java:118)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:436)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:311)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:192)
    Caused by: java.sql.SQLException: ORA-00904: "IDENTITY": invalid identifier

    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: 743)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStateme nt.java:207)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe (T4CStatement.java:790)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDes cribe(OracleStatement.java:1031)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescri be(T4CStatement.java:830)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTi meout(OracleStatement.java:1124)
    at oracle.jdbc.driver.OracleStatement.executeQuery(Or acleStatement.java:1264)
    at org.apache.commons.dbcp.DelegatingStatement.execut eQuery(DelegatingStatement.java:205)
    at org.springframework.jdbc.support.incrementer.HsqlM axValueIncrementer.getNextKey(HsqlMaxValueIncremen ter.java:142)
    ... 20 more

    Can any one please help?

  • #2
    You are using Hsql incrementer with Oracle database - check your JobRepositoryFactory bean and make sure the databaseType property is "oracle", not "hsql".

    Comment

    Working...
    X