EJBQL delete statment - error

Hi,
I'm trying to execute a simple delete statment:
DELETE FROM SecurityRate sr
WHERE sr.assetId = :assetId
AND sr.relevanceDay = :relevanceDay
AND sr.cDataSourceId = :dataSource
AND sr.cTradingTypeId = :tradingType
AND sr.securityRateId > 0
But all I got it's the next exception:
FINE: DELETE FROM SECURITY_RATE WHERE (((((ASSET_ID = ?) AND (RELEVANCE_DAY = ?)) AND (C_DATA_SOURCE_ID = ?)) AND (C_TRADING_TYPE_ID = ?)) AND (SECURITY_RATE_ID > ?))
     bind => [5100029, 2006-08-30, 3, 24, 0]
27/04/2007 15:37:34 com.evermind.server.ejb.logging.EJBMessages logException
SEVERE: [SecuritySession:public void com.tm.business.securities.SecuritySessionBean.createSecurityRateFromFile(com.tm.persistence.securities.ejb.SecurityRate)] exception occurred during method invocation: javax.ejb.EJBException: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.; nested exception is: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
javax.ejb.EJBException: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.; nested exception is: java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation.
     at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.findInternal(EntityManagerImpl.java:269)
     at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl.find(EntityManagerImpl.java:130)
     at com.evermind.server.ejb.persistence.AbstractEntityManagerProxy.find(AbstractEntityManagerProxy.java:58)
     at com.tm.infra.session.EntityManagerContext.insert(EntityManagerContext.java:182)
     at com.tm.infra.session.EntityManagerWrapper.insert(EntityManagerWrapper.java:142)
     at com.tm.business.securities.SecuritySessionBean.createSecurityRateFromFile(SecuritySessionBean.java:459)
     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:585)
     at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.MethodBasedInterceptor$EJBInvocationCallbackImpl.proceed(MethodBasedInterceptor.java:110)
     at com.tm.infra.session.EntityManagerWrapper.trace(EntityManagerWrapper.java:364)
     at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.evermind.server.ejb.interceptor.MethodBasedInterceptor.invoke(MethodBasedInterceptor.java:47)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
     at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
     at SecuritySession_LocalProxy_d7ebed.createSecurityRateFromFile(Unknown Source)
     at com.tm.infra.files.handlers.File24Handler.handle02Record(File24Handler.java:28)
     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:585)
     at com.tm.infra.files.ejb.FileExtractorSessionBean.handleRecord(FileExtractorSessionBean.java:471)
     at com.tm.infra.files.ejb.FileExtractorSessionBean.extractFile(FileExtractorSessionBean.java:270)
     at com.tm.infra.files.ejb.FileExtractorSessionBean.extractFile(FileExtractorSessionBean.java:81)
     at com.tm.infra.files.ejb.FileExtractorSessionBean.activateFileExtractor(FileExtractorSessionBean.java:748)
     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:585)
     at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.MethodBasedInterceptor$EJBInvocationCallbackImpl.proceed(MethodBasedInterceptor.java:110)
     at com.tm.infra.session.EntityManagerWrapper.trace(EntityManagerWrapper.java:364)
     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:585)
     at com.evermind.server.ejb.interceptor.MethodBasedInterceptor.invoke(MethodBasedInterceptor.java:47)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.TxNeverInterceptor.invoke(TxNeverInterceptor.java:51)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
     at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
     at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
     at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
     at FileExtractorSession_LocalProxy_d7ebed.activateFileExtractor(Unknown Source)
     at com.tm.view.actions.operational.FileUploadActions.extractFile(FileUploadActions.java:39)
     at com.tm.view.backing.operational.FileUpload$FileExtractorThread.run(FileUpload.java:149)
     at java.lang.Thread.run(Thread.java:595)
Any ideas?
Thanks Shachar

You could use it like this:
DELETE FROM forecast f
WHERE (f.lmp, f.dt) IN (SELECT cy.lmp, cy.dt
                                  FROM (SELECT lmp, change_sd, add_months(dt, 12) AS dt FROM forecast WHERE event = 'GROWTH RATE') ny --next year,
                                       (SELECT lmp, change_sd, dt FROM forecast WHERE event = 'GROWTH RATE') cy -- current year
                                 WHERE ny.change_sd = cy.change_sd
                                       AND ny.dt = cy.dt
                                       AND ny.lmp = cy.lmp);Not sure if you just want to delete rows with event = 'GROWTH RATE' or a matching change_sd also, if you do you'll have to add it there to the where.
DELETE FROM forecast f
WHERE (f.lmp, f.dt) IN
(SELECT cy.lmp, cy.dt
   FROM (SELECT lmp, change_sd, add_months(dt, 12) AS dt FROM forecast WHERE event = 'GROWTH RATE') ny --next year,
        (SELECT lmp, change_sd, dt FROM forecast WHERE event = 'GROWTH RATE') cy -- current year
  WHERE ny.change_sd = cy.change_sd
        AND ny.dt = cy.dt
        AND ny.lmp = cy.lmp)
   AND f.event = 'GROWTH RATE';

