DBAdapter merge operation error

Hello,
I run into a problem when trying the DBAdapter merge operation. I believe the merge operation first executes a query operation based on the primary keys, if not found, then will execute an insert operation, my problem is when I pass in the input as " " for one primary key, seems the merge operation internally transform it to "" then do the query, so there is no record found, then it will do the insert with the right primary key " ", which results in the violation of the unique constraint (suppose I inserted a record with primary key " " before).
Does anyone have any suggestion for this?
Thanks.
Leo

I'm using database triggers as well, if your acquanted with pl/sql that would be the 1st choice, especially because you can generate the needed triggers for all your audit columns.
On the other hand you can define annotations in JPA, EJB3.0 now to populate your audit-columns automatically, maybe this can be done as well in the toplink mapping files?
It should be possible, but I don't now until which level annotations are supported in toplink used by the dbAdapters.
Kind regads,
Nathalie

Similar Messages

  • DbAdapter (nolock in merge operation)

    Hello,
    I'm currently with performance problems when I do various operations on a SQL Server 2000 using a dbAdapter(merge operations).
    I did some analysis in the database and realized that I am having lock in "select" operation, and I have to wait for the "update". How can I add the command "nolock" at the end of this query?
    Thanks
    Zanatto

    Yes, this is to prevent confusion when the merge result falls outside of the active filter and is thus hidden from the user.  Sometimes it will, sometimes it won't - so we chose consistency of behavior.
    You should be able to prevent this by clicking the padlock icon in the upper right of the grid view and filter area. This will lock the filter.

  • Error in Database Adapter Insert Or Update (Merge) Operation

    I have a simple SOA composite which reads XML files and posts data to a database table using a database adapter. I would like to perform a merge operation but I keep getting this error in the log -
    SEVERE: JCABinding=> XML2DB:WriteInvToDB [ WriteInvToDB_ptt::merge(InventoryCollection) ] Could not invoke operation 'merge' against the 'Database Adapter' due to:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Here is the complete log:
    SEVERE: JCABinding=> XML2DB:WriteInvToDB [ WriteInvToDB_ptt::merge(InventoryCollection) ] Could not invoke operation 'merge' against the 'Database Adapter' due to:
    BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Please see the logs for the full DBAdapter logging output prior to this exception.
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    SEVERE: JCABinding=> [default/XML2DB!1.0*2008-12-23_13-27-06_078.WriteInvToDB]:merge One-way interaction failed
    Jan 3, 2009 10:58:06 AM oracle.tip.mediator.serviceEngine.MediatorServiceEngine post2Mesh
    SEVERE: Post 2 messah failed
    oracle.fabric.common.FabricInvocationException: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.EndpointInteractionException.getFabricInvocationException(EndpointInteractionException.java:74)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:226)
         at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:153)
         at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
         at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
         at sun.reflect.GeneratedMethodAccessor253.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
    Caused by: BINDING.JCA-12563
    Exception occured when binding was invoked.
    Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    The invoked JCA adapter raised a resource exception.
    Please examine the above error message carefully to determine a resolution.
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:428)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeJcaReference(JCAInteractionInvoker.java:509)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.invokeAsyncJcaReference(JCAInteractionInvoker.java:493)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAEndpointInteraction.performAsynchronousInteraction(JCAEndpointInteraction.java:429)
         at oracle.integration.platform.blocks.adapter.AdapterReference.post(AdapterReference.java:193)
         ... 49 more
    Caused by: BINDING.JCA-11616
    DBWriteInteractionSpec Execute Failed Exception.
    merge failed. Descriptor name: [WriteInvToDB.Inventory].
    Caused by java.lang.NullPointerException.
    Please see the logs for the full DBAdapter logging output prior to this exception.
         at oracle.tip.adapter.db.exceptions.DBResourceException.createEISException(DBResourceException.java:488)
         at oracle.tip.adapter.db.exceptions.DBResourceException.outboundWriteException(DBResourceException.java:529)
         at oracle.tip.adapter.db.transaction.DBTransaction.commit(DBTransaction.java:287)
         at oracle.integration.platform.blocks.adapter.fw.jca.cci.JCAInteractionInvoker.executeJcaInteraction(JCAInteractionInvoker.java:311)
         ... 53 more
    Caused by: java.lang.NullPointerException
         at oracle.toplink.descriptors.DescriptorQueryManager.putCachedUpdateCalls(DescriptorQueryManager.java:1605)
         at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.prepareUpdateObject(ExpressionQueryMechanism.java:1608)
         at oracle.toplink.internal.queryframework.StatementQueryMechanism.updateObject(StatementQueryMechanism.java:405)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1136)
         at oracle.toplink.queryframework.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:69)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:279)
         at oracle.toplink.queryframework.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:47)
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> ReadXML ReadXMLonReject: The resource adapter 'File Adapter' requested handling of a malformed inbound message. However, the following Service property has not been defined: 'rejectedMessageHandlers'. Please define it and redeploy the module. Will use the default Rejection Directory file://jca\ReadXML\rejectedMessages for now.
    Jan 3, 2009 10:58:06 AM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
    WARNING: JCABinding=> ReadXML ReadXMLonReject: Sending invalid inbound message to Exception Handler:
    Jan 3, 2009 10:58:06 AM oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread run
    SEVERE: Failed to enqueue error message
    javax.jms.TransactionInProgressException: Cannot call commit on a XA capable JMS session.
         at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:595)
         at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:846)
         at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:840)
         at oracle.j2ee.ra.jms.generic.SessionWrapper.commit(SessionWrapper.java:197)
         at oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread.run(ErrorMessageEnqueuer.java:187)
         at java.lang.Thread.run(Thread.java:595)
    Any help is greatly appreciated.
    The INSERT operation works fine with the database adapter, but I cannot get MERGE and UPDATE operations to work as expected!
    Thanks.

    hi Sudeep,
    We are at first hand struggling with DB adapter problem getting down everytime. Don't know the reason why.
    DB adapter is in down state and when trying to make it up gives below error:
    "weblogic.application.ModuleException: weblogic.connector.exception.RAException: Jndi Name is null or empty."
    I just created a simple sync process using DB adapter (custom select) and deplyed successfully. I hope jndi name is not to be configured in weblogic-ra.xml file.
    This is the first time we are using this JNDI name (eis/DB/calvindb).
    Any inputs will be appreciated.
    Thanks,
    Nikhil

  • Weblogic OSB 10.3 DBAdapter merge not working

    I am using the DBAdapter to execute a database insert or update from a Publish Action. When using the merge operation it is not performing an update but instead always performing an insert, therefore I always get a unique constraint error due to the record already being in the table.
    Is there something special I need to do in order to tell the mapping file which fields are the primary key so it recognizes it needs to be an update versus an insert?
    Thanks in advance

    I figured it out, the toplink file had every column specified as the primary key, once I only used the correct keys, it worked just fine.

  • DBAdapter Merge failed

    Hi Experts,
    Does anyone had issue (ORA-00001: unique constraint) while invoking DBAdapter Merge (Insert and Update) to a table
    which having a primary key of combination of 3 fields?
    My table is :
    LOCAL_CURRENCY NOT NULL CHAR(4)
    FOREIGN_CURR NOT NULL CHAR(4)
    DATE_MOD NOT NULL CHAR(8)
    CONV_RATE NOT NULL NUMBER(15,7)
    with PK: LOCAL_CURRENCY, FOREIGN_CURR, DATE_MOD
    The detail of bindFault from BPEL is:
    ORA-00001: unique constraint (TS.SYS_C0013840) violated
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'merge' failed due to: DBWriteInteractionSpec Execute Failed Exception. merge failed.
    This fault happened when i want to update CONV_RATE for a particular record in DB.
    For example, a record in DB (LOCAL_CURRENCY = 'EUR', FOREIGN_CURR ='USD', DATE_MOD= '20110101',CONV_RATE='1.5') is updated to new CONV_RATE='1.6'.
    My environment: SOA Suite 11.1.1.3, DB target Oracle 11g.
    Any hints are most welcome.
    Thanks.
    Ferdy

    I am having a similar problem. Trying to perform a merge on DB2 AS400 from BPEL. The table has a composite key with 6 fields (JD Edwards table):
    SELECT * FROM DEVDTA.F0902 WHERE GBAID = ? AND GBCTRY = ? AND GBFY = ? AND GBFQ = ? AND GBLT = ? AND GBSBL = ?
    When trying to call DB Adapter merge operation for an existing record I get the following error:
    <Mar 23, 2011 2:19:50 PM PDT> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=> [default/integ_F0902!1.0*soa_e5af67e1-0aba-417a-a7d6-3b1295a14cfe.World_F0902_Sync]:merge One-way operation merge() failed>
    <Mar 23, 2011 2:19:50 PM PDT> <Error> <oracle.soa.bpel.engine.ws> <BEA-000000> <got FabricInvocationExceptionjava.sql.BatchUpdateException: [SQL0803] Duplicate key value specified.
    Is this a known limitation, or a bug? This is on SOA BPEL 11.1.1.4.
    Thank you,
    Igor

  • DBAdapter Merge

    Trying to update a table using DBAdapter and Merge operation. The table has besides other columns creation_date and last_update_date. What is the best way to populate the creation_date and last_update_date to sysdate when inserting a row, and only populate last_update_date when updating a row in the database?
    Thanks,

    I'm using database triggers as well, if your acquanted with pl/sql that would be the 1st choice, especially because you can generate the needed triggers for all your audit columns.
    On the other hand you can define annotations in JPA, EJB3.0 now to populate your audit-columns automatically, maybe this can be done as well in the toplink mapping files?
    It should be possible, but I don't now until which level annotations are supported in toplink used by the dbAdapters.
    Kind regads,
    Nathalie

  • Using the match/merge operator

    Hi guys,
    I have created a simple table with 4 columns:
    EMPLOYEES
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    I have placed 5 entries in the table:
    11, jane, doe, 80980980
    12, william, gates,6876876868
    13, john, anderson, 545646546
    14, michelle, millo, 340580334
    15, john, anderson, 545646546
    Row 13 and 15 are duplicates, except for the employee_id. I'm trying to use the match-merge operator to check for matches on emp_firstname, emp_lastname and emp_telephone. I would like to merge the rows matching on firstname, lastname and telephone number, and would like to keep the lowest employee_id as PK.
    I have tried to use the match-merge operator with the following settings;
    Input connections:
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Merge output
    - employee_id
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Xref output
    none
    Match bins:
    - emp_firstname
    - emp_lastname
    - emp_telephone
    Match rules:
    MA_0, all_match
    Merge rules:
    emp_firstname: all match
    emp_lastname: all match
    emp_telephone: all match
    When I debug the match merge operator I get " 4 in, 4 out", but I expected to have "5 in, 4 out". Am I using this match/merge operator the right way?
    thx for you help!
    michiel
    null

    Hi Robert,
    I tried on 3 database installations (all 10.2). there is no parameter DB_BLOCK_BUFFERS set. And i do not assume that there is a reasn for increasing the db_cache_size - means: why i did not get any error for that presumed case?
    btw: can you explain why i should increase db_cache_size?
    thanks,
    Andreas

  • Multiple record upsert - Merge operation problem using DB Adapter

    Hi,
    I am trying to insert/update multiple records using Invoke activity of BPEL and DB Adapter Merge operation.
    I am facing 0036 - Missing expression error. When i try with single record, the operation is working fine.
    Tried setting DB Adapter log level to 32 Finest. Could not find much info in the logs.
    SOA Version - 11.1.1.7

    Hi,
    I believe NVARCHAR is an unsupported type...
    The following document lists the supported data types for SQL Server stored procedures and functions... NVARCHAR is not in the list... :-(
    http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_db.htm#CHDEBEEE
    Hope this helps...
    Cheers,
    Vlad

  • VBA Merge PDFs - Error when first and second PDF are the same

    Using http://khkonsulting.com/2009/03/adobe-acrobat-and-vba-an-introduction/ as a guide, I am able to successfully merge multiple pdf's together into one document using VBA (Access mdb), except when the PDF being merged to has the same name as the next PDF.
    Here's my scenario.  An Access table is updated with a list of reports that need to be printed.  All of these reports are PDF's.  I loop thru this table and merge the PDF's according to an identifier, then print the group.  There are times
    when there are multiple copies of the same report for an identifier.  If the PDF being merged to has the same name of the PDF being merged, an error occurs.  How can I handle this situation?
    Sample data:  This identifier (ESO and Pulling) needs to merge these PDF's (Aaa.PDF) together which happen to have the same name.  Aaa.PDF is trying to merge Aaa.PDF and this throws an error.
    Aaa.PDF ESO  Pulling
    Aaa.PDF ESO  Pulling
    This identifier merges fine despite having the same PDF twice.  But the first PDF is not named the same.  Xxx.PDF is the first PDF and merges the next two into it.  The last two
    are named the same.
    Xxx.PDF  916  Pulling
    Bbb.PDF  916  Pulling
    Bbb.PDF  916  Pulling
    Code:
    pdfDoc1.Open (filesToMerge(1))
    numPages = pdfDoc1.GetNumPages()
    Set pdfDoc2 = CreateObject("AcroExch.PDDoc")
    Dim i As Integer
    For i = 2 To intNbr - 1
    pdfDoc2.Open (filesToMerge(i))
    If pdfDoc1.InsertPages(numPages - 1, pdfDoc2, 0, pdfDoc2.GetNumPages(), True) = False Then
    MsgBox "Cannot insert pages"
    End If
    pdfDoc2.Close
    Next i
    If pdfDoc1.Save(PDSaveFull, "C:\....\ReportPacket__" & Trim(CStr(intReportCount)) & "__" & ... & ".pdf") = False Then
    MsgBox "Cannot save the modified document"
    End If
    pdfDoc1.Close
    The pdfDoc1.InsertPages command fails, displays "Cannot insert pages", then displays "Method 'Close' of object 'CAccroPDDoc' failed.
    Thanks for any help or advice.

    Hi
    As far as I know, Access didn't provide such method. But I think you are able to achieve this goal through some 3rd party PDF component
    Hope this will help you.
    Best Regards
    Lan
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting " Not enough memory for the operation error " in BOE

    Hi,
    We are using BOE 11.0.
    we try to schedule a new report with multiple database logins for testing in BOE. When we run the report we are getting error like "Not enough memory for the operation error"
    The same report has been executed successfully when we run using Crystal reports developer. The report is fectching less than 10K records from all the databases together.
    Please let me know which is causing the issue and also let me know is there any limit in the number of databases connecting for a single report.
    many thanks in advance for all your help.
    Cheers,
    Suri ;-)

    Hi Sarthan,
    Sorry. I'm new to BOE. We know only scheduling the reports creating folders etc. :-)
    I've seen one parameter "Maximum Cache Size Allowed (KBytes)" and the value for this parameter is 5000.
    If we change it to a big number whether we can solve the issue ? Please suggest.
    Cheers,
    Suri ;-)

  • "You do not have enough access privileges for this operation" error message on iTunes startup?

    So I cleaned up my Macbook recently, and now I am fearing that I may have deleted something important.
    Whenever I start up iTunes, I am met with the "You do not have enough access privileges for this operation" error message. I have read forums that advised editing the Get Info page for the iTunes library to allow all users and staff to "Read/Write", but doing this has not eliminated this message.
    Any tracks that were not purchased play normally, but purchased tracks now require additional sign-in that I do not believe was required before. Other than this, iTunes performs normally.
    Did I mess something up permanentliy or is there a way to fix this?

    The problem was that my account wasn't authorized. But when I tried to authorize it, I got an error message saying that the authorization could not be completed. Thankfully, THAT was something that Apple Support had previously addressed.
    See http://support.apple.com/kb/ts1277
    Thanks, Apple.

  • Operations error occured when executing LDAP query to read members of AD group in windows 8 operating system using javascript and active-x

     My code javascript script  is
     objConnection = new ActiveXObject("ADODB.Connection");
     objConnection.Provider="ADsDSOObject";
     objConnection.Open("ADs Provider");
     objCommand = new ActiveXObject("ADODB.Command");
     objCommand.ActiveConnection = objConnection;
       objCommand.CommandText = "SELECT sAMAccountName,displayName, givenName, SN,CN,    mail,distinguishedName,primaryGroupToken,member,ADsPath,MemberOf FROM 'LDAP://"+GrpDomain+".corp.com' WHERE objectCategory='group'
    and objectClass='group' and sAMAccountName='"+GrpName+"'";
    objRecordSet = objCommand.Execute();
    This code executes successfully on window 2008 server machine,
    but gives "Operations error occurred" on windows 8 operating system
    on line of code highlighted above

    Hi,
    In regard to scripts related issue, I suggest you refer to The Official Scripting Guys Forum to get professional support:
    The Official Scripting Guys Forum
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
    Thank you for your understanding and support.
    Best Regards,
    Amy Wang

  • How to perform merge operation using Data services designer?

    I am new here and new to Data Services Desinger as well.
    And currently, I want to do a merge operation using query transform or table comparison transform. But sadly, neither one of them is giving me what I want.
    So, wonder if you could help clarify if either one of them could achieve MERGE operation between and source and target tables?
    if positive, then how?
    PS:
    by MERGE, i mean, if data exists in target table, then only do update, else, do insert. same with the standard MERGE operation of oracle.
    If you need any more info, let me know!
    Thanks in advance.

    You can do this.
    You don't need the Tabe_Comparison transform actually.
    Just query the data you need and output the flow from your query to your target table.
    Then, you'll have to check the "Auto correct load" option: this will insert new lines and updates old ones. One checked, you can ckeck the "Auto correct load" checkbox.
    By default, BODS will know a line already exists based uppon the primary key columns of your target table. If you want to change the columns used to determine if a line should be inserted or updated, use the "Use input key" checkbox (and define some PK column in your query).
    Hope this helps
    Guillaume

  • Trying to install Square to accept credit cards and get KQHTTP Operation Error Error Domain error 442 What is this?

    Trying to install Square to accept credit cards on my ipad.  I get the following message.   KQHTTP Operation Error Domain error 422.   What is this?

    I am having same problem. Did you find a solution?

  • Unable to complete this operation error

    Hi,
    I installed Firefox 4 and when I go to my HP printer properties and click on Printer Services I get "Unable to complete this Operation" error. If I uninstall Firefox it works fine. When I reinstall Firefox I get the same error. Any help would be appreciated because I would like to use Firefox.
    Thanks,
    Phil

    Hi,
    According to the error message, please use performance monitor to diagnose if it is a memory-related bottleneck and you can use the counters of the memory part in the article below:
    https://technet.microsoft.com/en-us/magazine/2008.08.pulse.aspx
    In addition, it may be due to thousands of open connections to the server are in a TIME_WAIT state. You can run "netstat -an" command on the affected server and client. If you see mutiple connections in the TIME_WAIT state, you can follow the article
    to increase the number of TCP/IP connections:
    https://msdn.microsoft.com/en-us/library/ee377084(v=bts.70).aspx
    Furthermore, if you are running windows server 2003, please make sure that you have installed the KB 948496 and stop all services that you don't need.
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

