SQLIntegrityConstraintViolationException at insert

Hi !
I am using Eclipselink 1.0.2. I have to persist round about 200 entities in one transaction. At commit eclipselink crashes with following exception:
Internal Exception: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: Unique Constraint (JKO.PK_C_DITYP) verletzt
Error Code: 1
Call: INSERT INTO C_DITYP (ID, ...
     bind => [70746,...
I dumped the registered objects and i see two items with the same primary key:
Key: [70746]     Identity Hash Code: 819278037     Object: com.lhsystems.wing.dictionary.core.entity.DictDatatype@30d530d5
Key: [70746]     Identity Hash Code: 39518811     Object: com.lhsystems.wing.dictionary.core.entity.DictDatatype@25b025b
Furthermore there are a lot of double Items with the same key.
Does anybody know how i can solve this problem?
thanks,
Joerg
Edited by: user10584502 on 14.02.2009 13:14
Edited by: user10584502 on 14.02.2009 13:15

The sequencing is ok.
After refactoring my merging with unattached value objects to entities, i get rid of this problem, but I still don't know exactly the reason for my problem.
Hopefully i will never see this problem.

Similar Messages

  • DAC Error: Error while inserting a record!

    Hi,
    I want to create a new DAC on my system but I am getting below error while trying to create record or saving any records.
    Can't create reference
    MESSAGE:::INSERT INTO W_ETL_OBJ_REF(OBJ_WID, OBJ_REF_WID, OBJ_TYPE, OBJ_REF_TYPE_CD, APP_WID, LAST_UPD, SOFT_DEL_FLG, ROW_WID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
    Values :
    KEY : 1
    VALUE : 202CB962AC5975B964B7152D234B70
    KEY : 2
    VALUE : 202CB962AC5975B964B7152D234B70
    KEY : 3
    VALUE : W_ETL_SA
    KEY : 4
    VALUE : 1
    KEY : 5
    VALUE : null
    KEY : 6
    VALUE : 2011-10-12 15:17:11.586
    KEY : 7
    VALUE : N
    KEY : 8
    VALUE : 7716EB6EA78A5B2E2D3C2AE1CF204A2C
    EXCEPTION CLASS::: com.siebel.etl.database.IllegalSQLQueryException
    com.siebel.etl.database.DBUtils.batchUpdate(DBUtils.java:1946)
    com.siebel.etl.gui.util.UncommitUpdateHelper.executeUpdate(UncommitUpdateHelper.java:84)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createReference(BaseDACObject.java:1362)
    com.siebel.analytics.etl.client.data.dataobject.DACObject.createReference(DACObject.java:78)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createUpdateReference(BaseDACObject.java:1274)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createOwnedObject(BaseDACObject.java:565)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.create(BaseDACObject.java:544)
    com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:210)
    com.siebel.analytics.etl.client.data.dataobject.DACObject.createUpdate(DACObject.java:213)
    com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:198)
    com.siebel.analytics.etl.client.data.model.ResultSetParser.insertNewRecord(ResultSetParser.java:226)
    com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.insertNewRecord(UpdatableDataTableModel.java:122)
    com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:335)
    com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:320)
    com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.updateRecord(UpdatableDataTableModel.java:76)
    com.siebel.analytics.etl.client.view.edit.EditObject.save(EditObject.java:326)
    com.siebel.analytics.etl.client.view.edit.EditObject.actionPerformed(EditObject.java:616)
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    java.awt.Component.processMouseEvent(Component.java:6041)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    java.awt.Component.processEvent(Component.java:5806)
    java.awt.Container.processEvent(Container.java:2058)
    java.awt.Component.dispatchEventImpl(Component.java:4413)
    java.awt.Container.dispatchEventImpl(Container.java:2116)
    java.awt.Component.dispatchEvent(Component.java:4243)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    java.awt.Container.dispatchEventImpl(Container.java:2102)
    java.awt.Window.dispatchEventImpl(Window.java:2440)
    java.awt.Component.dispatchEvent(Component.java:4243)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    ::: CAUSE :::
    MESSAGE:::ORA-01400: cannot insert NULL into ("DW"."W_ETL_OBJ_REF"."APP_WID")
    EXCEPTION CLASS::: java.sql.SQLIntegrityConstraintViolationException
    oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:737)
    oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:647)
    oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:530)
    oracle.jdbc.driver.T2CPreparedStatement.executeForRows(T2CPreparedStatement.java:713)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
    oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
    oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
    com.siebel.etl.database.cancellable.CancellablePreparedStatement.executeUpdate(CancellablePreparedStatement.java:91)
    com.siebel.etl.database.DBUtils.batchUpdate(DBUtils.java:1942)
    com.siebel.etl.gui.util.UncommitUpdateHelper.executeUpdate(UncommitUpdateHelper.java:84)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createReference(BaseDACObject.java:1362)
    com.siebel.analytics.etl.client.data.dataobject.DACObject.createReference(DACObject.java:78)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createUpdateReference(BaseDACObject.java:1274)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.createOwnedObject(BaseDACObject.java:565)
    com.siebel.analytics.etl.client.data.dataobject.BaseDACObject.create(BaseDACObject.java:544)
    com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:210)
    com.siebel.analytics.etl.client.data.dataobject.DACObject.createUpdate(DACObject.java:213)
    com.siebel.analytics.etl.client.data.dataobject.UpdatableDataObject.createUpdate(UpdatableDataObject.java:198)
    com.siebel.analytics.etl.client.data.model.ResultSetParser.insertNewRecord(ResultSetParser.java:226)
    com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.insertNewRecord(UpdatableDataTableModel.java:122)
    com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:335)
    com.siebel.analytics.etl.client.data.model.DACTableModel.insertNewRecord(DACTableModel.java:320)
    com.siebel.analytics.etl.client.data.model.UpdatableDataTableModel.updateRecord(UpdatableDataTableModel.java:76)
    com.siebel.analytics.etl.client.view.edit.EditObject.save(EditObject.java:326)
    com.siebel.analytics.etl.client.view.edit.EditObject.actionPerformed(EditObject.java:616)
    javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    java.awt.Component.processMouseEvent(Component.java:6041)
    javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    java.awt.Component.processEvent(Component.java:5806)
    java.awt.Container.processEvent(Container.java:2058)
    java.awt.Component.dispatchEventImpl(Component.java:4413)
    java.awt.Container.dispatchEventImpl(Container.java:2116)
    java.awt.Component.dispatchEvent(Component.java:4243)
    java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    java.awt.Container.dispatchEventImpl(Container.java:2102)
    java.awt.Window.dispatchEventImpl(Window.java:2440)
    java.awt.Component.dispatchEvent(Component.java:4243)
    java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Why it happened and how to solve it?

    The error is not because a table is MISSING..it is because its trying to insert a NULL and its failing: ORA-01400: cannot insert NULL.
    I would check the following:
    Make sure all DAC related patches are applied (you can find these on metalink) for the DAC version you are on
    Is this your first time to try a load? Is there any load that may not have cleaned up all process that was previously runninng..if so restart the DAC services and retry
    Make sure the DAC repository metadat tables are created properly. Go to the table in question W_ETL_OBJ_REF and see if it is correctly created
    Did you assemble all Subject Areas and successfully Build the execution plan? If not, do that and retry.
    Let me know how it goes.
    if this is helpful, please mark as correct or helpful.

  • Error when cloning a AD connector (cannot insert NULL into ("OIMUSER"."OIU"

    I am getting below error when trying to clone AD connector (new resource). I Imported/Exported AD resource Object, Process form and the dependent lookup tables.
    I can see the new resource object, process definition, process forms and Recon rule, when i tried provision a the new resource i see this error in logs.
    DEBUG,23 Dec 2010 02:34:45,788,[XELLERATE.DDM.IMPORT], Importing ProcessAdministrator(XMLCREATED)
    DEBUG,23 Dec 2010 02:34:45,788,[XELLERATE.DDM.IMPORT], Object is being created
    DEBUG,23 Dec 2010 02:34:45,788,[XELLERATE.DDM.IMPORT], Creating data object
    DEBUG,23 Dec 2010 02:34:45,788,[XELLERATE.DDM.IMPORT],Creating data object with params: com.thortech.xl.dataobj.tcDataBase@14d388c,41,null,[B@9355bd
    DEBUG,23 Dec 2010 02:34:45,803,[XELLERATE.DDM.IMPORT], Resolving dependency to {UserGroup=SYSTEM ADMINISTRATORS}
    DEBUG,23 Dec 2010 02:34:45,803,[XELLERATE.DDM.IMPORT], Dependency resolved with key: 1
    DEBUG,23 Dec 2010 02:34:45,803,[XELLERATE.DDM.IMPORT], Saving data object
    INFO,23 Dec 2010 02:34:46,256,[XELLERATE.DDM.STATS],Purging 6 prepared statements
    ERROR,23 Dec 2010 02:35:52,663,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: ORA-01400: cannot insert NULL into ("OIMUSER"."OIU"."OST_KEY")
    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("OIMUSER"."OIU"."OST_KEY")
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:85)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:947)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3462)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1349)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:159)
         at com.thortech.xl.dataaccess.tcDataBase.writePreparedStatement(Unknown Source)
         at com.thortech.xl.dataobj.PreparedStatementUtil.executeUpdate(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.insertImplementation(Unknown Source)
    Please let me know if you have any idea..
    Thanks..
    Edited by: IDMuser19 on Dec 29, 2010 2:21 PM

    After Setting Database to DEBUG mode i see below errors in the log
    DEBUG,27 Dec 2010 16:26:44,850,[XELLERATE.DATABASE],select ost_launch_dependent, ost_key, ost_status from ost ost, obi obi where ost.obj_key=obi.obj_key and obi.obi_key=181
    INFO,27 Dec 2010 16:26:44,865,[XELLERATE.DATABASE],DB read: select upp_deny_list from upp,usr where usr.usr_key=upp.usr_key and usr.usr_key=21
    DEBUG,27 Dec 2010 16:26:44,865,[XELLERATE.DATABASE],select upp_deny_list from upp,usr where usr.usr_key=upp.usr_key and usr.usr_key=21
    INFO,27 Dec 2010 16:26:44,865,[XELLERATE.DATABASE],DB read: select pol_key, obi.obj_key from rqo,obi where rqo.obi_key = obi.obi_key and obi.obi_key = 181
    DEBUG,27 Dec 2010 16:26:44,865,[XELLERATE.DATABASE],select pol_key, obi.obj_key from rqo,obi where rqo.obi_key = obi.obi_key and obi.obi_key = 181
    INFO,27 Dec 2010 16:26:44,881,[XELLERATE.DATABASE],DB read: select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOIU' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_pre_insert_sequence>0 order by dvt.dvt_pre_insert_sequence
    DEBUG,27 Dec 2010 16:26:44,881,[XELLERATE.DATABASE],select evt.evt_key, evt.evt_name, evt.evt_package from dob dob, evt evt, dvt dvt where dob.dob_key=dvt.dob_key and dvt.evt_key=evt.evt_key and (dob.dob_name='com.thortech.xl.dataobj.tcOIU' or dob.dob_name='com.thortech.xl.dataobj.tcTableDataObj' or dob.dob_name='com.thortech.xl.dataobj.tcDataObj' ) and dvt.dvt_pre_insert_sequence>0 order by dvt.dvt_pre_insert_sequence
    DEBUG,27 Dec 2010 16:26:44,881,[XELLERATE.DATABASE],insert into oiu (OIU_KEY, OBI_KEY, USR_KEY, OIU_SERVICEACCOUNT, OIU_CREATE, OIU_CREATEBY, OIU_UPDATE, OIU_UPDATEBY, oiu_rowver) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
    DEBUG,27 Dec 2010 16:26:44,881,[XELLERATE.DATABASE],select OIU_seq.nextval from dual
    ERROR,27 Dec 2010 16:26:44,928,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: ORA-01400: cannot insert NULL into ("OIMUSER"."OIU"."OST_KEY")
    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("OIMUSER"."OIU"."OST_KEY")
         at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:85)
         at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    INFO,27 Dec 2010 16:26:44,990,[XELLERATE.DATABASE],DB read: select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.INSERT_FAILED'
    DEBUG,27 Dec 2010 16:26:44,990,[XELLERATE.DATABASE],select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.INSERT_FAILED'
    ERROR,27 Dec 2010 16:26:45,006,[XELLERATE.SERVER],Class/Method: tcDataObj/save Error :Insertion of dataobject into database failed
    INFO,27 Dec 2010 16:26:45,006,[XELLERATE.DATABASE],DB read: select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.INSERT_FAILED'
    DEBUG,27 Dec 2010 16:26:45,006,[XELLERATE.DATABASE],select err_key, err_code, err_desc, err_rowver, err_remedy, err_count, err_last_occurance, err_action, err_help_url, err_severity from err where err_code='DOBJ.INSERT_FAILED'
    ERROR,27 Dec 2010 16:26:45,006,[XELLERATE.DATABASE],Class/Method: tcDataBase/rollbackTransaction encounter some problems: Rollback Executed From
    java.lang.Exception: Rollback Executed From
         at com.thortech.xl.dataaccess.tcDataBase.rollbackTransaction(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.rollback(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.doRollback(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcUserProvisionObject.insertImplementation(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
    Thanks .... Please reply if you have any idea..

  • Insert called before delete in a collection with unique constraint

    Hi all,
    I have a simple @OneToMany private mapping:
    private Collection<Item> items;
    @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL)
    public Collection<Item> getItems() {
    return items;
    public void setItems(Collection<Item> items) {
    this.items = items;
    public void customize(ClassDescriptor classDescriptor) throws Exception {
    OneToManyMapping mapping = (OneToManyMapping)
    classDescriptor.getMappingForAttributeName("items");
    mapping.privateOwnedRelationship();
    I have a unique constraint on my Items table that a certain value cannot be duplicated.
    My problem appears when I remove a previously saved item from the collection and add a new item containing the same data, at the same time.
    After I save the parent and do a flush, I receive SQLIntegrityConstraintViolationException because TopLink performs first an insert query instead of deleting the existing item.
    I tested the application and everything went fine with: remove item / save parent / insert item / save parent
    I checked on the Internet and the documentation but didn't find anything similar to my problem. I tried debugging TopLink's internal calls but I'm missing some general ideas about all the inner workings and don't know what to look for. I use TopLink version: Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))
    Does anyone have a hint of what to look for?
    Edited by: wise_guybg on Sep 25, 2009 4:01 PM
    Edited by: wise_guybg on Oct 5, 2009 11:22 AM

    Thank you for the suggestions James
    As I mentioned briefly I have done some debugging but couldn't understand how collections are updated. What I did find out is that setShouldPerformDeletesFirst() doesn't come into play in this case because this is not a consecutive change on entities.
    What I have in my case is a collection inside an entity that the user has tampered with and now TopLink has to do a merge. I cannot call flush() in the middle since the user has not approved that the changes made to the entity should be saved.
    I see that for TopLink it's not easy to figure out the order in which changes were made to a collection. Here is pseudo-code of when the constraint is touched:
    entity.items.remove(a)
    entity.items.add(b)
    merge(entity)
    And here is code that executes without a problem:
    entity.items.remove(a)
    merge(entity)
    entity.items.add(b)
    merge(entity)
    So once again, I think that collection changes are managed differently but I don't find a way to tell TopLink how to handle them. Any ideas?

  • Errors not logged when IKM Oracle Multi Record Insert is selected

    Dear All,
    I am new in ODI 11g and I am facing the following problem:
    I created a package with 3 Interfaces with Oracle Multi Record Insert.
    In the first interface I load the source data to a temporary target
    In the second interface target#1 table is loaded using interface#1
    In the third interface target#2 is loaded using interface#1 and the multiple insert is executed and committed.
    This works correctly, but when a data error occurs (e.g. mandatory column is null), instead of the error being logged in the Error table, execution of the last interface fails with the following error:
    Caused By: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into (<schema>.<table>.<column>)
    I noticed that when I use Oracle Incremental Update instead, the errors get logged correctly in the error table.
    Does anyone know what could be causing this?

    Hi Bhabani,
    Thanks for the reply.
    I am afraid that this is a major issue for me, I do not want to re-query the source table for each target table, but on the other hand I cannot fail the process for each invalid record and I need the logging.
    Can you think of a workaround for my use case?
    Thank you!

  • SCD TYPE 2 in ODI 11g-error in INSERT CHANGING AND NEW DIMENSIONS

    Hi Guys,
    Im using IKM:Oracle Slowly Changing Dimension to achieve SCD TYPE 2.
    It is working fine for Overwrite on change.
    But whenever there a new insert upon change(Add Row on Change) in source, throwing below error:
    ODI-1228: Task INT_EMP_SCD_TYPE (Integration) fails on the target ORACLE connection ORA_DEV_EDW.
    Caused By: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DEV_EDW.EMP_KEY) violated.
    I have unique key in target table column SAPID.
    How to overcome this issue.
    quick help would be highly appreciated.
    Thanks,
    Sreedhar S,
    <telephone number removed by moderator. this is a publicly viewable forum, not Oracle technical support>

    Hi Sreedhar,
    As said in the error message, you have an unique or primary key on one column and you try to insert a value already existing. This is a design issue.
    You have to ensure that you don't try to re-insert existing value for the column(s) with the key.
    Regards,
    Jerome

  • SQLIntegrityConstraintViolationException and database transaction

    Hi,
    I have the following situation:
    - two entities with 1-1 relation
    - there is no "Composition association" since one of the entities is part of another 1-1 relation
    - a view object based on both entities, both are updatable
    - SQL92 SqlBuilder; entities use another attribute to refresh DbSequence after insert
    Use case:
    - user creates a new viewRow, both entities are created
    - user saves data
    - firts entity is persisted OK, key is refreshed (custom code in refreshFKInNewContainees() refreshes key in the other entity)
    - the second entity insert fails due to unique constraint violation
    - exception is thrown and an error message is displayes
    - user changes the duplicated value and saves data again
    - the first entity insert fails, because another entity with the same temporary unique value (used for refresh) already exists in the database (or, if unique constraint is missing in the database, two identical records are inseted and refresh fails)
    The only solution for this problem I found is, to implement a custom Transaction object and do something like:
        public void postChanges(TransactionEvent te){
            try
                super.postChanges(te);
            catch(DMLException ex)
                Throwable t = ex.getCause();
                if(t!=null && t instanceof SQLIntegrityConstraintViolationException)
                        try
                           this.getJdbcConnection().rollback();   
                        catch(SQLException exc)
                throw ex;
        }Is this a good practice? Is there any other way to handle db constraint error without explicitly accessing JDBC transaction?

    Thx Andy!
    Is it 100GB or a particular % of drive space? What if my total log drive is only 80GB? Do you have a link to a whitepaper detailing this?
    Edit - ...and as a followup, is this just monitoring? I'm concerned that Exchange DOES NOT take corrective action (like backpressure is supposed to) for the transaction log drive.
    MA is a can of worms, but you can look at things like adjusting storage monitor thresholds:
    http://blogs.technet.com/b/ehlro/archive/2014/02/20/exchange-2013-managed-availability-healthset-troubleshooting.aspx
    If you are worried about running out of diskspace in the transaction log drive, look at loose truncation instead:
    http://windowsitpro.com/exchange-server-2013/loose-truncation-exchange-server-2013-sp1
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Webcenter Sites installation failure (java.sql.SQLIntegrityConstraintViolationException: ORA-01400)

    We are installing webcenter sites 11g on windows 7 machine 64 bit and using weblogic 10.3.6 as application server and oracle database 11g R2 Express edition as database.
    We have created a user named GENPACT with system privilages as CREATE SESSION,CREATE TABLE,CREATE VIEW AND UNLIMITED TABLE SPACE with roles as CONNECT and RESOURCE.
    We followed all configuration guide lines for weblogic given in configuration guide by oracle.
    When installation is at 74 percent installation stops with following error--
    [2013-07-25 14:17:46,762 IST] [ERROR] [.kernel.Default (self-tuning)'] [fatwire.logging.cs.db] Exception executing prepared statement: INSERT INTO tt1374741961848 (ELEMENTNAME,DESCRIPTION) VALUES (?,?)
    ELEMENTNAME = OpenMarket/Xcelerate/Installation/Miscellaneous/RemoveOldAlloyUIElements
    DESCRIPTION = This element removes old UI elements
    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into ("GENPACT"."TT1374741961848"."URL")
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    and
    weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    [2013-07-25 14:17:46,778 IST] [ERROR] [.kernel.Default (self-tuning)'] [cs.core.db.DBTransaction] TransactionUnit failed to execute
    com.fatwire.cs.core.db.TransactionAbortException: replacerows failed
    at COM.FutureTense.CatalogManager.CatalogEngine$4.execute(CatalogEngine.java:1549)

    I installed Weblogic 10.3.6 and still the same error is occurring.
    I revoked the DBA role from the user and only gave it the privileges mentioned in the documentation. Those privileges are:
    CREATE SESSION
    CREATE TABLE
    CREATE VIEW
    UNLIMITED TABLESPACE
    However, the documentation doesn't mention anything about the Connect and Resources roles.
    Please take into consideration that the error is not related to any privileges or roles the user does not have. This is a ORA-0140 error meaning that the installer is trying to insert a null value into the URL column in the TT1343304398222 table.
    Any ideas ???
    Edited by: user13280720 on Jul 30, 2012 12:39 AM

  • Can not insert/update data from table which is created from view

    Hi all
    I'm using Oracle database 11g
    I've created table from view as the following command:
    Create table table_new as select * from View_Old
    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
    Anybody tell me, what's happend? cause?
    Thankyou
    thiensu
    Edited by: user8248216 on May 5, 2011 8:54 PM
    Edited by: user8248216 on May 5, 2011 8:55 PM

    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK?

  • Lock-ups while inserting to a remote database using a dblink

    Our application runs across multiple instances of Oracle 8i - 8.1.6.
    Throughout the day we run some batch processes to transfer data across these instances using dblinks. Ocassionally the process locks up and further investigation shows that the server from which we are pushing information out seems to have executed an insert statement on a remote instance (insert into test_table@tst_dblink select * from local_table) and is waiting for a return from the remote server while the remote instance seems to be hanging too. Oracle does not return any error but simply waits forever for the statement to finish.
    If anybody has experienced this before can you please share any information you may have on 1. how to prevent this from happening or 2. How to make oracle give up on the transaction, roll it back and raise an error?
    Thanks a lot....

    Well, certainly we need more info to fix the problem! couple of "system states" on both the machines when the job is hanging would help. couple of "stack trace" of the shadow process will also help. please call local oracle support with the system state and stack trace.
    Sounds like the job is hanging on some resource (lock,enque,latch,io...). oracle doesn't give up for few resources, like waiting on ST,latch, io etc. we have to kill the offending process if we want!!
    just my 2 cents :)
    G

  • In ALV report  list edit a field and insert our own text

    Hi
    In a report when I am in third list using ALV a field which is disabled should be enabled and have to insert the new value in it and save.
    please tell me how to do it using classes and methods and also using ALV's.
    Promise to reward points.
    Regards
    Mac

    See these threads
    Re: Making selected alv rows editable
    Re: selective edit in ALV grid
    Regards,
    Ravi

  • Inserting Dynamic Images in to a Crystal Report 10

    Hi all,
    I am trying to insert dynamic pictures into my report from repository, by getting the path for the picture from database fields. The version that I am using is Crystal Reports 10.
    Here is what I have done.
    I inserted an OLE object into the report, went to "Format Graphics" by right clicking on the OLE object, then to "Hyperlink" Tab (as I didn't see anything other than "Reset" button and picture dimension options under the "Picture" tab), and selected "File" Radio button (as I didn't want to display the picture as Hyperlink) and gave the @Filepath as the formula there. @Filepath is the formula that gives me the complete path for the JPEG that I need to insert in the report.
    filepath = field A + field B
    where field A is the location for the image and field B is the actual image name.
    the actual image is located in repository folder.
    I am not able to see the image in the report "Preview" section as it is showing it has an empty box and when I click on that empty OLE object, I am able to view the image in a separate window where as my requirement is to view the image within the report (not in a separate window).
    I didn't find anything useful under Format Graphics -> Picture tab.
    I appreciate any kind of help from you all.
    Thanks!

    That feature wasn't available nor was it supported in CR 10. You'll have to upgrade to CR Xi R2 or 2008 to allow using a database field as the location of the file.
    CR 10 would only load the picture when the report is opened, it will never update when clicking on the refresh button.

  • I am making a calendar in iPhoto, picking photos from a folder, let's call it "2011 Pics," in iPhoto. After arranging all the photos and captions I decided I wanted to insert a new photo -- one that was not in "2011 Pics." So I inserted it into the folder

    Add new photo to existing calendar folder in iPhoto
    I am making a calendar in iPhoto, picking photos from a folder, let's call it "2011 Pics," in iPhoto. After arranging all the photos and captions I decided I wanted to insert a new photo -- one that was not in "2011 Pics." So I inserted it into the folder, but the picture does not show up on the scrolling menu of pictures at the left of the calendar-making page. This happened last year and in frustration I started all over again. But surely there is a way to add a new picture to a calendar that is already laid out.

    Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
    In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think?

  • L need help with textedit, I inserted a picture then the cursor went from small to the size of picture and l need to write a header next to the picture not at the bottom of it. can anyone help please?

    Can anyone tell me how to make cursor smaller after inserting picture so that l can add somethimg right next to it instead of bottom of picture. Meaning the next line is too low

    AFAIK, you can't. The nature of TextEdit is that it allows the picture to be treated as a character and adjusts the cursor size for that line.
    You need a app that supports transparent overlays.

  • How can I debug a Bulk Insert error?

    I'm loading a bunch of files into SQL server.  All work fine, but one keeps erroring out on me.  All files should be exactly the same in structure, but they have different dates, and other different financial metrics, but the structure and field
    names should be exactly the same.  Nevertheless, one keeps konking out, and throwing this error.
    Msg 4832, Level 16, State 1, Line 1
    Bulk load: An unexpected end of file was encountered in the data file.
    Msg 7399, Level 16, State 1, Line 1
    The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
    Msg 7330, Level 16, State 2, Line 1
    Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
    The ROWTERMINATOR should be CRLF, and when you look at it in Notepad++ that's what it looks like, but it must be something else, because I keep getting errors here.  I tried the good old:  ROWTERMINATOR='0x0a'
    That works on all files, but one, so there's something funky going on here, and I need to see what SQL Server is really doing.
    Is there some way to print out a log, or look at a log somewhere?
    Thanks!!
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    The first thing to try is to see if BCP likes the file. BCP and BULK INSERT adhere to the same spec, but they are different implementations, but there are subtle differences.
    There is an ERRORFILE option, but it more helps when there is bad data.
    You can also use the BATCHSIZE option to see how many records in the file it swallows, before things go bad. FIRSTROW and LASTROW can also help.
    All in all, it can be quite tedious find that single row where things are different - and where BULK INSERT loses sync entirely. Keep in mind that it reads fields on by one, and it there is one field terminator to few on a line, it will consume the line
    feed at the end of the line as data.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • MSI P67A-C43 (B3) & OCZ Vertex 3 VTX3-25SAT3 Issues

    Specifications: Quote Mobo/Laptop: MSI P67A-C43 (B3) BIOS: 1.B (2011-04-14) CPU: Intel Core i5-2500K RAM: 8GB (2 x 4GB) 240-Pin DDR3 SDRAM DDR3 1600 CML8GX3M2A1600C9B Vid: ASUS ENGTX560 TI DCII TOP/2DI/1GD5 GeForce GTX 560 Ti PSU: HX750 (CMPSU-750HX)

  • Workflow related to timesheet entries

    can there be a workflow with out a work flow template and only with workflow tasks and user exits and rules attached to the tasks

  • Error in DTP while loading data on 0PUR_O02 dso

    Hi Expert,                  While I am trying to load data on 0PUR_O02 ods through DTP  of 2lis_02_hdr data source is shows an error like "Runtime Errors         UC_OBJECTS_NOT_NUMLIKE" it is not able to execute the ABAP Progaram "GP3JRKF3SV9ZD4JVR3H

  • NI Veristand 2014 doesn't appear in MATLAB R2014a Code generation

    Hi I installed NI Veristand 2014 after installing MATLAB R2014a. I restarted my PC and tried to apply the sinewave example. I looked at code generation in Simulink model configuration parameters but couldn't find the NIVeristand option as illustrated

  • The backplate on my iphone 4 is smashed, how do i go about replacing this?

    I woke up this morning after a tough night on the booze and realised i had smashed the backplate on my iphone 4 and was just wondering if there was anyway i could get this replaced, or even if it's covered by warranty?