what does this mean? sequence not allowed?

2010-05-27
2012-12-07
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    hi ..

    i'm trying to create a filter for each table that instead of exporting primary keys it will export a new sequence number (i'm hoping jariler can handle that)

    but i get :
    08:57:19,156  INFO   -     UNDERWRITE_LAYERS              141
    2010-05-27 08:57:19,172  INFO   - writing file 'brief.sql'…
    2010-05-27 08:57:19,203  INFO   - independent tables: UNDERWRITE_COLLECTIVE, UNDERWRITE_DECISION_DATA, UNDERWRITE_AGENTS, UNDERWRITE_RISK_CONTAINER, UNDERWRITE_LAYERS
    2010-05-27 08:57:19,234  INFO   - starting 5 jobs
    2010-05-27 08:57:19,328  ERROR  - Job-error
    java.lang.RuntimeException: job-runner 23 failed
    at net.sf.jailer.util.JobManager.setException(JobManager.java:254)
    at net.sf.jailer.util.JobManager.access$400(JobManager.java:30)
    at net.sf.jailer.util.JobManager$JobRunner.run(JobManager.java:95)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.sql.SQLException: ORA-02287: sequence number not allowed here

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1031)
    at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1124)
    at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1264)
    at net.sf.jailer.database.Session.executeQuery(Session.java:357)
    at net.sf.jailer.entitygraph.EntityGraph.readEntities(EntityGraph.java:529)
    at net.sf.jailer.Jailer.writeEntities(Jailer.java:471)
    at net.sf.jailer.Jailer.access$500(Jailer.java:96)
    at net.sf.jailer.Jailer$9.run(Jailer.java:801)
    at net.sf.jailer.util.JobManager$JobRunner.run(JobManager.java:92)
    … 1 more

     
  • Ralf Wisser
    Ralf Wisser
    2010-05-27

    please take a look into the sql.log file and post the erroneous statement here or send it via email.

    Ralf

     
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    that's the whole point, it doesn't give me any statment

     
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    sorry my bad, just a sec..

     
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    Select (select hibernate_sequence.nextval from dual) as ID, T.COLLECTIVENAME as COLLECTIVENAME, T.CITYNAME as CITYNAME, T.HOUSENUMBER as HOUSENUMBER, T.STREETNAME as STREETNAME, T.ZIPCODE as ZIPCODE, T.AREACODE as AREACODE, T.PHONENUMBER as PHONENUMBER, T.CREATED as CREATED, T.MODIFIED as MODIFIED, T.DELETED as DELETED, T.STATUSINLEGACY as STATUSINLEGACY, T.UNDERWRITEABLE as UNDERWRITEABLE, T.NEWCHANGE as NEWCHANGE From JAILER_ENTITY_T E join UNDERWRITE_COLLECTIVE T on E.PK0=T.ID and E.PK1 is null and E.PK2 is null Where E.birthday>=0 and E.r_entitygraph=651459325 and E.type='UNDERWRITE_COLLECTIVE'

     
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    ok solved it now, now for next problem.

     
  • Ralf Wisser
    Ralf Wisser
    2010-05-27

    I don't know why oracle dont accept this query, but you could try to call hibernate_sequence.nextval directly without the "select from dual" subquery. (ID:=hibernate_sequence.nextval)

     
  • Elhanan Maayan
    Elhanan Maayan
    2010-05-27

    yea i did just that, it's ok now, i already posted the next problem.