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

Hello,
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);
uow.assignSequenceNumber(newObject);
But this is generating this Exception:
Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (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 http://www.boku.ac.at/oradoc/ias/10g(9.0.4)/web.904/b10313/dataaccs.htm. 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.

Hello
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,
Chris

Similar Messages

  • Table or view does not exist when using in PL/SQL block

    I hav something strange...
    When i execute a query it works just fine... When i use the exact same query in a function i want to create, i get the error 'table or view does not exist'
    I create the function with the same user then when i'm executing the query.
    For example:
    select name,userid from portal.WWLOG_ACTIVITY_LOGS
    if i execute this... it works fine. I get my results.
    However when i create a function:
    CREATE OR REPLACE FUNCTION EBUSINESS.GET_USER_CREATOR (p_userid IN Varchar2) return VARCHAR2
    as
    /*CURSOR c_user_creator IS
    select distinct name,userid from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;*/
    v_creator varchar2(500);
    v_ret_val VARCHAR2(500) := 'NOT_FOUND';
    BEGIN
    select userid into v_ret_val from portal.WWLOG_ACTIVITY_LOGS
    where sub_domain = 'user' and action = 'create'
    and name = p_userid;
    --v_ret_val := x.userid;
    --end loop;
    -- Is the user in the group or not?
    /*OPEN c_user_creator;
    FETCH c_user_creator INTO v_creator;
    IF c_user_creator%FOUND THEN
    v_ret_val := v_creator;
    ELSE
    v_ret_val := 'NOT FOUND';
    END IF;
    CLOSE c_user_creator;*/
    Return v_ret_val;
    END;
    The table or view does not exist...
    I tryed with cursor, select into, for x in (select....)
    Nothing works.
    A select grant is a select grant right? Are there different grant you should use so you can select it into a function or just do a normal select?
    I also tryed to create a view that just sais select * from WWLOG_ACTIVITY_LOGS but that doesn't work...

    Are there different grant you should use so you can
    select it into a function or just do a normal select? Yes. Grants on objects used in functions/procedures must be given directly to the user, and not through a role.

  • ORA-00942: table or view does not exist in database control

    Hi all,
    i am getting "ORA-00942: table or view does not exist" error while accessing tablespaces from database control. i am able to access control files, redo log files everything fine, but not tablespaces.
    database version ---> 10.2.0.1
    OS ----> RedHat Enterprise Linux 4 U 2
    but the database is working fine from SQL*Plus and other Editors. this error is only from database control. so what might be the cause.
    Any Ideas ...........
    Balaji

    hi,
    Have you tried to re register your database within OEM, CG

  • Error with Sun App. Server 9...table or view does not exist..

    I am not sure where to post this but here it is:
    I am using Sun App. Server 9 along with a XE database...I use two schemas in my web app but on the first I get ORA error -table or view does not exist from SAS ,although it exists..the second works fine...
    Q: I cannot use 2 simultaneous connection with XE? or what seams to be the problem...
    PS: I also experimented randomly a oracle.toplink error that my Persistance Unit was unable to connect

    two PU's
    two Database Connections (in fact jsf pages ware generate based on entity classes-witch ware made using the connection)
    two schemas: HR and CONTA
    On a second thought I think somehow you're right ...it must be some connection error regarding the schema used...
    I'll look into it...but later...
    Florin POP

  • Table or view does not exist with new user

    I am having trouble getting a new user to be able to access the tables in the database. I have created a user just like normal and given it all the privileges i would normally give it. It is the only user other than the original that created all the tables. Every time i go to select from a table i get the error table or view does not exist.
    Am i missing something? It is Oracle 10.1.0.2 and i have never had this problem with earlier versions.

    You will always need to qualify the table name with schema name if you are accessing a table of some other schema except in a case that you have created a public synonym (with the same name as table). Suppose there is table table1 in schema schema1 and you are accessing it from schema2.
    You will need to write schema1.table1 but if you create a public synonym
    create public synonym table1 for schema1.table1;then you can directly write
    select * from table1;Sidhu
    http://amardeepsidhu.blogspot.com

  • Create materialized View fails with "table or view does not exist"

    DB: 10.2.0.4
    OS: Win 2003
    Hi,
    Here in my tests, i have 2 databases (A(source) and B(backup)), and i am trying to create an mview in database B to replicate data from one test table from database A, only for test purpose. I'm getting the error "table or view does not exist" when i try to create a mview with REFRESH FAST. Here is my code:
    CREATE MATERIALIZED VIEW TESTES.TAB_TESTES_REPLIC_MVIEW_02
    REFRESH FAST
    START WITH TO_DATE('21/02/2012 18:50:00', 'DD/MM/YYYY HH24:MI:SS')
    NEXT SYSDATE + 1/24/60
    WITH PRIMARY KEY
    AS SELECT REGISTRO1,
    REGISTRO2
    FROM TESTES.TAB_TESTES_REPLIC_MVIEW_02@DB_LINK_ORA10;
    The dblink is workig fine(dblink user has select privilege on TESTES.TAB_TESTES_REPLIC_MVIEW_02), and i have created the mview log on database A.
    Where is my mistake.
    Thanks a lot.
    Edited by: Fabricio_Jorge on 21/02/2012 19:06

    I found the solution.
    I had to grant SELECT on the mview log. The name is avaiable in DBA_MVIEW_LOGS

  • Error in pakcage table or view does not exist but on sql prompt query works

    Hi
    Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0
    The below package compiled in system user and trying to query on view v$session_wait however getting below error.
    PACKAGE BODY SYSTEM.PK_DB_ALERT
    On line: 212
    PL/SQL: ORA-00942: table or view does not exist
    I can execute same query mentioned below from sql prompt from system user and it works fine however it doesn't like from package, Please advice, thank you in advance.
    SELECT SID, seq#, event, wait_time
    FROM v$session_wait
    WHERE event NOT LIKE 'SQL*Net%' AND wait_time <> 0
    ORDER BY 2

    SDD wrote:
    Hi
    Can any one help me to understand the error of ORA-00942: table or view does not exist while compiling the package on Oracle 9.2.0.4.0Which means package owner is granted select on view not directly but via roles. However, roles are ignored by definer rights packages/stored procedures/stored functions/triggers... You need to grant package owner select on view directly.
    SY.
    Edited by: Solomon Yakobson on Jan 21, 2010 4:06 AM

  • Error(20,22): PL/SQL: ORA-00942: table or view does not exist

    I am getting currently getting an error when I try and insert into a table from a different schema from my Stored Procedure:
    Error(20,22): PL/SQL: ORA-00942: table or view does not exist
    I am explicitly calling the table with the schema name infront i.e.
    INSERT INTO SAPSR3.ZTREC_NAME_TYPE
    MASTER_ID,
    NAME_TYPE,
    FAMILY_NAME,
    FIRST_NAME,
    MIDDLE_NAME,
    TITLE
    VALUES
    In_MasterID,
    In_NameType,
    In_FamilyName,
    In_FirstName,
    In_MiddleName,
    In_Title
    I only get this error when I try and compile my stored procedure. If I try this insert not within a stored procedure (i.e. a blank script) it works perfectly.
    Can anyone tell me what Im doing wrong?
    Thanks.

    Hi,
    It sounds like you (the procedure owner) have privileges on that table only through a role.
    Roles don't count in stored procedures created with AUTHID OWNER (which is the default).
    Either
    (1) Have user SAPSR3 grant the necessary privileges directly to you (or to PUBLIC), or
    (2) change the procedure so that it runs with the caller's privileges, by adding AUTHID CURRENT_USER after the argument list but before the keyword IS (os AS) like this:
    CREATE OR REPLACE PROCEDURE     foo
    (     x     IN     NUMBER
    AUTHID CURRENT_USER
    IS ...

  • Error handling function: ORA-20001: get_dbms_sql_cursor error:ORA-00942: table or view does not exist  is not trapped. Why?

    Why APEX 4.1 Error handling function does not trap  the error of missing table?
    Say, I create simple application with single IR report page and I also assign standard simple error handling function.
    Function works perfectly, except but this case:
    If I just drop a table used by report page and then refresh the page I am getting usual APEX error message:
    ORA-20001: get_dbms_sql_cursor error ORA-00942: table or view does not exist
    and error handling function is not invoked at all.
    Is this a feature or a bug?

    Hi,
    Check the corrections given in the note 990764:
    Reason and Prerequisites
    Up to now, using a characteristic with its own master data read class as the InfoProvider was not supported. This is now released but it is not available for all modelings. Using the attributes in the query is not supported for characteristics that have their own master data read class. Using the attributes in the query causes a termination. The following errors may occur in this case:
    ORA-00942: table or view does not exist
    Fehler in CL_SQL_RESULT_SET  Include NEXT_PACKAGE
    RAISE_READ_ERROR in CL_RSDRV_VPROV_BASE
    Solution
    SAP NetWeaver 2004s BI
               Import Support Package 11 for SAP NetWeaver 2004s BI (BI Patch 11 or SAPKW70011) into your BI system. The Support Package is available once Note 0914305 "SAPBINews BI 7.0 Support Package 11", which describes this Support Package in more detail, has been released for customers.
    In urgent cases you can implement the correction instructions.
    The correction instructions contain the tightened inspection for characteristics.
    Regards,
    Anil Kumar Sharma .P

  • 500 - Internal Server Error - Table or View does not Exist

    When trying to use the sample restful service oracle.example.hr I get a 500 - Internal Server Error.
    I have no clue what to do next. I've even tried granting public to the emp table.  Nottin.
    Any insight you could give would be awesome.
    Here is the error:
    Request Path passes syntax validation
    Mapping request to database pool: PoolMap [_failed=false, _lastUpdate=-1, _pattern=null, _poolName=apex, _regex=null, _type=REGEX, _workspaceIdentifier=null, _serviceName=null]
    Applied database connection info
    Attempting to process with PL/SQL Gateway
    Not processed as PL/SQL Gateway request
    Attempting to process as a RESTful Service
    Determining if request can be dispatched as a Tenanted RESTful Service
    Request path has one path segment, continuing processing
    No Tenant Principal established yet, continuing processing
    APEX_LISTENER pool exists, continuing processing
    WebException [statusCode=500]
         at oracle.dbtools.rt.web.WebException.webException(WebException.java:343)
         at oracle.dbtools.rt.web.WebException.internalError(WebException.java:262)
         at oracle.dbtools.rt.web.WebErrorResponse.internalError(WebErrorResponse.java:101)
         at oracle.dbtools.rt.web.WebErrorResponse.error(WebErrorResponse.java:75)
         at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:166)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Caused by: JDBCException [kind=NO_DATA]
         at oracle.dbtools.common.jdbc.JDBCException.wrap(JDBCException.java:88)
         at oracle.dbtools.common.jdbc.JDBCQueryProvider.query(JDBCQueryProvider.java:41)
         at oracle.dbtools.rt.jdbc.entity.JDBCTenantDispatcher.tenant(JDBCTenantDispatcher.java:104)
         at oracle.dbtools.rt.jdbc.entity.TenantDispatcherBase.target(TenantDispatcherBase.java:71)
         at oracle.dbtools.rt.jdbc.entity.TenantDispatcherBase.target(TenantDispatcherBase.java:37)
         at oracle.dbtools.rt.web.ReTargetingDispatcher.canDispatch(ReTargetingDispatcher.java:45)
         at oracle.dbtools.rt.web.RequestDispatchers.choose(RequestDispatchers.java:160)
         at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:75)
         at oracle.dbtools.rt.web.ETags.checkPrecondition(ETags.java:53)
         at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:426)
         at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:164)
         ... 14 more
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1288)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3656)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
         at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:111)
         at $Proxy104.executeQuery(Unknown Source)
         at oracle.dbtools.common.jdbc.JDBCQueryImpl.resultSet(JDBCQueryImpl.java:93)
         at oracle.dbtools.common.jdbc.JDBCResultRowIterator.<init>(JDBCResultRowIterator.java:28)
         at oracle.dbtools.common.jdbc.JDBCQueryImpl.execute(JDBCQueryImpl.java:53)
         at oracle.dbtools.common.jdbc.JDBCQueryProvider.query(JDBCQueryProvider.java:38)
         ... 23 more

    May be the default parsing schema in your Apex workspace cannot access table EMP. Try and qualify table EMP and grant access from containing schema to Apex parsing schema. Hope being helpful, regards.

  • Compile error "table or view does not exist"

    When I run the following code, I get a compile error:
    Error(5,33): PL/SQL: ORA-00942: table or view does not exist
    I can run the select statement by itself as an SQL query, so why does this not work in PL/SQL?
    CREATE OR REPLACE
    PROCEDURE PREPTEST AS
    BEGIN
        FOR rec IN (SELECT rep_id FROM diag.diag_rep )
        LOOP
          DBMS_OUTPUT.PUT_LINE(' record ID is ' || rec.rep_id);
        END LOOP;
    END;

    Within SQL the permissions can be taken from the Role that the user has.
    Within PL/SQL permissions are not taken from Roles and have to be explicitly granted to the user.
    GRANT the appropriate permissions to the user and the PL/SQL code will work.

  • Why Table or View does not exist???

    Hi to all. I have an issue with my Business Objects. I have a relationship between two entities with the following cardinality:
    EntityA 1......* Entity B, the relation is a composition and the IDs for them are DB Sequence.
    I have created the corresponding views and the view link and they all work fine in the Application Module. Also, in the View Object for the EntityA ( ViewObjectA ), I have created a View Criteria, a nested one, with two attributes: the first one is an att from the*ViewObjectA* and use a value from a bind variable (Integer), and the second one is an attribute from the Entity B son and it's value is static (1). I tested with the query button and says OK. When I run the AppModule for test the ViewCriteria, I got this error: ORA-00942: table or view does not exist . And for my sorprise, I checked the query resultant and it's wrong!! Please see an example below:
    SELECT Att1,Att2 FROM EntityA WHERE ( ( ( (EntityA.att1 = :id ) AND (EXISTS(SELECT 1 FROM EntityBNQ1 EntityBNQ1 WHERE ( (*EntityBDNQ1.att1 = :id*) ) AND ( EntityA.att1 = EntityBDNQ1.att1 ))) ) ) ) AND (EntityA.att1 = EntityBDNQ1.Att1))) ) ) )
    As can be seen, the name of the tabla for the EntityB has NQ1 attached, and I don't know why. The view link works perfectly, as also the create operation for both ViewsObjects.
    Please can anyone tell me what I'm doing wrong, if I have a mistake? What should I do??
    Thanks in advance.
    PS: In a new application, I created a Business Components from DataBase, and it works my WiewCriteria. I just can't believe that I should start all over again.
    Thanks in advance again.

    Hi and thanks for the answers. Apologize for my forgetfulness of the version. It's 11.1.1.5.0 and ADF Business Components 11.1.1.60.13
    I created a new Application and I made a Business Components From Table with only the two Entities mentioned before. Once configured (Put the ID as a DBSequence), created the views an the View Criteria and it's just all fine.
    Hear is fragment of the XML from my EntityA (the god one). The first part it's the key attribute, the second one its the key.
    This is the god working version
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="Person"
      Version="11.1.1.61.92"
      DBObjectType="table"
      DBObjectName="EntityA"
      AliasName="Person"
      BindingStyle="OracleName"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access"/>
        <AttrArray Name="_publishEvents"/>
      </DesignTime>
      <Attribute
        Name="EntityId"
        ColumnName="EntityA_ID"
        SQLType="NUMERIC"
        Type="oracle.jbo.domain.DBSequence"
        ColumnType="NUMBER"
        TableName="EntityA"
        PrimaryKey="true"
        IsUpdateable="while_insert"
        Domain="oracle.jbo.domain.DBSequence" //Different
        RetrievedOnInsert="true">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="39"/> //Different, but don't think it's important
          <Attr Name="_SequenceStart" Value="1"/>
          <Attr Name="_SequenceName" Value="EntitiA_SEQ"/>
        </DesignTime>
      </Attribute>
    ...This is the bad working version
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EntityA"
      Version="11.1.1.60.13"
      DBObjectType="table"
      DBObjectName="EntityA"
      AliasName="EntityA"
      BindingStyle="OracleName"
      UseGlueCode="false"
      RowClass="criminal.model.entities.filiative.EntityAImpl">
      <DesignTime>
        <AttrArray Name="_publishEvents"/>
        <Attr Name="_codeGenFlag2" Value="Access"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Attribute
        Name="Entity_ID"
        IsUpdateable="while_insert"
        DefaultValue="@0"    //Different
        ColumnName="EntityA_ID"
        SQLType="NUMERIC"
        Type="oracle.jbo.domain.DBSequence"
        ColumnType="NUMBER"
        TableName="EntityA"
        PrimaryKey="true"
        RetrievedOnInsert="true">
        <DesignTime>
          <Attr Name="_SequenceStart" Value="1"/>
          <Attr Name="_SequenceName" Value="EntityA_SEQ"/>
        </DesignTime>
      </Attribute>
    ... Hear is the constrain (the god one) related to the key att:
    <Key
        Name="EntityAEntityAIdCheck10">
        <DesignTime>
          <Attr Name="_DBObjectName" Value="EntityA_EntitAy_ID_CHECK_10"/>
          <Attr Name="_checkCondition" Value='"EntityA_ID" IS NOT NULL'/>
          <Attr Name="_isCheck" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes"/>
      </Key>
    ...Hear is the constrain (the bad one) related to the key att:
      <Key
        Name="EntityAEntityAIdCheck10">
        <DesignTime>
          <Attr Name="_isNotNull" Value="true"/>
          <Attr Name="_DBObjectName" Value="EntityA_EntityA_ID_CHECK_10"/>
          <Attr Name="_checkCondition" Value='"EntityA_ID" IS NOT NULL'/>
          <Attr Name="_isCheck" Value="true"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="model.EntityA.EntityA_ID"/>
        </AttrArray>
      </Key>
    ...Hear is the XML of the EntityB The differences are the same that in EntityA
    the key att:
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EntityB"
      Version="11.1.1.61.92"
      DBObjectType="table"
      DBObjectName="EntityB"
      AliasName="EntityB"
      BindingStyle="OracleName"
      UseGlueCode="false">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access"/>
        <AttrArray Name="_publishEvents"/>
      </DesignTime>
      <Attribute
        Name="EntityBId"
        ColumnName="EntityB_ID"
        SQLType="NUMERIC"
        Type="oracle.jbo.domain.DBSequence"
        ColumnType="NUMBER"
        TableName="EntityB"
        PrimaryKey="true"
        IsUpdateable="while_insert"
        Domain="oracle.jbo.domain.DBSequence"
        RetrievedOnInsert="true">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="39"/>
          <Attr Name="_SequenceStart" Value="1"/>
          <Attr Name="_SequenceName" Value="EntityB_SEQ"/>
        </DesignTime>
      </Attribute>
    ...this is the bad one
    <Entity
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EntityB"
      Version="11.1.1.60.13"
      DBObjectType="table"
      DBObjectName="EntityB"
      AliasName="EntityB"
      BindingStyle="OracleName"
      UseGlueCode="false"
      RowClass="model.EntityBImpl">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access"/>
        <AttrArray Name="_publishEvents"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <Attribute
        Name="EntityB_ID"
        IsUpdateable="while_insert"
        ColumnName="EntityB_ID"
        SQLType="NUMERIC"
        Type="oracle.jbo.domain.DBSequence"
        ColumnType="NUMBER"
        TableName="EntityB"
        PrimaryKey="true"
        RetrievedOnInsert="true">
        <DesignTime>
          <Attr Name="_SequenceStart" Value="1"/>
          <Attr Name="_SequenceName" Value="EntityB_SEQ"/>
        </DesignTime>
      </Attribute>
    ...the key (the god one)
    <Key
        Name="FkEntityB">
        <DesignTime>
          <Attr Name="_isCascadeDelete" Value="true"/>
          <Attr Name="_referencedKey" Value="EntityA_PRIMARY_KEY_10"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="FK_EntityB"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="project1.EntityB.EntityBEntityBId"/>
        </AttrArray>
      </Key>
    ...the bad one
    <Key
        Name="FkEntityB">
        <DesignTime>
          <Attr Name="_isCascadeDelete" Value="true"/>
          <Attr Name="_referencedKey" Value="EntityA_PRIMARY_KEY_10"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="FK_EntityB"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="project1.EntityB.EntityBEntityBId"/>
        </AttrArray>
      </Key>
    ...Sorry if is too long.
    What might be wrong? It's that enough to determine the error?
    Thanks again.
    PS: I did try look for NQ1 as kdario said and nothing was found. I had already done regenerate the association as 969750 said and still habe the same error.

  • Cannot insert PS_TXN ORA-00942 table or view does not exist

    We are using jdev 11.1.1.4.0
    We have two users in the database and various application modules which connect to these users using datasources
    We have tested the application with applicatin module pooling enabled off to test for passivation and activation errors and the application works fine.
    Also on our internal test enviorment which has more then 10 concurrent users the application works fine
    But at UAT it has started suddenly to give errors Cannot insert in PS_TXN ORA-00942 table or view does not exist
    When I see the data in PS_TXN tables in various users I can see that passivation has taken place for the same day when there sporadic errors have been reported all having the cause as ORA-00942 table or view does not exist.
    But one strange thing that I have observed is that the COLLID column has sequence numbers interchanged for the users randomly, database user 1 has sequence number from database user 2 seq and vice a versa in COLLID
    As far as this problem goes the passivation should have failed with ORA-00001 primary key voilated but that is not the case
    May be the keys have still not got to a number where they collide.
    But I am totally taken aback on such a behaviour and I am not sure how to correct it.
    So we have two porblems here
    1) why did this error come in first place PS_TXN ORA-00942 table or view does not exist
    2) Why are the sequence numbers interchanged for the databse users ?
    Edited by: user3067156 on Jun 19, 2012 3:12 AM

    I got reply to my second question
    It looks like a bug in the framework and the suggestions are to use only one ps_txn and ps_txn_seq by modifying the internal connection
    But the first problem is not yet known why did it appear suddenly
    Edited by: user3067156 on Jun 19, 2012 3:12 AM

  • ORA-06512: at "SYS.DBMS_XMLGEN", (ORA-00942: table or view does not exist)

    Hey Guys, it's Xev.
    I decide to  use SQL and XML and it works in one scenario, but in another scenario, it doesn't.
    Here is the Code, I am passing in two variables, First, I pass in the table_name and then i pass in the schema.
    If I am doing this with the "user" connected and it's looking in it's own schema, it's find the results, like so, but if i try to execute this code while not
    connected to the same user i am searching on i get this error.
    ORA-19202: Error occurred in XML processing
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_XMLGEN", line 288
    ORA-06512: at line 1
    19202. 00000 -  "Error occurred in XML processing%s"
    *Cause:    An error occurred when processing the XML function
    *Action:   Check the given error message and fix the appropriate problem
    This code works only of you are connected to the user that you are searching on.
    But if you search for another user tables, it's blows up and gives the XML error above...
    SET SERVEROUTPUT ON
    exec DBMS_OUTPUT.ENABLE(1000000);
    VAR search_string VARCHAR2(28)
    EXEC :search_string := '^[0-9]{3}-[0-9]{2}-[0-9]{4}$'
    COLUMN "Searchword"     FORMAT A28
    COLUMN "Table"     FORMAT A9
    COLUMN "Column/Value" FORMAT A50
    SELECT DISTINCT SUBSTR (:search_string, 1, 28) "Searchword",
                     SUBSTR (table_name, 1, 14) "Table",
                     SUBSTR (t.column_value.getstringval (), 1, 50) "Column/Value"
        FROM   dba_tab_cols,
        --where owner = ('&SCHEMA_NAME')
                TABLE
                  (XMLSEQUENCE
                 (DBMS_XMLGEN.GETXMLTYPE
                    ( 'SELECT ' || column_name ||
                     ' FROM ' || table_name ||
                   ' WHERE REGEXP_LIKE
                         (' || column_name || ','''
                        || :search_string || ''')'
                  ).extract ('ROWSET/ROW/*'))) t
      --WHERE  table_name IN ('FIND_TEST')
      WHERE table_name = upper('&TABLE_NAME')
      AND OWNER = upper('&SCHEMA_NAME')
      ORDER  BY "Table"
    Can someone please explain how (DBMS_XMLGEN) works, and why it's throwing that error??
    thanks,
    Xev.

    It has nothing to do with DBMS_XMLGEN.GETXMLTYPE. It simply means user executing your SQL has no select privilege on table &SCHEMA_NAME.&TABLE_NAME.
    SY.

  • YTD, QTD and Year grain metrics = ORA-00942: table or view does not exist

    Hi everyone,
    I'm having a weird issue. I've got some GL data that I want to report on in three different grains: Quarter To Date, Year To Date and Entire Year. For the first two measures, I've setup a time dimension and I'm using the ToDate function. Works perfectly. For the third measure, I select the SUM aggregation and then in the Levels Tab, I go to my time dimension and set the logical level to "Year".
    Each measure reports correctly by itself, however, when I join in the three in one report, the who thing blows up on me and gives me an ORA message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 942, message: ORA-00942: table or view does not exist at OCI call OCIStmtExecute. [nQSError: 17010] SQL statement preparation failed. (HY000)
    When I only do two of the measures (any two), the report works fine. But it's when I add that third measure in, I get myself in trouble. Additionally, I checked the log file and the report never gets to the point where it generates a physical query. It's only creating a logical query and then it doesn't save the physical query anywhere.
    Can anyone explain what the problem is? Why don't these three measures behave well together? What can I do to force them to co-operate?
    It seems that the real culprit is the entire year measure. It only behaves well with 1 other measure, but once you get two additional measures, it causes the report to get the ORA error.
    Thanks for any help you can give!
    -Joe

    It turns out I was incorrect that there were no physical queries being generated. They were there in the log files, they had so many SAWITH<number> clauses that I thought they were the logical query (i.e. saw_0, saw_1, etc).
    Once I found the physical query, I ran it by hand and also got the table did not exist error. I added in WITH clause by with clause until I got the error to occur. After about an hour of digging, it turned out that a query using a full outer join (about 16 queries in) caused the table does not exist error. I'm not sure what it is about the full outer join that makes Oracle not see the table. When I get some free time I'll dig deeper into that issue.
    But once I realized what was going on, I went into the DB connections and disabled FULL OUTER JOINs. No problem now.
    Like I said, if I find what caused the original problem (i.e. what syntactically was incorrect about the FULL OUTER JOIN), I'll update this post.
    -Joe

Maybe you are looking for