Native sequences in DB2

I've just read in the docs that native sequences for DB2 are not supported.
Blissfully unaware of this, we have been using native sequencing with db2 (and toplink 9.0.3) and it worked OK. After updating to 9.0.4, it stopped working (same id is used several times).
What is the problem with db2 sequences? Is there a plan to support them some time in the future?
Thank you,
Ana Oleski

Cache connect does not cache Oracle sequences; so if you need to share the same Oracle sequence in both TimesTen and Oracle, then you will need to go to Oracle and retrieve the nextval each time.

Similar Messages

  • Oracle native sequencing: nextVal executed two times.

    We are migrating from Weblogic 6.1 sp 5 & TopLink 3.6.3 to Weblogic 8.1 sp 2 & TopLink 9.0.4 and we are having this issue:
    It seems that when assigning the sequence to new objets TopLink execs the nextVal for the sequence twice. In fact we probably wouldn't notticed it if it was just that, the problem is that TopLink seems to register the object into the cache with an oid and assigning the next one to the object stored in the database so we are getting NoSuchObjectException each time we try to access them.
    Here is a dump of TopLink's log showing the problem:
    [TopLink]: ServerSession(22807116)--Connection(0)--client acquired
    [TopLink]: ClientSession(25858791)--Connection(0)--acquire unit of work: 10772417
    [TopLink]: UnitOfWork(10772417)--Connection(0)--JTS register
    [TopLink]: ServerSession(22807116)--Connection(17740413)--SELECT SEQ_BOOK.NEXTVAL FROM DUAL
    [TopLink]: ServerSession(22807116)--Connection(17558511)--SELECT SEQ_PAGE.NEXTVAL FROM DUAL
    [TopLink]: UnitOfWork(10772417)--Connection(0)--Before JTS Completion
    [TopLink]: UnitOfWork(10772417)--Connection(25919386)--Begin batch statements
    [TopLink]: UnitOfWork(10772417)--Connection(25919386)--INSERT INTO AUTHOR (NAME, OCA, OID) VALUES (?, ?, ?)
    [TopLink]: UnitOfWork(10772417)--Connection(0)-- bind => [Roger Penrose, 2004-05-11 18:54:01.917, 442803]
    [TopLink]: UnitOfWork(10772417)--Connection(25919386)--End Batch Statements
    [TopLink]: ClientSession(25858791)--Connection(25919386)--Begin batch statements
    [TopLink]: ClientSession(25858791)--Connection(25919386)--INSERT INTO BOOK (NAME, OCA, OID, OID_AUTHOR) VALUES (?, ?, ?, ?)
    [TopLink]: ClientSession(25858791)--Connection(0)-- bind => [The Emperor's New Mind, 2004-05-11 18:54:01.92, 347404, 442803]
    [TopLink]: ClientSession(25858791)--Connection(0)-- bind => [Shadows of the Mind, 2004-05-11 18:54:01.943, 347405, 442803]
    [TopLink]: ClientSession(25858791)--Connection(25919386)--End Batch Statements
    [TopLink]: UnitOfWork(10772417)--Connection(0)--After JTS Completion
    [TopLink]: UnitOfWork(10772417)--Connection(0)--release unit of work
    [TopLink]: ClientSession(25858791)--Connection(0)--client released
    [TopLink]: ServerSession(22807116)--Connection(0)--client acquired
    [TopLink]: ClientSession(116689)--Connection(0)--acquire unit of work: 32580168
    [TopLink]: UnitOfWork(32580168)--Connection(0)--JTS register
    [TopLink]: UnitOfWork(32580168)--Connection(0)--Before JTS Completion
    [TopLink]: UnitOfWork(32580168)--Connection(17129104)--Begin batch statements
    [TopLink]: UnitOfWork(32580168)--Connection(17129104)--INSERT INTO AUTHOR (NAME, OCA, OID) VALUES (?, ?, ?)
    [TopLink]: UnitOfWork(32580168)--Connection(0)-- bind => [Benoit Mandelbrot, 2004-05-11 18:54:49.264, 442805]
    [TopLink]: UnitOfWork(32580168)--Connection(17129104)--End Batch Statements
    [TopLink]: ClientSession(116689)--Connection(17129104)--Begin batch statements
    [TopLink]: ClientSession(116689)--Connection(17129104)--INSERT INTO BOOK (NAME, OCA, OID, OID_AUTHOR) VALUES (?, ?, ?, ?)
    [TopLink]: ClientSession(116689)--Connection(0)-- bind => [Les objets fractals, forme, hasard et dimension, 2004-05-11 18:54:49.266, 347409, 442805]
    [TopLink]: ClientSession(116689)--Connection(0)-- bind => [The Fractal Geometry of Nature, 2004-05-11 18:54:49.282, 347408, 442805]
    [TopLink]: ClientSession(116689)--Connection(17129104)--End Batch Statements
    [TopLink]: UnitOfWork(32580168)--Connection(0)--After JTS Completion
    [TopLink]: UnitOfWork(32580168)--Connection(0)--release unit of work
    [TopLink]: ClientSession(116689)--Connection(0)--client released
    the test is about creating two objects (well, we are actually creating 6 objects in this sample as we are creating two "master" objects and adding two related (in a one to many relationship) objects to each one.)
    The thing I would like you to notice is this:
    The first AUTHOR object gets assigned the OID 442803 wether the next AUTHOR object gets the OID 442805 although we expected it to be 442804.
    The same occurs with the objects in the "many" side of the relation. They get sibiling OIDs but with a gap of two OIDs when creating the last two.
    I have been searching for simmilar problems in this forums and I found two posts:
    Both where related to a bug of an older version of TopLink (9.0.3 I think) when using something different than a number for the sequence field of an object. I expect it to be fixed in 9.0.4 version as it seemed to be fixed even for the 9.0.3 version. May it be a regression bug?
    Anyway, we are using BigDecimal on entity bean's sequence number and IIRC NUMBER(18) in Oracle tables.
    Currently our TopLink version is: 9.0.4 (031126)
    Our native sequence has an allocation size of 200 and it matches with SEQUENCEs defined in Oracle.
    As we are migratting from TopLink 3.6.3 and we have not changed the sequence prealocation size (we have not touched the database at all) we don't expect the problem to be on sequence prealocation.
    I must say we have changed the "default" JDBC driver that TopLink uses when doing the issuing the loging phase (which I think is a SUN driver) to an oracle.jdbc.driver.OracleDriver as we were having problems with timestamp locking.
    Any idea?
    Thanks in advance.

    It was my fault. I was doing a really nasty thing to the entity beans.
    I must publicly thank my work mate (which is a pretty smart girl, I must say) in tracking down this issue.
    Here is what (we think) was happening:
    As I told in previous post in this post we are in the process of moving from TopLink 3.6.3 (EJB 1.1) to TopLink 9.0.4 (EJB 2.0). We do have a "super class" in our application where we had some common things of our entity beans, i.e. entityContext, oid and oca attributes. We have also some methods that retrieve and set values from and to the entity beans via value objects (in order to avoid the heavy RMI operations when doing it through "standard" getters and setters) well, it happened that the current implementation of the "batch setting" method used the getDeclaringMethods to update in both UPDATE and INSERT opperations entity attributes with the data of the value object.
    When switching to EJB 2.0 we had to push down both the oid and oca attributes (in order of being able do deploy them) to each final entity bean and now they where being included in the setting process!
    You can imagine an scenario like this:
    1. ejbCreate() // TopLink issues the SELECT SEQ_XXX NEXT VAL FROM DUAL and sets the oid of the EJB
    2. setAttributes() // transfer info from the value object to the newly created EJB: including a setOid(null)!
    3. commit() (Before Completion)
    4. TopLink detects that the damm object surprisingly DOES NOT have the oid attribute setted so it performs another SELECT SEQ_XXX NEXT VAL FROM DUAL in order to "fix" this big problem.
    5. commit() (After Completion) // the object is written to the database with the second value from the sequence whereas the first value is used to identify the entity bean into the identity cache.
    Well it may not be "exactly" what is happening but I'm sure we are not so far from reality with our assumptions.
    Andrei Ilitchev, thanks for your interest, sorry I could not post this sooner.

  • Native sequencing problem

    Hi all,
    I'm using Oracle9i database together with TopLink 9.0.4
    and I can't get started native sequencing.
    I've created a sequence using following script:
    I've set up the project and session to use native sequencing, plus I've run the following code once:
    Project project ="project.xml");
    DatabaseSession session = project.createDatabaseSession();
    SchemaManager schemaManager = new SchemaManager(session);
    but it's still not working.
    Then I've tried default sequencing option, but it's the same.
    Only the third option using custom sequence table works.
    Did anybody make it work or am I doing anything wrong?
    Any help will be appreciated.

    sorry, my mistake, it's ok now

  • Native sequence issue

    I have a News domain object which is mapped to a News table. I have inserted some sample data into the table. The newsid column reaches 81 and hence i created a sequence for this column like
    i configured toplink to use native sequencing and also set the pre-allocation size to 50.
    When do a bulk insert .,toplink registers the objects and start to assign the sequence number. When it does a call to get the sequence number, the value returned is suprising.
    2003.08.27 09:58:57.467--UnitOfWork(4435274)--Thread[Thread-22,5,main]--begin unit of work commit
    2003.08.27 09:58:57.473--ClientSession(19256680)--Thread[Thread-22,5,main]--Execute query DataReadQuery()
    2003.08.27 09:58:57.495--ServerSession(14765756)--Thread[Thread-22,5,main]--Connection(33038931)--SELECT NEWS_SEQ.NEXTVAL FROM DUAL
    2003.08.27 09:58:57.526--ServerSession(14765756)--Thread[Thread-22,5,main]--sequencing preallocation for NEWS_SEQ: objects: 50 , first: 51, last: 100
    2003.08.27 09:58:57.527--UnitOfWork(4435274)--Thread[Thread-22,5,main]--assign sequence to the object (51 -> [email protected])
    2003.08.27 09:58:57.527--UnitOfWork(4435274)--Thread[Thread-22,5,main]--assign sequence to the object (52 -> [email protected])
    when it does the insert, i get primary key constraint violation error ( since news ids 1 to 81 are already inserted as sample data).
    i have created a sequence to start with 100, but how can news_seq.nextval be 50 ( first: 51 )
    thanks in advance.

    When TopLink aquires a new sequence value with preallocation it assumes that the prevous 50 (preallocation size) of values are valid to be used.
    when we aquire 150 we assume we have 100-150, when we next aquire 200 we assume we have 150-200.
    So you need to set the START WITH to 50 > than the actualy number you wish TopLink to start with. In your case this should be 150. In general if you wish to start with 1, then START WITH 50 should be used.

  • Use oracle native sequence

    How one can use oracle native sequence in Insert/update in a Toplink POJO?
    Thanks in advance...

    Just set the Oracle Sequence name as the descriptor's sequence name (ClassDescriptor.setSequenceName()), and configure your Session to use native sequencing.
    If you are using JPA you need to use a @SequenceGenerator see,
    James :

  • Why is the  "Use Native Sequencing" option disabled ?

    I am trying Toplink with SQL Server and I have some identity fields... I see in the documentation that I should select the "Use Native Sequencing" option in the mapping properties(Database Info tab) but it is disabled(I use JDeveloper Is there any reason for this ?
    Thanks in advance.

    Native sequencing should be configurable for the SQL Server platform. I have filed a bug to track this.
    The easiest workaround is to select a different database platform (i.e. Oracle) and then enable native sequencing. You should then set it back to SQL Server. In my quick test it kept the native sequencing configuration even though it shows as disabled.

  • Problem with Oracle Native Sequencing - please help!!

    I am migrating from 3.6.5 to (huge jump).
    And have a problem with sequencing.
    When I create new object Toplink does not pick up Sequence object name from the descriptor.
    When I see generated SQL it shows:
    Each of my descriptor has it's own "..._seq" name defined in workbench.
    For DatabaseLogin i define
    As a result - no luck.
    Do I miss something, some command?

    I was doing more testing and found that the problem happens when I do

  • Native sequencing - What happened to getSequenceNumberNamed() ?

    The TL FAQ is stating that:
    "If you want the sequence number assigned at the creation time:
    1. Create your new object and assign it its identifier by using the following protocol:
    Number nextID = session.getPlatform().getSequenceNumberNamed ("SEQ_NAME", session, "SESSION_NAME");"
    Okay but I didn't find any "getSequenceNumberNamed" having this signature. What happened to it ?
    The FAQ is also saying: "Note that this is not a public API protocol, although it is publicly accessible". How ?
    Many thanks in advance,

    I just checked through the source code (did you know that TopLink has always shipped source code?) See in the lib directories... I looked at the DatabasePlatform class, and you're right -- in 903 that method is there, but it was removed in 904. I'll check with Engineering to see if they have alternate suggestions.
    - Can you post the link to the FAQ you saw with this suggestion? I want to make sure it's not accidentally in a 904+ FAQ.
    - Note that we try extremely hard not to deprecate API to make migration easier. Some methods we flag in the Javadoc as "internal", yet they are still public. They don't show up in the Java doc. That means that advanced users could potentially use these API in a pickle (with help from code-completion tools/consulting/FAQ's/etc), but that we reserve the right to change the API without deprecating it since it's practically internal API...
    - Don

  • Toplink on existing application

    we are trying to use toplink for an existing j2ee application. The existing application uses dao approach (we have plain java object model and whenever we want to persist an object, we call its corresponding dao).Each dao has an insert,update method. The transaction is handled by container, and we uses a stateless session bean for that. Each ejb method execution is a complete transaction. Database connections are maintained by application server (websphere 4) and we use jndi to get hold of connections.
    1.If we migrate to toplink, can we use the same architecture? If not what will be the best approach for this?
    2.Should we use DatabaseSession or ServerSession?
    3.If we use ServerSession, we found that we have to use unit of work for persisting. But unit of work doesnt have direct insert/update api. So can we use dao approach with ServerSession?
    4. The database is db2 and some tables use identity columns. Is there any workaround (like modifying source) for that as we found toplink doesnt support identity columns? .

    1 - If you just want to use TopLink to take your value objects and push them into the database, and build objects out of result sets, then you could just use DatabaseSession and the write/readObject API. But the value of TopLink is it's concurrency support and caching/locking/sequencing/transaction support. I.e., Unit Of Work. I'd need some time to look at what you have but generally in these situations you could simply plug TopLink into your DAO pattern with DAtabaseSessions and read/writeObject API, but for the long term I'd recommend considering some architecture changes to leverage the UOW and other features.
    2 - Ultimately you want the concurrent and scalable ServerSession, but if you're just looking for a quick plug of TopLInk into your existing app, you might have to use multiple DatabaseSessions. Would need to see your app to offer better advice.
    4 - We do support Identity on Sybase and MS SQL Server, but for some technical reasons dating back several years, we do not support native sequencing on DB2.
    - Don

  • Using native database sequences in ODI

    I am using ODI on windows 64 bit machine.
    I have written the following queries:
    create table sequence_src (EmpName varchar(20), salary int);
    create table sequence_tgt( CustId int, CustName varchar(20));
    create sequence emp_sequence
    minvalue 101
    maxvalue 999
    start with 101
    increment by 1;
    insert into sequence_src values('abc',1000);
    insert into sequence_src values('sdsd',2000);
    insert into sequence_src values('ress',3000);
    insert into sequence_src values('zzx',4000);
    insert into sequence_src values('dsw',5000);
    So as you see i have created sequence named emp_sequence in my database
    When i map the target column i.e EmpID with the following implementation
    I get an error when the interface runs saying  " EMPID" is an invalid identifier on target connection oracle
    how to solve this error?
    can anyone tell how to use database native sequences in ODI       
    EDIT: This is complete error log
    ODI-1228: Task native_sequence (Integration) fails on the target ORACLE connection all_oracle11g_server.
    Caused By: java.sql.SQLSyntaxErrorException: ORA-00904: "EMPID": invalid identifier
      at oracle.jdbc.driver.T4CTTIoer.processError(
      at oracle.jdbc.driver.T4CTTIoer.processError(
      at oracle.jdbc.driver.T4C8Oall.processError(
      at oracle.jdbc.driver.T4CTTIfun.receive(
      at oracle.jdbc.driver.T4CTTIfun.doRPC(
      at oracle.jdbc.driver.T4C8Oall.doOALL(
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(
      at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(
      at oracle.jdbc.driver.OraclePreparedStatement.execute(
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(
      at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(
      at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(
      at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(
      at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(

    This is error log
    insert into ODIWR.I$_SEQUENCE_TGT
    from (
      'I' IND_UPDATE
    where (1=1)
    ) S
    where NOT EXISTS
      ( select 1 from ODIWR.SEQUENCE_TGT T
      where T.CUSTID = S.CUSTID

  • Native sql DBCO, CONNECT statement short dump

    Hi ALL ,
    I am facing the  problem here.  please help me out in this.
    i am trying to connce to the external database MSS, i made all the entries in the DBCO t-code and writing the follwoing native sql statement.
    The above statement is not giving any error  when i activate it but when i execute it is giving me shortdump error .
    I already maintan   entries in DBCON table or DBCO t-code
    And also tel me once it is connect how can i access the data from MSS (Microsoft sql server)i mean what kind of statement.
    helpfull answer will be rewarded.
    Message was edited by:
            anees jawad

    Native SQL
    Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.
    As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.
    Native SQL Statements in ABAP Programs
    To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    The parameters are separated by commas. You must also specify whether the parameter is for input (IN), output (OUT) or input and output (INOUT). For further information, refer to SAP Note 44977.
       EXECUTE PROCEDURE proc1 ( IN , OUT :y )
    Cursor Processing
    Cursor processing in Native SQL is similar to that in Open SQL:
      CLOSE c1
    This example opens a cursor, reads data line by line, and closes the cursor again. As in Open SQL, SY-SUBRC indicates whether a line could be read.
    Data Types and Conversions
    Using Native SQL, you can
    Transfer values from ABAP fields to the database
    Read data from the database and process it in ABAP programs.
    Native SQL works without the administrative data about database tables stored in the ABAP Dictionary. Consequently, it cannot perform all of the consistency checks used in Open SQL. This places a larger degree of responsibility on application developers to work with ABAP fields of the correct type. You should always ensure that the ABAP data type and the type of the database column are identical.
    If the database table is not defined in the ABAP Dictionary, you cannot refer directly to its data type. In this case, you should create a uniform type description in the ABAP Dictionary, which can then be used by all application programs.
    If the table is defined in the ABAP Dictionary, you should remember that the sequence of fields in the ABAP Dictionary definition may not be the same as the actual sequence of fields in the database. Using the asterisk (*) in the SELECT clause to read all columns into a corresponding work area would lead to meaningless results. In the worst case, it would cause an error.
    The Native SQL module of the database interface passes a description of the type, size, and memory location of the ABAP fields used to the database system. The relevant database system operations are usually used to access and convert the data. You can find details of these operations in the manuals for the programming interface of the relevant database system. In some cases, Native SQL also performs other compatibility checks.
    The documentation from the various database manufacturers provides detailed lists of combinations of ABAP data types and database column types, both for storing ABAP field values in database tables (INSERT, UPDATE) and for reading database contents into ABAP fields (SELECT). You can also apply these descriptions for the input and output parameters of database procedures. Any combinations not listed there are undefined, and should not be used.
    The following sections provide details of the data types and conversions for individual databases. Although they are database-specific, there are also some common features.
    Recommended type combinations are underlined. Only for these combinations is behavior guaranteed from release to release. For any other combinations, you should assume that the description only applies to the specified release.
    The results of conversions are listed in a results column:
    "OK": The conversion can be performed without loss of data.
    Operations that fail are indicated by their SQL error code. Errors of this kind always lead to program termination and an ABAP short dump.
    In some cases, data is transferred without an SQL error occurring. However, the data is truncated, rounded, or otherwise unusable:
    Right truncation.
    "Left" or "right" applies to the normal way of writing a value. So, for example, if a number is truncated, its decimal places are affected.
    : Left truncation
    : Number is rounded up or down during conversion
    : A number that was "too small" is rounded to 0 (underflow)
    : The conversion result is undefined.
    There are several possible results. The concrete result is either not known at all, or can only be described using a set of rules that is too complicated for practical use.
    : The conversion returns the SQL value NULL.
    : The conversion is performed without fields and unchecked.
    The original data is converted, but without its format being checked. The result may therefore be a value invalid for the result type, which cannot be processed further. An example of this is a date field containing the value "99999999" or "abcdefgh" after conversion.
    Combinations of ABAP data type and database column type can be divided into finer subcategories. Here, for example, using the transfer direction ABAP ® database (INSERT, UPDATE):
    If the width of the ABAP field is greater than that of the database column, the ABAP field may contain values for which there is not enough space in the database column. This can produce other cases: The concrete data value in ABAP finds space in the database column, or not.
    If the ABAP field is at most as long as the database column, there is always space for the ABAP value in the database column.
    Some types, such as numeric columns, expect values in a particular format. This is particularly important in connection with character types, for example, when you want to write an ABAP character field (type C) into an integer column.
    Native SQL for Oracle
    Native SQL for Informix
    Native SQL for DB2 Common Server

  • Problem with DB sequences - Annoying

    Hi All,
    I have a target table and for one of the columns (which is not null), I am using a Db sequence as the mapping (abc_seq.nextval). It is set to Target.
    What happens is that sometimes when the interface runs, it runs without any issues..but sometimes, it simply cannot get a value for the sequence and hence tries to insert a NULL value and throws error.
    The column XXXXX cannot be null
    When I try to run the below in the DB, it works fine.
    select abc_seq.nextval from dual;
    This is very very annoying as when I think everything works fine, then this problem arises..Below are some of the ways that I am able to get rid of this problem so far...
    1. Restart ODI application.
    2. Open the interface again and then select : Execute on Target...
    This issue is happening for almost all the interfaces created.
    But these are not a permanent solution. Anyone can help me ?
    I am using ver -
    Edited by: 937825 on Jul 4, 2012 1:37 PM
    Edited by: 937825 on Jul 4, 2012 1:37 PM

    how you implemented mapping for sequence, using native sequence or any another way...

  • Can't get Sequencing working (table or view does not exist...)

    I'm running JDeveloper 10.1.2 on a Oracle 9i database.
    All my mappings are correct, i mean, i can query the database using the Toplink API and list all the objects on teh database. What it's not working is inserting new objects due to this sequencing problem.
    This is what i'm doing:
    myClass newObject = (myClass) uow.newInstance(myClass.class);
    But this is generating this Exception:
    Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g ( (Build 040930)): oracle.toplink.exceptions.DatabaseExceptionException Description: java.sql.SQLException: ORA-00942: table or view does not exist
    Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    Error Code: 942
    I figured this could be a problem with the sequencing configuration and all that stuff (I don't have a sequence table). So i checked my configurations...
    'Toplink Mappings' is setup to 'Use Native Sequencing', as per Notes on This page also states this:
    "When using native sequencing with Oracle, specify the name of the sequence object (the object that generates the sequence numbers) for each descriptor. The sequence preallocation size must also match the increment on the sequence object" (...) "Use preallocation and native sequencing for Oracle databases.
    And this is exactly what i'm doing. On myClass mappings, the 'Use Sequencing' checkbox is checked, the correct sequence name is typed correctly, once this is the same sequence i've been using for years prior to Toplink, the selected table is the correct one, just as the id field on the table.
    Another thing is that the 'Preallocation Size' on Toplink Mappings match the increment value on the database sequence.
    I must be missing something...
    Can anybody shed some light on this?
    Thanks a lot to all.

    The method accessing check box tells TopLink to use the get/set methods on your object to set its attributes - If it is unselected, TopLink will set the attribute directly. Great if you have business logic in your get/set methods that you don't want TopLink to hit each time it creates an object after a read from the database (or registers, etc).
    The problem you are encountering seems like you have sequencing set to "Use Default Sequencing Table". This option is on the "TopLink Mappings" page on the "Database info" tab just below where you would have set which connection to use. You will need to ensure you have the "use Native sequencing" selected. If you set this information instead through code, be sure you do it on the database login before you login to the session.
    If this doesn't help, try turning on TopLink logging to see the SQL statement that causes the problem. The knowing the table name and SQL being used might help figure out where it is being set.
    Best Regards,

  • When I'm done with my fcp sequence, whats the best way to get it to dvd?

    When I'm done with my fcp sequence, whats the best way to get it to dvd?

    The advice to go to Compressor left out the part that you may want to convert your audio to AC3 becaus ethe MPEG2 bitrate is probably too high for DVD specs.
    This method is in the DVDSP manual and it's in the Compressor manual, both difficult to locate, but easily searchable.
    Here's what I'd do: Export the timeline form FCP in the native sequence settings, self-contained. Bring that self-contained movie into DVDSP and let DVDSP handle the transcode.
    The advice to go to iDVD is even easier.

  • Sequence number different in DB than from assignSequenceNumber()

    I am using TopLink 10.1.3 DP4 (I think - inside JDev build 3565). I am attempting to use a sequence in a schema that I DO NOT OWN - I cannot make modifications tot he database sequence because there are other applications in place running against it.
    The database sequence is in a 10g database, with an interval of 1 and a cache of 20.
    My object uses the value of the sequence as the sole element of its primary key. I am creating a new object, registering it with a UnitOfWork using registerNewObject(obj). It seems that this does not make a clone, since the object returned by this method is the same identity as the object passed in.
    My project sequencing policy is set as follows:
    <sequencing-type>Use native sequencing</sequencing-type>
    Platform is 10g
    The sequence is accessed through a synonym (since JDev couldn't seem to reference a sequence in a different schema from a user's login).
    When I commit my new object, I can see the insert statements in the log claiming a value of 'x' for the primary key. The row in the database actually has a primary key of 'y', where 'x = y - preallocation size' and 'y = sequence last number - preallocation size'. I think I would get the right number if I could set the preallocation size to 0 (performance problems understood) but TopLink chokes on this at run-time.
    Is this problem familiar to anyone?
    Failing using native sequencing, I tried to write custom SQL for the insert statement, but I couldn't find any decent examples anywere on how to do that. I found in a deep google search an example that showed you could use hash (#) to reference the value of a property, but what if the value that needs to be inserted in the database is held in an indirect referenced object? For example, if I was trying to write an insert sql for a Pet object with an indirect reference (valueHolder) to its owner, and I needed to put the owner id in the row - how would I write that insert statement in the 'custom sql' pane in workbench?
    Thanks for your help.

    Very strange case.
    I tried to reproduce it using TopLink Employee example - and couldn't.
    Here's the code:
        //  to get debug info
        UnitOfWork uow = session.acquireUnitOfWork();
        Employee emp = new Employee();
        System.out.println("firstName = "+emp.getFirstName() +"; id="+ emp.getId());And here's the log:
    [TopLink Info]: 2006.01.26 04:49:05.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink - 10g Release 3 ( (Build 060116)
    [TopLink Config]: 2006.01.26 04:49:06.171--DatabaseSessionImpl(18)--Connection(19)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
         user name=> "test"
         datasource URL=> "jdbc:oracle:thin:@localhost:1521:orcl"
    [TopLink Config]: 2006.01.26 04:49:10.140--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--Connected: jdbc:oracle:thin:@localhost:1521:orcl
         User: TEST
         Database: Oracle Version: Oracle9i Enterprise Edition Release - Production
    With the OLAP and Oracle Data Mining options
    JServer Release - Production
         Driver: Oracle JDBC driver Version:
    [TopLink Finest]: 2006.01.26 04:49:10.625--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_NoTransaction_State
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence PROJ_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence ADDRESS_SEQ: preallocation size 1
    [TopLink Finest]: 2006.01.26 04:49:10.718--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequence EMP_SEQ: preallocation size 1
    [TopLink Info]: 2006.01.26 04:49:11.453--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])-- login successful
    [TopLink Finer]: 2006.01.26 04:49:11.703--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--acquire unit of work: 48
    [TopLink Finest]: 2006.01.26 04:49:11.703--UnitOfWork(48)--Thread(Thread[main,5,main])--Register the new container bean Employee: sequencingTest
    [TopLink Finest]: 2006.01.26 04:49:11.734--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--Execute query ValueReadQuery()
    [TopLink Fine]: 2006.01.26 04:49:11.750--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--SELECT EMP_SEQ.NEXTVAL FROM DUAL
    [TopLink Finest]: 2006.01.26 04:49:12.328--DatabaseSessionImpl(18)--Thread(Thread[main,5,main])--sequencing preallocation for EMP_SEQ: objects: 1 , first: 3,469, last: 3,469
    [TopLink Finest]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--assign sequence to the object (3,469 -> Employee: sequencingTest )
    [TopLink Finer]: 2006.01.26 04:49:12.328--UnitOfWork(48)--Thread(Thread[main,5,main])--begin unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.421--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--begin transaction
    [TopLink Finest]: 2006.01.26 04:49:12.437--UnitOfWork(48)--Thread(Thread[main,5,main])--Execute query InsertObjectQuery(Employee: sequencingTest )
    [TopLink Finest]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Thread(Thread[main,5,main])--Assign return row DatabaseRecord(
         EMPLOYEE.VERSION => 1)
    [TopLink Fine]: 2006.01.26 04:49:12.625--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO EMPLOYEE (EMP_ID, L_NAME, F_NAME, GENDER, END_DATE, START_DATE, MANAGER_ID, START_TIME, END_TIME, ADDR_ID, VERSION) VALUES (3469, NULL, 'sequencingTest', NULL, NULL, NULL, NULL, {t '09:00:00'}, {t '17:00:00'}, NULL, 1)
    [TopLink Fine]: 2006.01.26 04:49:12.640--UnitOfWork(48)--Connection(39)--Thread(Thread[main,5,main])--INSERT INTO SALARY (SALARY, EMP_ID) VALUES (0, 3469)
    [TopLink Finer]: 2006.01.26 04:49:12.781--DatabaseSessionImpl(18)--Connection(39)--Thread(Thread[main,5,main])--commit transaction
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--end unit of work commit
    [TopLink Finer]: 2006.01.26 04:49:12.796--UnitOfWork(48)--Thread(Thread[main,5,main])--release unit of work
    firstName = sequencingTest; id=3469
    If I understood correctly, the problem is x showing up in insert as a value to be assigned to PK and y actually inserted into the db. If that's the case could there be a BeforeInsert trigger on the table? To test try inserting through jdbc using concrete pk value.

Maybe you are looking for

  • How do i save a picture to the camera roll from a text message in ios 7

    I am attempting to save a picture from a text message to my camera roll. However when i hold the picture the options are "copy/More" More gives the options to delete or forward via text message. And if i press copy it only copies it to be pasted. In

  • Samba server cannot be accessed through Finder's 'Network'

    Hi, First off, I'm not sure that this is the right forum for me to post this topic, but all the Samba related questions seemed to be coming from here. I don't own a computer with Windows, so I'm not interested in Windows compatibility per se, but I a

  • Purpose and use of release creation profile

    Hi all, Can anyone explain with example the use and significance of release creation profiles in outline aggrement with examples Thnks Gan

  • WNetAddConnection2 returns 1312 : ERROR_NO_SUCH_LOGON_SESSION in 64 bit

    When I perform file upload to remote location using WNetAddConnection2, the file can be copied for the first time but next operation returns code 1312 with same user credentials. But after certain interval of time, the upload is successful again but

  • Airport express equivalent network password

    I set up my airport express using WPA2 Personal. I entered my wireless password and all is fine. my macbook can connect w/o any problems. however, my roommate has a pc and the equivalent network password is 64 characters long. why is it so long and c