Similar Messages

  • How to delete the error message in Adapter?

    I got one error record stuck in destination JDBC adapter. Is it possible for me to delete the error record?

    Hi Elliot,
    SXMB_ADM
    Integration Engine Configuration
    Specific Configuration
    Category: DELETION
    Parameters: PERSIST_DURATION, PERSIST_DURATION_ERROR
    Subparameters: SYNC, ASYNC
    Change "Current Value".
    and execute your delete job again!
    Regards,
    Udo

  • My iPad2 Apple logo (the blue box with a capital A) was deleted in error. I would like to know how to replace it or get it back.  Thanks so much . . .

    My iPad2 Apple logo (the blue box with a capital A) was deleted in error. I would like to know how to replace it or get it back.  Thanks so much . . .

    Do you mean the App Store app on your iPad ? If you do then it can't be deleted, but you might have hidden it via Settings > General > Restrictions > Installing Apps 'off' - if that is 'off' then turn it back 'on' and the app should show on one of your iPad's home screens again

  • HT1414 I used to have 'sky at night' app but it got deleted in error, now when I try to download the app I get 'this app is incompatible with this phone' ' this app requires a gyroscope'...why ? whats changed ? how do I resolve the issue ?  thanks CB

    I used to have 'sky at night' app but it got deleted in error, now when I try to download the app I get 'this app is incompatible with this phone' ' this app requires a gyroscope'...why ? whats changed ? how do I resolve the issue ?  thanks CB

    I used to have 'sky at night' app but it got deleted in error, now when I try to download the app I get 'this app is incompatible with this phone' ' this app requires a gyroscope'...why ? whats changed ? how do I resolve the issue ?  thanks CB

  • Adobe Pro delete pages error. One or more pages are in use and could not be deleted.

    Adobe Pro delete pages error. One or more pages are in use and could not be deleted.
    Hi, can anyone assit. I am compiling a pdf by inserting several documents and am unable to delete specific pages. I have used this function on a previous Adobe Pro version but have a problem editing.

    I use this feature once a month to extract / delete some 200 pages from an 800 page file. I found the release notes for 10.1.4 stated that this issue was fixed. I updated my Acrobat to the 10.1.4 release and i was still having the problem. I finally fixed it by disabling the Win XP compatability feature that i had enabled in the properties of the Acrobat executable. I had enabled this feature a couple of months ago as a fix to this specific problem, now it's not necessary.
    Environ: Win 7 32-bit and Acrobat X, 10.1.4.

  • Adobe Reader 9.5.3 error code of 1635.  How can I delet the error?

    I have Adobe Reader 9.5.3 that gives me an error code of 1635.  This error occured after downloading an adobe up-grade and then deleting the up-grade.  Prior to the up-grade printing an other functions wer ok.  How can I delete the error?

    I have found this, that may be helpful:
    Try using the Microsoft Fix it wizard, available at http://support.microsoft.com/kb/971187. The wizard updates the Windows registry so that you can usually uninstall previous versions of the program, or install or update the current version successfully.
    Disclaimer: Adobe does not support third-party software and provides this information as a courtesy only.

  • How to delete standard error message

    Hello,
    We have a requirement to create new charge credit instance ( BO FOPXD_TAXRPENT ). When an instance of New charge credit is created , an instance of the DO FOPXF_EXER is created which in turn creates an instance of DO Coding block item.
    When this instance of coding block is created the BO creates an error message "G/L account missing ". (Message class: /ISCB/CB_CHECK Mesage number:004)
    The call to the DO Coding block is made by the determination class CL_FOP_D_TAXRPENT_CRE_EXRCEXPL of BO FOPXD_TAXRPENT after this error message is added to the message handler the control returns to the above mentioned class.
    As per our requirement, we need to delete this error message from the message handler in the BO FOPXD_TAXRPENT in class CL_FOP_D_TAXRPENT_CRE_EXRCEXPL.
    Please suggest possible ways to access the error message and delete the same from the message handler in this class.
    Thanks,
    Subhankari

    Dear Subhankari,
    I would suggest the following options.
    1. Either you create a overwrite exit for the method in which error message is processed. Write only the code which is required for you in overwrite exit. or
    2. Create Implicit enhancement to clear the ET_MESSAGES internal table or
    Check any of the above options whichever is convenient to you.
    Thanks,
    Bharath.K

  • PRE-DELETE TRIGGER ERROR

    I am debugging a program written by Developer/2000 forms 4.5
    I use 3 to 4 base tables and they all have parent/child relatioship.
    When i try to delete one of them , the error is : pre-delete trigger error.
    any idea ?

    Hi, Lesley
    Beware:
    your form_success test is not working.
    The form_success, form_failure and form_fatal functions should only be used to test the outcome of Forms Built-ins.
    If you want to test the result of DELETE statements, try:
    DELETE FROM TABLE
    WHERE CONDITION;
    IF SQL%FOUND THEN
    MESSAGE('Some rows were deleted');
    ELSE
    MESSAGE('No rows were deleted');
    END IF;You can also use SQL%ROWCOUNT to know how many rows were deleted.
    Hope this helps,

  • Unable to delete the error out record in Pending transactionsinterface form

    Hi Team,
    Help me having this issue....
    "Unable to delete the error out record in Pending transactions interface form".
    Version:11.5.10.2
    Regards,
    Arul

    Can you please give a more elaborate context?
    What application, responsibility and form, how are you trying to delete from the interface table, from front-end or via API?
    Thanks
    JD

  • Master detail form - Cascade Delete gives error

    I am using 3.0.9.8.2 and have made a master detail form which works fine except for cascade delete. Insert and update works well, but I have to delete the child rows first to be able to delete the parent.
    "Cascade Delete Detail Rows on Master Delete" is checked.
    Error situation 1 (where the master just has one child row (number of detail rows to be displayed = 2)):
    When trying master action=delete I get:
    Error: No conversion performed for type INTEGER, value . (WWC-49102)
    This happens whatever is chosen from the detail action drop down list during the attempted delete.
    Error situation 2 (where the master has two child rows (number of detail rows to be displayed = 2)):
    When trying master action=delete I get:
    Error: An unexpected error occurred: ORA-02292: integrity constraint (MILLS_PORTAL.TEX_ACCOUNTS_FK) violated - child record found (WWV-16016)
    This also happens whatever is chosen from the detail action drop down list.

    Sorry to say, but this is a bug which will get fixed in the forth coming releases.
    Till then, there are 2 ways to avoid this problem:-
    1> The change the foreign key in the detail table to have an ON DELETE CASCADE clause.
    2> (Though not desirable, but still as a workaround)- Drop the foreign key constraint from the detail table.

  • How can I delete download error in podcast?

    I tried to download one of podcast. But download could not been processed,then download error. Those downloads are still there.  Can I delete those delete download error?

    From a previous post:
    Turn off your iPhone.
    Open iTunes on your computer.  Click Store > Check for Available Downloads
    Once downloads complete on your computer plug in your iPhone to your computer and sync it with iTunes.

  • Info reocrd set for deletion in error, how to reverse this?

    Hi all -
    There was a info record set for deletion in error usin WSE1 and must be reversed.  Can you guide me in the steps to get this done?
    Thank you

    Paul,
    ME12.  Enter purch org and info record number.  Once you have the info record on the screen in Change mode, Extras > Deletion Flags.  Deselect the checkboxes as appropriate.  Save.
    Best Regards,
    DB49

  • IBASE components deleted in error - How to rectify ?

    Hi,
    I have an issue where some 10,000 IBASE components have been deleted in error.
    I would like the components to be "re-activated" on the same IBASE.
    Will I have to create them again using CRM_IBASE_COMP_CREATE function module ? Will this work ok if I set the validity dates ok ie. after the date of deletion of original record ?
    Kind regards
    Colin.

    No longer required

  • IOS 7 Iphone 5s  how to recover text messages that were deleted in error. MMS IMMS ICoud Backed UP

    Is there any way possible to recover Imessage from the Iphone 5s that was deleted in error?  Does the Icoud back up and save text messages?  I have been looking for hours to no avail.  These messages are very important to me...

    First of all, it is possible to recover iMessage from the iPhone 5s. If you have turned on "iCloud Backup" before, all messages would be synced to the cloud automatically. You can follow the official guide for more details:
    Back up and restore your iPhone, iPad, or iPod touch using iCloud or iTunes - Apple Support
    Or you can restore data from the latest iTunes backup to your iPhone, maybe the texts that you want are there

  • Deleting BDOC Errors

    Hi experts ,
    Please tell me how to delete BDOC error in CRM .
    My Error is Technical Error and BDOC type is BUPA_REL.
    Please mail me urgent.
    Thanks,
    Swapna

    hi swapna, 
         ur prob is solved or not? i am having same prob. but for BUPA_MAIN, do u have any idea....