Maybe you are looking for

  • My Wife's iPod is not recognized by itunes

    My wife has a 30GB ipod and all of a sudden when she connects it to her Dell Laptop it is only recognized as a Store Drive but the itunes never recognized it, she is unable to see her ipod on the itunes. I have restored it by pressing the center butt

  • Changing MIDI Port Order is wreaking havoc on my Environment

    Anyone seen this before? I've got a MOTU Midi Express with 4 ins and outs - it's my main interface. I've also got a Novation Remote25SL which works as a control surface/controller with 3 out ports. It requires some special Environment cabling to work

  • N8 email client performance issue

    The email client on the N8 mostly works OK, but the performance is terrible when trying to reply to an email that is "long". Actually there really doesn't have to be that much text in the previous message(s) when the client starts to be really really

  • Mounting an Apple disk image (Intel Mac) under other Unixes/Linux

    Hello, I have started my MacBook in HDD Mode and connected it via Firewire-Cable to my "Main-Server" (Slackware Linux 11.0). From there i created a "Disk-Image" from my MacBooks HDD using "dd" I can mount the disk image within OS X without any proble

  • Problem in Dierct print of Adobe form

    Hi all, My requirement is to print the Adobe form directly.when user execute the particular Z transaction. Then the form should be print. I have given all print parameters to the FM FP_JOB_OPEN.I am using ADS. But i am getting the print when I excute