Primary key  not getting altered

Hi,
I dropeed the Primary key and recreated it with an additional column, but I am getting "name already used by an existing object error". Please advise.
ALTER TABLE acct DROP PRIMARY KEY CASCADE;
ALTER TABLE acct ADD (
CONSTRAINT acct_PK
PRIMARY KEY
(ACCT_ID,AS_OF_DT)
USING INDEX);
What changes do I need to do to this sql?
Regards

Check this out -- Dropping primary key, doesn't  drop associated index in 10G
This resembles yours.
From same post,
1]
Richard Foote (an Oracle ACE Employee & an 'Index' guru) says -
>
Remember, Oracle will only drop an index automatically if the Index is unique, the default behaviour is to keep a non-unique index that polices at PK constraint.
>
2]
Dion Cho (Oracle ACE Member) also demonstrated -
>
Even with unique index, Oracle seems to deny to drop corresponding index when Index was explicitly created.
>
Please go through the post and workouts carefully.
Edited by: ranit B on Dec 22, 2012 1:58 PM

Similar Messages

  • NULL in primary keys NOT logged to exceptions table

    Problem: Inconsistent behavior when enabling constraints using the "EXCEPTIONS INTO" clause. RDBMS Version: 9.2.0.8.0 and 10.2.0.3.0
    - NULL values in primary keys are NOT logged to exceptions table
    - NOT NULL column constraints ARE logged to exceptions table
    -- Demonstration
    -- NULL values in primary keys NOT logged to exceptions table
    TRUNCATE TABLE exceptions;
    DROP TABLE t;
    CREATE TABLE t ( x NUMBER );
    INSERT INTO t VALUES ( NULL );
    ALTER TABLE t
    ADD ( CONSTRAINT tpk PRIMARY KEY (x) EXCEPTIONS INTO exceptions );
    SELECT * FROM exceptions; -- returns no rows
    -- NOT NULL column constraints logged to exceptions table
    TRUNCATE TABLE exceptions;
    DROP TABLE t;
    CREATE TABLE t ( x NUMBER );
    INSERT INTO t VALUES ( NULL );
    ALTER TABLE t MODIFY ( X NOT NULL EXCEPTIONS INTO EXCEPTIONS );
    SELECT * FROM exceptions; -- returns one row
    I would have expected all constraint violations to be logged to exceptions. I was not able to find any documentation describing the behavior I describe above.
    Can anyone tell me if this is the intended behavior and if so, where it is documented?
    I would also appreciate it if others would confirm this behavior on their systems and say if it is what they expect.
    Thanks.
    - Doug
    P.S. Apologies for the repost from an old thread, which someone else found objectionable.

    I should have posted the output. Here it is.
    SQL>TRUNCATE TABLE exceptions;
    Table truncated.
    SQL>DROP TABLE t;
    Table dropped.
    SQL>CREATE TABLE t ( x NUMBER );
    Table created.
    SQL>INSERT INTO t VALUES ( NULL );
    1 row created.
    SQL>ALTER TABLE t ADD ( CONSTRAINT tpk PRIMARY KEY (x) EXCEPTIONS INTO exceptions );
    ALTER TABLE t ADD ( CONSTRAINT tpk PRIMARY KEY (x) EXCEPTIONS INTO exceptions )
    ERROR at line 1:
    ORA-01449: column contains NULL values; cannot alter to NOT NULL
    SQL>SELECT * FROM exceptions;
    no rows selected
    SQL>
    SQL>TRUNCATE TABLE exceptions;
    Table truncated.
    SQL>DROP TABLE t;
    Table dropped.
    SQL>CREATE TABLE t ( x NUMBER );
    Table created.
    SQL>INSERT INTO t VALUES ( NULL );
    1 row created.
    SQL>ALTER TABLE t MODIFY ( X NOT NULL EXCEPTIONS INTO EXCEPTIONS );
    ALTER TABLE t MODIFY ( X NOT NULL EXCEPTIONS INTO EXCEPTIONS )
    ERROR at line 1:
    ORA-02296: cannot enable (MYSCHEMA.) - null values found
    SQL>SELECT * FROM exceptions;
    ROW_ID OWNER TABLE_NAME CONSTRAINT
    AAAkk5AAMAAAEByAAA MYSCHEMA T T
    1 row selected.
    As you can see, I get the expected error message. But I only end up with a record in the exceptions table for the NOT NULL column constraint, not for the null primary key value.

  • Primary key not available

    Hi!
    When i run my appication client to connect to Oracle9i database i have a next exception:
    javax.ejb.CreateException: java.lang.IllegalStateException: Primary key not available.
    In Oracle i set a primary key field ID.
    Here is my code:
    /* Generated by Together */
    package ejb;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.EJBException;
    import javax.ejb.CreateException;
    import java.sql.SQLException;
    import java.sql.Connection;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.sql.PreparedStatement;
    import javax.ejb.NoSuchEntityException;
    import java.sql.ResultSet;
    import javax.ejb.DuplicateKeyException;
    import javax.ejb.RemoveException;
    import java.util.Collection;
    import java.util.ArrayList;
    import javax.ejb.FinderException;
    import javax.sql.DataSource;
    import java.lang.Integer;
    import java.lang.String;
    import java.rmi.RemoteException;
    import javax.sql.*;
    import java.sql.DriverManager;
    public class TestingBean implements EntityBean {
    private EntityContext ctx;
    public Integer userID;
    public String userLogin;
    public String userPassword;
    public String userPrivilege;
    static private final String users_res_ref = "jdbc/Oracle";
    public void setEntityContext(EntityContext context) throws EJBException {
    System.out.println("EntityContext before = " + ctx);
    ctx = context;
    System.out.println("EntityContext after = " + ctx);
    public void unsetEntityContext() throws EJBException {
    ctx = null;
    public void ejbActivate() throws EJBException {
    public void ejbPassivate() throws EJBException {
    public void ejbRemove() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    userID = (Integer)ctx.getPrimaryKey();
    ps = con.prepareStatement("DELETE FROM TLogon WHERE Id = ?");
    ps.setInt(1, userID.intValue());
    if (!(ps.executeUpdate() > 0)) {
    throw new RemoveException ("ejbLoad: Can't remove user - " + userID);
    catch (Exception e) {
    throw new EJBException(e);
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbStore() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("UPDATE TLogon SET Login = ?, Password = ?, Privilege = ? WHERE Id = ?");
    ps.setString(1, userLogin);
    ps.setString(2, userPassword);
    ps.setString(3, userPrivilege);
    ps.setInt(4, userID.intValue());
    ps.executeUpdate();
    catch (Exception e) {
    throw new EJBException(e);
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbLoad() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    userID = (Integer)ctx.getPrimaryKey();
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id, Login, Password, Privilege FROM TLogon WHERE Id = ?");
    ps.setInt(1, userID.intValue());
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    rs.next();
    userLogin = rs.getString("Login");
    userPassword = rs.getString("Password");
    userPrivilege = rs.getString("Privilege");
    catch (Exception e) {
    throw new EJBException("ejbLoad: Can't load user - " + userID);
    finally{
    closeStatement(ps);
    closeConnection(con);
    public Integer ejbCreate(Integer aUserID, String aUserLogin, String aUserPassword, String aUserPrivilege) throws CreateException, EJBException, SQLException {
    System.out.println("Inititialization parameters...");
    this.userID = aUserID;
    this.userLogin = aUserLogin;
    this.userPassword = aUserPassword;
    this.userPrivilege = aUserPrivilege;
    System.out.println("Setting connection to null...");
    Connection con = null;
    PreparedStatement ps = null;
    try {           
    System.out.println("Getting connection...");
    con = getConnection();
    System.out.println("EntityContext before getting primary key... = " + ctx);
    System.out.println("Getting primary key...");
    userID = (Integer)ctx.getPrimaryKey();
    System.out.println("Primary key is done...");
    ps = con.prepareStatement("INSERT INTO TLogon (Id, Login, Password, Privilege) VALUES (?,?,?)");
    System.out.println("Inserting data...");
    ps.setInt(1, userID.intValue());
    ps.setString(2, userLogin);
    ps.setString(3, userPassword);
    ps.setString(4, userPrivilege);
    ps.executeUpdate();
    return aUserID;
    catch (Exception e) {
    throw new CreateException(e.toString());
    finally{
    closeStatement(ps);
    closeConnection(con);
    public Integer ejbFindByPrimaryKey(java.lang.Integer pk) throws FinderException, EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id, Login, Password, Privilege FROM TLogon WHERE Id = ?");
    ps.setInt(1, pk.intValue());
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    rs.next();
    return pk;
    catch(Exception e) {
    throw new FinderException (e.toString());
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbPostCreate(Integer aUserID, String aUserLogin, String aUserPassword, String aUserPrivilege) throws CreateException, EJBException, SQLException {
              /* Write your code here */
    public Collection ejbFindAllUsers() throws EJBException, FinderException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id FROM TLogon");
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    ArrayList v = new ArrayList();
    Integer pk;
    while(rs.next()) {
    pk = new Integer(rs.getInt(1));
    v.add(pk);
    return v;
    catch(Exception e) {
    throw new FinderException(e.toString());
    finally {
    closeStatement(ps);
    closeConnection(con);
    public Integer getUserID() throws RemoteException, EJBException {return userID;}
    public void setUserID(Integer param) throws RemoteException, EJBException {this.userID = param;}
    public String getUserLogin() throws RemoteException, EJBException {return userLogin;}
    public void setUserLogin(String param) throws RemoteException, EJBException {this.userLogin = param;}
    public String getUserPassword() throws RemoteException, EJBException {return userPassword;}
    public void setUserPassword(String param) throws RemoteException, EJBException {this.userPassword = param;}
    public String getUserPrivilege() throws RemoteException, EJBException {return userPrivilege;}
    public void setUserPrivilege(String param) throws RemoteException, EJBException {this.userPrivilege = param;}
    private Connection getConnection() throws SQLException {
    InitialContext initCtx = null;
    try {
    initCtx = new InitialContext();
    DataSource ds = (javax.sql.DataSource)initCtx.lookup("java:comp/env/" + users_res_ref);
    return ds.getConnection();
    catch (Exception e) {
    throw new EJBException(e);
    private void closeStatement(PreparedStatement ps) {
    try {
    if (ps != null) {ps.close();}
    catch (Exception e) {
    throw new EJBException(e);
    private void closeConnection(Connection con) {
    try {
    if(con != null) {con.close();}
    catch(Exception e) {
    throw new EJBException(e);
    What i do wrong?
    Please help!!!!

    Very BIG thank you!!!!
    That's right, but i must delete this method only in ejbCreate?
    And i have a next exception: java.sql.SQLException: ORA-00947: not enough values. Why?
    Here is my code db:
    CREATE TABLE "SYSTEM"."TLOGON" ("ID" NUMBER(20) NOT NULL, "LOGIN"
    VARCHAR2(20 byte) NOT NULL, "PASSWORD" VARCHAR2(20 byte) NOT
    NULL, "PRIVILEGE" VARCHAR2(20 byte) NOT NULL,
    CONSTRAINT "ID" PRIMARY KEY("ID")
    USING INDEX
    TABLESPACE "SYSTEM"
    STORAGE ( INITIAL 12K NEXT 12K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1)
    PCTFREE 10 INITRANS 2 MAXTRANS 255)
    TABLESPACE "SYSTEM" PCTFREE 10 PCTUSED 40 INITRANS 1
    MAXTRANS 255
    STORAGE ( INITIAL 12K NEXT 12K MINEXTENTS 1 MAXEXTENTS 249
    PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1)
    LOGGING
    And my client:
    package ejb.client;
    import javax.naming.Context;
    import javax.rmi.PortableRemoteObject;
    import ejb.TestingHome;
    import ejb.Testing;
    import java.util.Collection;
    import java.rmi.RemoteException;
    import javax.ejb.FinderException;
    import javax.naming.InitialContext;
    public class TestingClient {
    public static void main(String []args) {
    try {
    System.out.println("Step #1");
    Context initial = new InitialContext();
    System.out.println("Step #2");
    Object objref = initial.lookup("java:comp/env/ejb/SimpleTesting");
    System.out.println("Step #3");
    ejb.TestingHome home = (ejb.TestingHome)PortableRemoteObject.narrow(objref, ejb.TestingHome.class);
    System.out.println("Step #4");
    ejb.Testing aTesting;
    for(int i = 0; i < 3; i++) {
    String login = users[0];
    String password = users[i][1];
    String privilege = users[i][2];
    System.out.println("Adding user..." + login + "\n" + password + "\n" + privilege);
    home.create(new Integer(i+1), login, password, privilege);
    Integer i = new Integer(2);
    home.create(i, "Zatoka", "password", "admin");
    catch(Exception e) {
    e.printStackTrace();
    //private static String JNDI = "ejb.TestingHome";
    private final static String[][] users = {{"Zatoka","*****","admin"}, {"Ivanov","234fds","user"},{"Petrov","dcd2","user"}};
    BIG thanks!!!

  • [Incoming Payments for WTax] Primary Key not exist in DB

    While performing the TDS upgrade, I am getting an error message as "[Incoming Payments for WTax] Primary Key not exist in DB".
    I have checked that the sheet conforms to the instructions provided in the Upgrade guide but am not able to resolve this.
    Any ideas?
    Regards,
    Gyanesh

    Hi,
    It seems to be some field in the TDS upload Excel sheet which has primary key field not having the correct value.
    Double check the same where Primary Key if linked with some value in other sheet, enter the same.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Transportation lane KEY not getting generated in the table

    Transportation lane KEY not getting generated in the table
    Hi folks,
    The issue is like this :
    We have a weekly workorders upload program from legacy systems to SAP-APO. The legacy planners send a .CSV file containing material-wise workroders. A customised zee program picks these quantities & writes them in Prod.planned keyfigures in SNP planning book. This process is done for the manufacturing locations only.
    Lately workorders for two particular material M1 & M2 had failed to get upload. It gives the error 'NO VALID SOURCE OF SUPPLY COULD BE FOUND' in its Job log. We did some debugging & found that for successful materials the  TRPID is getting generated in the table /SAPAPO/V_TRPROD  whereas this TRPID is missing for M1 & M2. Why this is happening is our main concern. We tried deleting the PPM & creating this again, assuming that the PPMID is the precursor for generating this TRPID, but this yielded no results.
    ____ for successful upload______________
    se16 --> /SAPAPO/V_TRPROD
    Version = 000
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY of successfully loaded workorder
    Enter
    This gives the following results
    TRPID = TRPID KEY
    LOCFR = LOCID KEY for manufacturing location
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY for successfully loaded workorder
    ( This seems a self-lane, i.e both TO & FROM location are same)
    ____ for unsuccessful upload________
    se16 --> /SAPAPO/V_TRPROD
    Version = 000
    LOCTO = LOCID KEY for manufacturing location
    MATID = MATID KEY for unsuccessfully loaded workorder
    Enter
    This gives the following results
    Error = No Table entries found for specified KEYS
    We are perplexed why this TRPID is not getting generated for these two particular material M1 & M2?
    We have deleted their PPM & re-created them to cross-check if the PPMID KEY is the trigger for generating the TRPID key. This didn't work!
    Please let us know in case someone faced a similar issue.
    Many Thanks.
    Kumar
    Edited by: Blue Lotus on Jun 9, 2011 2:44 PM

    Yes Anand.
    We deleted the PPM & created it again, which didn't work.
    Later on we deleted the product itself from APO & re-CIFed it from R3 & then re-created the PPM.
    The PPMID which was missing earlier is now getting created! However no luck with the TRPID.
    Why this TRPID is not getting generated in our only concern
    Regards
    Kumar

  • EJB Primary Key not found in lock manager - Container BUG?

    I have an EJB entity bean whose primary key class implementation is pretty simple, consisting of two strings. For the MOST part, it seems to work properly, but every so often I see the following message in my application server log.
    ####<Sep 17, 2008 10:03:27 AM EDT> <Warning> <JTA> <armantac22> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1221660207187> <BEA-110401> <Ignoring error in afterCompletion. Object=weblogic.ejb.container.internal.TxManager$TxListener@1906466, Exception=javax.ejb.EJBException: [EJB:010108]The EJB Lock Manager has received an unlock request from EJB:PortfolioMetaData with primary key:[ObjectPK: type: PortMetaData name: PortMetaData]. However, this primary key could not be found in the Lock Manager. This indicates either an EJB container bug, or the equals and hashCode methods for the primary key class:com.armanta.ejb.ObjectPK are implemented incorrectly. Please check the equals and hashCode implementations.
    javax.ejb.EJBException: [EJB:010108]The EJB Lock Manager has received an unlock request from EJB:PortfolioMetaData with primary key:[ObjectPK: type: PortMetaData name: PortMetaData]. However, this primary key could not be found in the Lock Manager. This indicates either an EJB container bug, or the equals and hashCode methods for the primary key class:com.armanta.ejb.ObjectPK are implemented incorrectly. Please check the equals and hashCode implementations.
         at weblogic.ejb.container.locks.ExclusiveLockManager$LockBucket.unlock(ExclusiveLockManager.java:409)
         at weblogic.ejb.container.locks.ExclusiveLockManager.unlock(ExclusiveLockManager.java:170)
         at weblogic.ejb.container.manager.ExclusiveEntityManager.afterCompletion(ExclusiveEntityManager.java:723)
         at weblogic.ejb.container.manager.ExclusiveEntityManager.afterCompletion(ExclusiveEntityManager.java:667)
         at weblogic.ejb.container.internal.TxManager$TxListener.afterCompletion(TxManager.java:984)
         at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(ServerSCInfo.java:862)
         at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions(ServerTransactionImpl.java:2913)
         at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping(ServerTransactionImpl.java:2806)
         at weblogic.transaction.internal.ServerTransactionImpl.setCommitted(ServerTransactionImpl.java:2851)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2650)
         at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2570)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:277)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:226)
         at weblogic.ejb.container.internal.BaseEJBHome.postHomeInvoke(BaseEJBHome.java:389)
         at weblogic.ejb.container.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:408)
         at com.armanta.ejb.portfolio.PortfolioMetaData_a4zvzk_HomeImpl.findByPrimaryKey(PortfolioMetaData_a4zvzk_HomeImpl.java:64)
         at com.armanta.ejb.portfolio.PortfolioMasterBean.getPortfolioMetaData(PortfolioMasterBean.java:313)
         at com.armanta.ejb.portfolio.PortfolioMaster_fmk9e8_EOImpl.getPortfolioMetaData(PortfolioMaster_fmk9e8_EOImpl.java:64)
         at com.armanta.ejb.portfolio.PortfolioMaster_fmk9e8_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:517)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:407)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:403)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:934)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    I checked the equals and hashCode implementations and nothing pops out at me. Once this happens, the EJB seems to get messed up in the database and I lose information!
    Here is the class implementation along with its superclass. I don't see anything blatant. Sorry for the lack of indentation, my original post was indented.
    Thanks
    Eric
    public class ObjectPK extends ArmantaPK {
         private String type;
         private String name;
         private ObjectPK() {
              super();
         public ObjectPK(String type, String name) {
              super();
              this.type = type;
              this.name = name;
         public String getName() {
              return name;
         public String getType() {
              return type;
         public String toString() {
              StringBuffer buffer = new StringBuffer();
              buffer.append("[ObjectPK:");
              buffer.append(" type: ");
              buffer.append(type);
              buffer.append(" name: ");
              buffer.append(name);
              buffer.append("]");
              return buffer.toString();
         * Returns <code>true</code> if this <code>ObjectPK</code> is the same as the o argument.
         * @return <code>true</code> if this <code>ObjectPK</code> is the same as the o argument.
         public boolean equals(Object o) {
              if (this == o) {
                   return true;
              if (!super.equals(o)) {
                   return false;
              if (o == null) {
                   return false;
              if (o.getClass() != getClass()) {
                   return false;
              ObjectPK castedObj = (ObjectPK) o;
              return ((this.type == null ? castedObj.type == null : this.type
                   .equals(castedObj.type)) && (this.name == null
                   ? castedObj.name == null
                   : this.name.equals(castedObj.name)));
         * Override hashCode.
         * @return the Objects hashcode.
         public int hashCode() {
              int hashCode = super.hashCode();
              hashCode = 31 * hashCode + (type == null ? 0 : type.hashCode());
              hashCode = 31 * hashCode + (name == null ? 0 : name.hashCode());
              return hashCode;
         public Object clone() {
              ObjectPK inst = new ObjectPK();
              inst.type = this.type == null ? null : new String(this.type);
              inst.name = this.name == null ? null : new String(this.name);
              return inst;
    public abstract class ArmantaPK implements Serializable, Cloneable, Comparable {
         // Enforce compatability with future versions
         private static final long serialVersionUID = 1980721424128862564L;
         // Cache the hash code
         private transient int hash = 0;
         * Clones a primary key. Note that this is not a deep copy.
         * @return the cloned primary key
         public Object clone() throws CloneNotSupportedException {
              ArmantaPK newKey = (ArmantaPK) super.clone();
              newKey.hash = 0;
              return newKey;
         * Compare the specified object with this key for equality.
         * Implementations should return <tt>true</tt>
         * if and only if the specified object is also a key
         * of the same class and all corresponding attributes in the keys are
         * <i>equal</i>.
         * @param other the object to be compared for equality with this key.
         * @return <tt>true</tt> if the specified object is equal to this key.
         public boolean equals(Object other) {
              return other instanceof ArmantaPK;
         * This implementation only returns an empty String.
         * @return String
         public String toString() {
              return "";
         * Return the hash code value for this key. Implemented to call the
         * key's <code>computeHash</code> method and cache the result for
         * faster operation. Classes extending <code>ArmantaPK</code> should
         * only implement <code>computeHash</code>.
         * @return int
         public int hashCode() {
              if (hash == 0) {
                   hash = computeHash();
              return hash;
         * @y.exclude
         * Compute a hash code for this key. This is the method that should
         * be overridden by sub-classes.
         * @return int
         protected int computeHash() {
              return 0;
         * @y.exclude
         * After called, will force the hash code to get recomputed.
         public void rehash() {
              hash = 0;
         * Compares this <tt>ArmantaPK</tt> to another object by comparing
         * their string representations.
         * @return an integer based upon comparing the <tt>ArmantaPK</tt>s string
         * representations
         public int compareTo(Object o) {
    return toString().compareTo(o.toString());
    }

    We are experiencing a similar error after upgrading 9.2 to 9.2 MP3. We do not want to upgrade to 10g at this time. Is there a patch we can download with the fix?

  • Confirmation control key not getting copied into PO created via ME59N

    Hi,
    I  have maintained confirmation control key 003 in vendor master. Ticked automatic PO in vendor master as well as material master.Info record & source list (Fix vendor) are also maintained.
    I have manully created PR & assigned source of supply. Now when I am trying to convert PR to PO via ME59N, confirmation control key is not getting copied from vendor master.
    Note that I have not maintained CC key in info record. When I am creating PO manually wrt PR, CC key is getting copied from vendor master.
    What could be the reason?
    Regards,
    Piyush

    Hi Piyush,
    Incase of Automatic PO creation /conversion of PR to PO automatically. Purchase info record is must along with the activation of CC Indicator (because PIR is a master record with the combination of vendor and for a certain material) to pull the CC key into the PO automatically.
    Hence CC activation in PIR is required inorder to populate the Confirmation control key into the PO when it creates through Automatic PO with PR assignment using ME59N. Otherwise you have to specifiy manually incase of manual creation of PO.
    Hope it clarifies,
    Regards,
    Sapsrin

  • Difference between Primary Key and Unique+Not NUll

    Hi Guys,
    Is there any difference the column being declared as primary key or unique+NOT NULL.
    Please let me know the internal and application point of view.
    Thanks in advance!
    Ranjan

    957590 wrote:
    Ok,Thanks however I donot think Primary key uses unique indexPK uses whatever index you specify - unique or not (as long as index is on proper column(s)). However, if you do not specify any index, PK creates unique index:
    SQL> create table tbl(
      2                   id number,
      3                   name varchar2(10)
      4                  )
      5  /
    Table created.
    SQL> alter table tbl
      2    add constraint tbl_pk
      3      primary key(
      4                  id
      5                 )
      6  /
    Table altered.
    SQL> select  index_name,
      2          uniqueness
      3    from  user_indexes
      4    where table_name = 'TBL'
      5  /
    INDEX_NAME                     UNIQUENES
    TBL_PK                         UNIQUE
    SQL> select  constraint_name,
      2          index_name
      3    from  user_constraints
      4    where table_name = 'TBL'
      5  /
    CONSTRAINT_NAME                INDEX_NAME
    TBL_PK                         TBL_PK
    SQL>  alter table tbl
      2    drop primary key
      3  /
    Table altered.
    SQL> create index tbl_non_unique_pk_index
      2    on tbl(
      3           id
      4          )
      5  /
    Index created.
    SQL> alter table tbl
      2    add constraint tbl_pk
      3      primary key(
      4                  id
      5                 )
      6        using index tbl_non_unique_pk_index
      7  /
    Table altered.
    SQL> select  index_name,
      2          uniqueness
      3    from  user_indexes
      4    where table_name = 'TBL'
      5  /
    INDEX_NAME                     UNIQUENES
    TBL_NON_UNIQUE_PK_INDEX        NONUNIQUE
    SQL> select  constraint_name,
      2          index_name
      3    from  user_constraints
      4    where table_name = 'TBL'
      5  /
    CONSTRAINT_NAME                INDEX_NAME
    TBL_PK                         TBL_NON_UNIQUE_PK_INDEX
    SQL> insert
      2    into tbl
      3    values(
      4           1,
      5           'A'
      6          )
      7  /
    1 row created.
    SQL> insert
      2    into tbl
      3    values(
      4           2,
      5           'B'
      6          )
      7  /
    1 row created.
    SQL> insert
      2    into tbl
      3    values(
      4           1,
      5           'C'
      6          )
      7  /
    insert
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.TBL_PK) violated
    SQL> SY.

  • Altering Primary Key constraint on a table i Oracle 10G

    Hi All,
    Can anyone tell me how to alter a primary key constraint on any table. My concern is that, suppose i have a table called 'Employee' where only 'EmployeeName' is added as a primary ket constaint. Now i want to alter this P.K. constarint to add 'EmployeeName' and 'DateOfBirth' as a primary key. Can anyone suggest me how can i achieve that? Any help will be highly appreciated.

    hi,
    you need to drop the constraint and recreate it.
    SQL> conn scott/tiger@alpspso
    Connected.
    SQL> create table test (id number constraint id_pk primary key,name varchar(30));
    create table test (id number constraint id_pk primary key,name varchar(30))
    ERROR at line 1:
    ORA-00955: name is already used by an existing object
    SQL> create table test_table (id number constraint id_pk primary key,name varchar(30))
    Table created.
    SQL> alter table test_table modify constraint id_pk primary key(id,name);
    alter table test_table modify constraint id_pk primary key(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table test_table modify constraint id_pk(id,name);
    alter table test_table modify constraint id_pk(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table test_table modify primary key(id,name);
    alter table test_table modify primary key(id,name)
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> alter table drop constraint id_pk;
    alter table drop constraint id_pk
    ERROR at line 1:
    ORA-00903: invalid table name
    SQL> alter table test_table drop constraint id_pk;
    Table altered.
    SQL> alter table test_table add constraint id_pk primary_key(id,name);
    alter table test_table add constraint id_pk primary_key(id,name)
    ERROR at line 1:
    ORA-00902: invalid datatype
    SQL> alter table test_table add constraint id_pk primary key(id,name);
    Table altered.
    Regards.
    Navneet

  • Altering Primary Key Constraint

    hi this may sound silly .
    but is it possible to alter a primary key constraint and add another column to it ?
    eg. >desc t1
    c1 number(3) not null
    c2 number(3)
    here I have created primary key on column c1.
    Now I want to alter this constraint and add second column also as part of primary key constraint (so that it will be composite primary key )
    How do i do that ? Do the column needs to be empty ?
    Thanks

    You should use ALTER TABLE DROP CONSTRAINT / ADD CONSTRAINT option.
    Do the column needs to be empty ?Because primary key constraint supposes NOT NULL constraints for columns
    included into primary key, all columns havn't to have nulls values (NOT NULL constraint will be added to c2 column):
    SQL> create table t1 (c1 number(3) not null, c2 number(3));
    Table created.
    SQL> alter table t1 add constraint t1_pk primary key(c1);
    Table altered.
    SQL> insert into t1 values(1,1);
    1 row created.
    SQL> insert into t1 values(2,null);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> alter table t1 drop constraint t1_pk;
    Table altered.
    SQL> alter table t1 add constraint t1_pk primary key (c1,c2);
    alter table t1 add constraint t1_pk primary key (c1,c2)
    ERROR at line 1:
    ORA-01449: column contains NULL values; cannot alter to NOT NULL
    SQL> update t1 set c2 = 3;
    2 rows updated.
    SQL> alter table t1 add constraint t1_pk primary key (c1,c2);
    Table altered.
    SQL> desc t1
    Name                                      Null?    Type
    C1                                        NOT NULL NUMBER(3)
    C2                                        NOT NULL NUMBER(3)Rgds.

  • Primary Key could not be changed without dropping the index

    I want to change the primary key in the "alter table modus". I don't see any INDEX. I refresh the DATA and get the following error:
    ORA-01785: ORDER BY-Angabe muss Positionsnummer von Ausdruck der SELECT-Liste enthalten
    Version: 3.0.03 Build-03.97
    Edited by: mesch181 on Apr 17, 2011 12:31 PM

    That error message has nothing to do with dropping an index.
    There is a bug in current versions of sql developer where the query used to populate the data grid is stored and if the table structure changes the query can be invalid. Try closing the table and re-opening it.

  • Access path difference between Primary Key and Unique Index

    Hi All,
    Is there any specific way the oracle optimizer treats Primary key and Unique index differently?
    Oracle Version
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> Sample test data for Normal Index
    SQL> create table t_test_tab(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab start with 1 increment by 1 ;
    Sequence created.
    SQL>  insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats(USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
            259  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> Sample test data when using Primary Key
    SQL> create table t_test_tab1(col1 number, col2 number, col3 varchar2(12));
    Table created.
    SQL> create sequence seq_t_test_tab1 start with 1 increment by 1 ;
    Sequence created.
    SQL> insert into t_test_tab1 select seq_t_test_tab1.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1727568366
    | Id  | Operation         | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |             | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB1 | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6915  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> alter table t_test_tab1 add constraint pk_t_test_tab1 primary key (col1);
    Table altered.
    SQL> exec dbms_stats.gather_table_stats('USER_OWNER','T_TEST_TAB1',cascade => true);
    PL/SQL procedure successfully completed.
    SQL> select col1 from t_test_tab1;
    99999 rows selected.
    Execution Plan
    Plan hash value: 2995826579
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    59   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| PK_T_TEST_TAB1 | 99999 |   488K|    59   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6867  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL> If you see here the even though statistics were gathered,
         * In the 1st table T_TEST_TAB, the table is still using FULL table access after creation of index.
         * And in the 2nd table T_TEST_TAB1, table is using PRIMARY KEY as expected.
    Any comments ??
    Regards,
    BPat

    Thanks.
    Yes, ignored the NOT NULL part.Did a test and now it is working as expected
    SQL>  create table t_test_tab(col1 number not null, col2 number, col3 varchar2(12));
    Table created.
    SQL>
    create sequence seq_t_test_tab start with 1 increment by 1 ;SQL>
    Sequence created.
    SQL> insert into t_test_tab select seq_t_test_tab.nextval, round(dbms_random.value(1,999)) , 'B'||round(dbms_random.value(1,50))||'A' from dual connect by level < 100000;
    99999 rows created.
    SQL> commit;
    Commit complete.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  set autotrace traceonly
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 1565504962
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            | 99999 |   488K|    74   (3)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| T_TEST_TAB | 99999 |   488K|    74   (3)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6912  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>  create index idx_t_test_tab on t_test_tab(col1);
    Index created.
    SQL>  exec dbms_stats.gather_table_stats('GREP_OWNER','T_TEST_TAB',cascade => true);
    PL/SQL procedure successfully completed.
    SQL>  select col1 from t_test_tab;
    99999 rows selected.
    Execution Plan
    Plan hash value: 4115006285
    | Id  | Operation            | Name           | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                | 99999 |   488K|    63   (2)| 00:00:01 |
    |   1 |  INDEX FAST FULL SCAN| IDX_T_TEST_TAB | 99999 |   488K|    63   (2)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
           6881  consistent gets
              0  physical reads
              0  redo size
        1829388  bytes sent via SQL*Net to client
          73850  bytes received via SQL*Net from client
           6668  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          99999  rows processed
    SQL>

  • Primary Key Causing Problem in Interval Partition Exchange

    DB : 11.2.0.2
    OS : AIX 6.1
    I am getting the problem while exchanging data with interval partitioned table. I have a interval partitioned table and a normal staging table having data to be uploaded.
    Following are the steps i am doing.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    Table created.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    Table altered.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    1 row created.
    SQL> commit;
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS  
    SYS_P98 partition is added to table automatically.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4));
    Table created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    1 row created.
    SQL> commit;
    Commit complete.
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    Table(s) Locked.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITIONNow, if i disable/drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    Table altered.
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
            30          3 21-MAY-13       2000         12
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    no rows selectedPlease suggest.

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

  • Problems Engineering Surrogate Primary Key with Unique Key

    SDDM 3.3.0.747 with 2 problems (at least so far).  I am hoping that the problem is with this SDDM rookie and I have overlooked some setting. PROBLEM 1 I don’t want to start a religious debate about surrogate vs. natural keys but I am having a problem engineering both correctly from the logical model.  I am a rookie when it comes to SDDM but have many years of experience with Designer. By default I like to have both a natural UID  (UK) and a surrogate key based primary UID (PK) which is used for foreign keys.  The problem I am having with engineering is I can successfully engineer the surrogate PK’s, engineer the FK’s using the PK’s but cannot get the unique key to contain the surrogate keys in the child table.  If I check the identifying property in the relations, the PK columns and the UK columns are included in the child PK and the UK contains no columns. The Setup I have defined two reference entities, PROBABILITY and SEVERITY with natural unique keys defined.  I also have a child entity RISK_ASSESMENT with relationships back to the PROBABILITY and SEVERITY entities and both have the “Use surrogate keys:”: check box checked.  The unique key for the RISK_ASSESMENT entity includes the relationships back to PROBILITY and SEVERITY.  None of the entities have a PK or surrogate key defined and they all have the “Create Surrogate Key” check box checked.  In addition the following preferences are set: Data Modeler/Model/Logical   NOT Checked - Use And Set First Unique Key As Primary Key   NOT Checked – Name – Keep as the name of the Originating attribute   Checked – Entity Create Surrogate Key   Checked – Relationship Use Surrogate Key PROBLEM 2 When the foreign key columns are engineered I want the names to have a prefix “FK_” but they don’t.  Templates are set as follows: Data Modeler/Naming Standard/Templates   Foreign Key:  FK_{child}{parent}   Column Foreign Key:  FK_{ref column} Engineer to Relational Model/General Options   Checked - Apply name translation Marcus Bacon

    I have been switching between SD 4 EA1 and SDDM 3.3 trying to get things to work and trying out the template table for adding audit columns (really nice!).
    Concerning Problem1.  No matter what settings I use and whether I use SDDM 3.3 or SDI cannot get the FK columns to be included in the UK even though the relations are included in the UID in the entitty.  When I open the properties of the child table and click on the naming standards button and click ok it complains that the UK is not complete.  I add the FK columns to the UK and all is well including the naming standards.
    Concerning Problem 2.  Sometimes it engineers the names for FK's from the template and sometimes it doesn't.  Didn't see a pattern.  Gave up trying and used Naming Standards button.  I still had to change a few.
    The good new is, that after make changes needed in UK's and Column names of 18 tables, I know have everything deployed to Test except FK Indexes.  I think I have to do those by hand.
    Marcus Bacon

  • Javax.ejb.EJBException: Null primary key returned by ejbCreate method

    Hi all,
    I'm using SunOne 7.1 and I got this error when I call the create on the CMP bean.
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: javax.ejb.EJBException: Null primary key returned by ejbCreate method
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.ejb.containers.EntityContainer.postCreate(EntityContainer.java:801)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.applicationAdmin.ejb.ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.createNewApplication(ApplicationAdminBean_854379388_ConcreteImpl_LocalHomeImpl.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean_EJBObjectImpl.insertNewApplicationName(SFApplicationAdminBean_EJBObjectImpl.java:31)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at uk.co.upco.workflow.sessionFacedeApplicationAdmin._SFApplicationAdminBean_EJBObjectImpl_Tie._invoke(Unknown Source)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:569)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:211)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:113)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:83)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.corba.ee.internal.iiop.ServicableWrapper.service(ServicableWrapper.java:25)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at com.iplanet.ias.util.threadpool.FastThreadPool$ThreadPoolThread.run(FastThreadPool.java:283)
    [14/Aug/2004:01:15:34] WARNING ( 4044): CORE3283: stderr: at java.lang.Thread.run(Thread.java:534)
    cmp:
    public java.lang.Integer ejbCreateNewApplication(java.lang.String application) throws javax.ejb.CreateException {
    setApplication(application);
    return null;
    The key is auto_increment and is an integer.
    I'm usin MySQL and it is already set up as ANSI. (running as mysqld --ansi)
    Any Idea?
    Thanks in advance

    What happend when two concourrent user try to get the same key on the table? If for example I have 30 users at same time do I have lock table?
    Any way here the finest log using sunone 8. The error is the same, so I think I missing something:
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: preInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:19.296+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=11;|IM: postInvokeorg.apache.catalina.servlets.DefaultServlet@1acecf3|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Changing Policy Context ID: oldV = null newV = Test|#]
    [#|2004-08-14T12:11:26.166+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = create,Home, (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = SFApplicationAdmin (Action) = insertNewApplicationName,Remote,java.util.Hashtable (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean@1fa487f|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: doAsPrivileged contextId(Test)|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    mgmt: com.sun.enterprise.naming.TransientContext:com.sun.enterprise.naming.TransientContext@ad00b2|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    new|#]
    [#|2004-08-14T12:11:26.186+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.stream.out|_ThreadID=22;|
    SFApplicationAdmin: javax.naming.Reference:Reference Class Name: reference
    Type: url
    Content: ejb/SFApplicationAdmin
    |#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: returning cached ProtectionDomain - CodeSource: ((file:/Test <no certificates>)) PrincipalSet: null|#]
    [#|2004-08-14T12:11:26.186+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.core.security|_ThreadID=22;|JACC: Access Control Decision Result: true EJBMethodPermission (Name) = ApplicationAdmin (Action) = createNewApplication,LocalHome,java.lang.String (Codesource) = (file:/Test <no certificates>)|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|[Pool-ApplicationAdmin]: Added PoolResizeTimerTask...|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: preInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|:Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] -->SQLPersistenceManagerFactory.getPersistenceManager().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() FOUND javax.transaction.Transaction: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool().|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|PersistenceManagerImpl cache properties: _txCacheInitialCapacity=20, _flushedCacheInitialCapacity=20, _flushedCacheLoadFactor=0.75, _weakCacheInitialCapacity=20, _weakCacheLoadFactor=0.75.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.cacheLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.utility|_ThreadID=22;|NullSemaphore constructor() for PersistenceManagerImpl.fieldUpdateLock.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<--SQLPersistenceManagerFactory.getFromPool() PM: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|<->SQLPersistenceManagerFactory.getPersistenceManager() JDO Transaction:   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    .|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].begin:status = STATUS_NO_TRANSACTION ,txType: UNKNOWN for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.transaction|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] Tran[   Transaction:
    status = STATUS_NO_TRANSACTION
    Transaction Object = Transaction@16077795
    threads = 0
    ].setStatus: STATUS_NO_TRANSACTION => STATUS_ACTIVE for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|Thread[Worker: 16,5,org.apache.commons.launcher.ChildMain] <->SQLPersistenceManagerFactory.getPersistenceManager() : com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@8d18c for JTA: com.sun.ejb.containers.PMTransactionImpl@5.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.getCurrentWrapper() > current: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.pushCurrentWrapper() > current: null  new: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117.|#]
    [#|2004-08-14T12:11:26.196+0100|FINEST|sun-appserver-pe8.0|javax.enterprise.resource.jdo.persistencemanager|_ThreadID=22;|---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@567117  prev: null.|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.util|_ThreadID=22;|IM: postInvokeuk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl@7ae165|#]
    [#|2004-08-14T12:11:26.196+0100|FINE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:114)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1232)
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2559)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|EJB5018: An exception was thrown during an ejb invocation on [ApplicationAdmin]|#]
    [#|2004-08-14T12:11:26.196+0100|INFO|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=22;|
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
    java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.jdo.spi.persistence.support.ejb.cmp.JDOEJB11HelperImpl.assertPrimaryKeyFieldNotNull(JDOEJB11HelperImpl.java:446)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.setApplicationId(ApplicationAdminBean_1421299025_ConcreteImpl.java:102)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean.ejbCreateNewApplication(ApplicationAdminBean.java:93)
         at uk.co.myDomain.workflow.applicationAdmin.ejb.ApplicationAdminBean_1421299025_ConcreteImpl.ejbCreateNewApplication(ApplicationAdminBean_1421299025_ConcreteImpl.java:334)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:140)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:168)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: java.lang.IllegalArgumentException: JDO73013: Primary Key field applicationId for bean 'ApplicationAdmin' cannot be null.
         at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:2564)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:2416)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:763)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:197)
         at $Proxy10.createNewApplication(Unknown Source)
         at uk.co.myDomain.workflow.sessionFacedeApplicationAdmin.SFApplicationAdminBean.insertNewApplicationName(SFApplicationAdminBean.java:64)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.enterprise.security.SecurityUtil$2.run(SecurityUtil.java:146)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.enterprise.security.application.EJBSecurityManager.doAsPrivileged(EJBSecurityManager.java:930)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:151)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:128)
         at $Proxy7.insertNewApplicationName(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:117)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:651)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:190)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1653)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1513)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:895)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:172)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:668)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:375)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:284)
         at com.sun.corba.ee.impl.transport.ReaderThreadImpl.doWork(ReaderThreadImpl.java:73)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:382)
    |#]
    Any Idea?
    Thanks in advance for any help

Maybe you are looking for

  • How do I add music to my iPhone 5 from my macbook air?

    I am having trouble figuring out how to add music from my MacBook Air to my iPhone 5. Could someone lead me through the steps?

  • How to import the organization to BPM standalone 10g

    I create the contents of the organiztion in BPM studio 10g. When I deploy the ###.exp file to BPM standalone 10g, the new roles can be mapped to BPM standalone. However, the participants' information cannot be imported. How to import the participants

  • How to create IDOC

    <b> HI ,    USING ALE I WANT TO TRANSFER MATERIAL DATA , FOR THIS I HAV CREATED THE RFC PATH FOR RECEIVER AND SENDER . USING MATMAS I transfered it  , But I want to create an idoc for this , Is there any way to create an idoc for any data transfer .

  • FIGL Extractor - read performane issue.

    Hello Gurus, I need a help. The below code is used in a BI-FIGL custom user exit. BSIS read statement. ABAP Code: Get Cost Center Accounting from BSIS table SELECT bukrs "Company Code gjahr "Fiscal Year monat "Fiscal Period hkont "General Ledger Acco

  • Error Message: JBO-26018

    Error Message: JBO-26018: Cannot insert a new row with no attribute set in entity Kssegtobjbasdat I have the following error. Could you help me to solve the problem. When I run that on JDeveloper it works but when I run on the webserver it doesn't: T