Maybe you are looking for

  • How can I get the old CS3 pixel aspects into CS5

    Hello, i'm trying to get the old cs3 pixel aspect ratio into cs5. I don't need the hyper-correct- BBC 1.4587 for DV widescreen which leads to black bars left and right if I import HD footage into a SD widescreen timeline. Or if I export a HD timeline

  • Freight Charges are created as Separate Invoice not within the line items

    Hi Folks, I have a peculiar problem here : I will assign the freight cost to the items that are getting shipped during shipping either to the lines or to the delivery, I Ship the line and create autoinvoice master program. Expect that one invoice is

  • File not reached ftp : How to handle the error

    Hi, I am doing idoc-file scenario. I need to place file on ftp server. Now if i give incorrect ftp details, the error canot be seen in SXI_MONITOR but in Adapterframework i can see the error. Can someone please let me know how this exception can be h

  • Does Sun ONE AS has built-in SOAP engine

    Hi, This is Shankar from Chennai (India). Out company provide solution on Sun ONE platform to all our clients. I have installed Apache SOAP on Sun ONE AS and implemented a smalll web service application. I would like to know whether Sun ONE AS comes

  • Difference between Intel Core Duo and Intel Core 2 Duo

    I bought my MBP in November of last year, before the update on the Pros. However, it says about the new Pros that they have Intel Core 2 Duo processors, which are faster than the Intel Core Duos of previous MBPs. I know I bought mine before they upda