Parallel function call and thread issue

Sorry to post one issue here which is related to code. i was debugging a code which was wrote long time back by one developer. the issue is two function is called parallel using thread and one function set a variable true at end and another function just
looping until the variable is set to true. the variable value is not getting set to true. here i am posting a code snippet and just tell me what is mistake in the code for which variable is not getting set to true by first function.
when user click button then two function is invoked
private void UPDATE_Click(object sender, System.EventArgs e)
SavedFirst();
AddCheckThread();
public void SavedFirst()
IsOpen = true;
System.Threading.Thread loadT = new System.Threading.Thread(new System.Threading.ThreadStart(SaveAll));
loadT.Start();
IsOpen = false;
private void AddCheckThread()
if (!ALLFlag)
loadingThread = new System.Threading.Thread(new System.Threading.ThreadStart(addCheck));
loadingThread.Priority = System.Threading.ThreadPriority.Lowest;
loadingThread.Start();
private void SaveAll()
if (this.InvokeRequired)
this.Invoke(new MethodInvoker(delegate
ALLFlag = false;
if (!ALLFlag)
loadingThread = new System.Threading.Thread(new System.Threading.ThreadStart(AddProducts));
loadingThread.Priority = System.Threading.ThreadPriority.Lowest;
loadingThread.Start();
return;
private void AddProducts()
if (this.InvokeRequired)
this.Invoke(new MethodInvoker(delegate
ALLFlag = false;
if (System.Windows.Forms.MessageBox.Show(this, "Would you like to add the details into the Database?", "Add?", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
if (comboOUR.SelectedItem == null || comboCountry.SelectedItem == null || comboSelleble.SelectedItem == null || txtOereff.Text == "" || txtUKPrice.Text == "" || txtUSPrice.Text == "" || txtSUrCharge.Text == "" || txtOURUS.Text == "" || txtOURUK.Text == "")
FormValidation();
else
Gather_Data();
bool isInserted = false;
if (System.Windows.Forms.MessageBox.Show(this, "Would you like to add the details into \"Detailed-Product\" Too?", "Add?", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
isInserted = bbaProduct.BBASaveProduct();
if (isInserted == true)
isInserted = false;
isInserted = bbaProduct.InsertInProductTable(BBAProduct.DetailProductID);
if (isInserted == true)
System.Windows.Forms.MessageBox.Show(this, "Product Successfully Added ", "Add");
else
System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database ", "Add");
else
System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database ", "Add");
else
isInserted = bbaProduct.InsertInProductTable(0);
if (isInserted == true)
System.Windows.Forms.MessageBox.Show(this, "Successfully Inserted Into the database", "Add");
else
System.Windows.Forms.MessageBox.Show(this, "Error Occurred !! Not Added Into the Database", "Add");
else
System.Windows.Forms.MessageBox.Show(this, "Process Cancelled By The User", "Add");
ALLFlag = true;
return;
#region Add Check
private void addCheck()
if (this.InvokeRequired)
this.Invoke(new MethodInvoker(delegate
this.Opacity = 0.8;
axShockwaveFlash1.Visible = true;
axShockwaveFlash1.Play();
while (!ALLFlag)
int x = 0;
axShockwaveFlash1.Visible = false;
axShockwaveFlash1.Visible = false;
axShockwaveFlash1.StopPlay();
this.Opacity = 1;
ALLFlag = false;
loadingThread.Abort();
return;
help me to locate where is the mistake for which ALLFlag value is not getting set to true. thanks

Your reliance on a field value across threads isn't going to work reliably.  In a multi-core/multi-threaded world the memory model allows for reading data out of order for optimization reasons.  Additionally the CPU can and will cache recently
used data in memory that isn't shared across processors.  This can get you into trouble as you will not be reading the same value across processors.
The only correct way to ensure that multiple threads access the same data correctly is to use sync objects that are designed for that such as a Semaphore or Mutex.  Sync objects allow you to safely share data across threads.
Overall your code appears to be trying to update the UI using a thread but since it is calling Invoke each time you are basically spawning a thread that then blocks waiting for the UI thread.  You could pretty much eliminate your issues by getting rid
of the threading calls altogether along with any sort of state management variables that were arbitrarily created (ALLflags) and simply use BeginInvoke.  You didn't post who was calling your higher level save methods but if it is a UI element then BeginInvoke
and InvokeRequired are completely redundant as is all the threading.
You can cleanly update this code to eliminate all the extra variables and threading and simply use the newer async/await functionality to help resolve the issues your code is having.  But you still have problems with the invoked code.  In one of
the methods you are looping while waiting for a variable to be set.  But since you invoked it then it is occurring on the UI thread.  Because it is on the UI thread and that can only do 1 thing at a time, if ALLflag is false your code will deadlock. 
The only other code that would set it to true cannot run because it is also invoked on the UI thread and only one of them can run at any one time.  Basically each of your threads are going to try to run on the same thread and only 1 of them will be able
to.  Until the first thread method finishes the second one will never run.
If you need Boolean flags then consider using a ManualResetEvent instead.  It is thread safe, works across threads and doesn't have any of the problems of a Boolean field when talking about threading. But you still have a deadlock between your invoked
code that nothing will solve except rewriting your code.
Michael Taylor
http://blogs.msmvps.com/p3net

Similar Messages

  • Function calling in thread

    I know that every thread has it own stack which is not shared with the other threads.
    Now for example, I have a program like:
    Whenever a user connects to the server a separate thread is created and receive method is called.
    mythread = new thread(this);
    mythread.start();
    public void run()
    receive(3,4);
    public void receive(int a, int b)
    MyClass my = new MyClass();
    my.add(a,b);
    my.sub(a,b);
    //MyClass is in separate file
    public class MyClass
      public void add(int a, int b)
    a+b;
    public void sub(int a, int b)
    a-b;
    }Now my question is that, weather the functions calling i.e, add(), sub(), in receive() method will be thread safe and will be in the same thread's stack they belong ???
    Edited by: Muhammad Umer on May 3, 2011 12:08 PM

    Here is the actual code:
        public boolean startServer()
          boolean isServerStarted = true;
            try
                welcomeSocket = new ServerSocket(6789);
                //System.out.println("Server is started on : "+welcomeSocket.getInetAddress()+"and on port: "+welcomeSocket.getLocalPort());
            catch (IOException ex)
                    isServerStarted = false;
                    System.out.println("could not start server");
                    ex.getMessage();
          while(true)
                try
                    connectionSocket = welcomeSocket.accept(); // connectionSocket is class variable
                    System.out.println("client connected with address: "+connectionSocket.getRemoteSocketAddress());
    //                serverThread = new Thread(this);
    //                serverThread.start();
                   RequestHandler reqhanlder = new RequestHandler(connectionSocket);
                   reqhanlder.start();
                catch (IOException ex)
                    isServerStarted = false;
                    System.out.println("could not start server");
                    ex.getMessage();
        public void receiveData (Socket connectionSocket)
            byte [] certData = null;
            byte [] idData = new byte[13];
            try
                DataInputStream dataFromClient = new DataInputStream(connectionSocket.getInputStream());
                byte[] data =new byte[dataFromClient.available()];
                int read = dataFromClient.read(data);
                System.out.println("Data length is: "+data.length);
                if( read != -1)
                    certData = new byte[data.length - idData.length];
                    System.out.println("cert length is: "+certData.length);
                    System.arraycopy(data, 0, certData, 0, certData.length);
                    System.arraycopy(data, certData.length, idData, 0, idData.length);
                    try
                        this.userCertificate = CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(certData));
                        System.out.println("User certificate coming from card is: \n"+this.userCertificate);
                        System.out.println( caCertificate.getPublicKey() );
                        if( isOpen )
                            verifyCert = new VerifyCertificate();
                            boolean iVerified = verifyCert.verifyCertificate( userCertificate, caCertificate.getPublicKey() );
                            if( iVerified )
                                System.out.println("Certificate is verified");
                            else if( !iVerified )
                                System.out.println("Certificate is not verified");
                        else if( !isOpen)
                            System.out.println("could not set CA public key");
                    catch (CertificateException ex)
                       System.out.println("could not create the certficate");
                       ex.printStackTrace();
                    System.out.println("Data length is: "+data.length+"\nData received is: ");
                else
                    System.out.println("Could not read data, \nData length is: "+data.length);
            catch (IOException ex)
                System.out.println("could not receive data from client");
               ex.getMessage();
    public class RequestHandler extends Thread
        Socket connectionSocket;
        Server server;
        public RequestHandler(Socket connectionSocket)
            this.connectionSocket = connectionSocket;
        @Override
        public void run()
            server = new Server();
            server.receiveData(connectionSocket);
    }

  • SOAP function call and expired passwords

    Hi,
    in the RFC SDK, there is a useful function called RfcRegisterPasswordChanger. With that, it is possible to get notified when the user's password is expired (e.g. when the user first logs on after resetting the pw via SU01). The important thing about this is that it allows the client application to change the password without bringing up the GUI.
    Is there a similar functionality when SOAP is used instead of RFC (through /sap/bc/soap/rfc), e.g. some method to find out whether a password is expired and provide a new one?
    thanks,
    chris

    What version of SAAJ are you using? The methods you cite were added in 1.2 so if you're using an earlier version that would explain the errors.

  • Video calls and videos issue

    after the 5.1 update, i noticed that videos don't rotate when the phone is held horizontally. also i made a video call and when i rotated the phone the screen became unresponsive and kept going on and off unless when i held the phone in a certain angle which i cant figure out, i dont know if this issue has been there the whole time because the first video call i made on the phone (via skype) was after the update. also when i unlock the screen sometimes the colors fade and become lighter, and the screen itself freezes for 2 seconds.

    I see, well if it's due to the update itself you can try to reinstall the 5.1 update with Sony PC Companion and see if the fixes the issue.
    http://support.sonymobile.com/us/tools/pc-companion/

  • Note 4 dropped calls and reception issues

    I am becoming increasingly frustrated with my note 4 to the point of looking at switching to a different phone and even provider. Since getting this phone I have had nothing but issues with inconsistent and unreliable phone coverage. The phone will be in 4G coverage with full bars of service and still cut in and out and drop calls. I cannot even begin to mark the locations for you because it does it everywhere. When I took the phone back to the store I was told it was not an issue with the phone that I must have been un areas with poor coverage. I find this hard to believe when I had no problems with my previous phone. My previous phone was a Samsung Galaxy s4. The only reason I got rid of it was because the charging port stopped working.

    The phone is under a year old and still under warranty. Contact both Samsung and AT&T warranty department and figure out the best way to get a replacement phone. Im hoping Samsung will send you a new phone, ATT sends a refurbished, like new device.

  • Java swing and threading issue

    i am trying to update swing components from some thread. at my first try, i noticed this was a disaster. upon further research, i found out about the single-threaded model of swing events (i.e. event dispatching thread).
    i did more research and could NOT find a good example on how to update swing components from other threads. many examples were showing too much.
    can someone post a simple example on here? i just want to see how to properly update a swing component from a non-swing class using threading.

    I think its a simple example:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=621226
    Let us know what you think.

  • Send image with MFMailComposeVewController and thread issue

    Hi,
    In my app, if user click a button, the app will generate an image and show up a MFMailComposeViewController with the image as attachment. Since it takes quite some time to generate the image, I fired up a thread and generate the image in this new thread. I am not sure what to do the next. When the image is generated, how can I tell the mail thread to launch the MFMailComposeViewController?
    Thanks,
    ff

    Have you looked at this sample yet (link)?

  • How to create RFC function module and how to call this function module

    Hi,
    i want to know step for creating RFC function module and then How to  use this function module from some other sap system.
    Thnaks,
    jigar

    Jigar,
    To implement a remote function module in ABAP, perform the following steps:
    Register the module as remotely callable in the RFC server system.
    In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
    Write the code for the function module.
    Create the destinations.....................
    Displaying, Maintaining and Testing Destinations
    To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
    Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
    It is not possible to maintain the RFCDES table directly.
    You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
    In the Implementation Guide, expand the following hierarchy structure:
    Basis
    Application Link Enabling (ALE)
    Sending and Receiving Systems
    Systems in Network
    Define Target Systems for RFC Calls
    Displaying Destinations
    The initial screen for this transaction displays a tree:
    Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
    To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
    To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
    Creating Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    All available connection types are explained in Types of Destinations.
    To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
    If you want to create a new destination
    As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
    For details of the destination parameters, see Entering Destination Parameters.
    Changing Existing Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    You can display all information for a given destination by double-clicking it or pressing F2 on it.
    To change an existing destination, double-click it, or place the cursor on it and press the Change button.
    For details of the destination parameters, see Entering Destination Parameters.
    Testing Destinations
    To test a destination, choose the appropriate function from the Test menu.
    Connection (also available via the Test connection pushbutton)
    Authorization (checks logon data)
    Local network (provides a list of application servers)
    You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
    CALL FUNCTION RemoteFunction
    DESTINATION Dest
    EXPORTING
    f1 =...
    f2 =...
    IMPORTING
    f3 =...
    TABLES
    t1 =...
    EXCEPTIONS......
    The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
    The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 System’s database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
    Pls. reward if useful

  • Premiere CS5: R6025 - pure virtual function call

    When I go to render the sequence, I get:R6025 - pure virtual function call and the program crashes.
    the problem details are reporting:
    Problem Event Name:    APPCRASH
      Application Name:    Adobe Premiere Pro.exe
      Application Version:    5.0.0.0
      Application Timestamp:    4bb568b7
      Fault Module Name:    Backend.dll
      Fault Module Version:    5.0.0.0
      Fault Module Timestamp:    4bb529dd
      Exception Code:    40000015
      Exception Offset:    00000000001ba7eb
      OS Version:    6.0.6001.2.1.0.256.6
      Locale ID:    1033
      Additional Information 1:    603b
      Additional Information 2:    3ec9d140f10efeb2f0a7d02f968c360a
      Additional Information 3:    a863
      Additional Information 4:    75c6e9df8ab75d63002e907cb106c2fa
    Running Vista 64bit on a Dell T7400 with 12GB ram and Raid HDD's
    Any thoughts?
    Thanks
    Paul

    I'm having the same issue:
    Faulting application name: Adobe Premiere Pro.exe, version: 5.0.1.0, time stamp: 0x4bf119d2
    Faulting module name: Backend.dll, version: 5.0.1.0, time stamp: 0x4bf0dba0
    Exception code: 0x40000015
    Fault offset: 0x00000000001baafb
    Faulting process id: 0x15a8
    Faulting application start time: 0x01cb1b96d983de39
    Faulting application path: C:\Program Files\Adobe\Adobe Premiere Pro CS5\Adobe Premiere Pro.exe
    Faulting module path: C:\Program Files\Adobe\Adobe Premiere Pro CS5\Backend.dll
    Report Id: 6d0f1532-878a-11df-a3c5-81e14690b8b6
    Crashing during rendering.
    I 'm running Windows 7, 64 bit, Dell Covet 6400, Nvida Quadro FX3700M, 4gb ram.
    Issue occurs at the same frame, 802 of 2961 everytime I make at attempt to render.I've also noticed the Premier remains in memory after the crash.
    Has this been reported to Adobe or added to the bus list? If not, any idea how to get it added?
    thanks

  • 2.2.1 update means dropped calls and wifi problems?

    I've noticed some other threads about dropped calls, and 3G issues, but is anyone else getting wifi problems? Seems to not want to detect anything, restart it, and it picks up, but inveitably fails a day or so later...

    I have not experienced any wi-fi connection problems, and I regularly connect to a number of different wi-fi networks.
    I suggest resetting network settings on your iPhone. Go to Settings > General > Reset and select Reset Network Settings.
    This will erase all saved wi-fi networks on your iPhone, which will require re-connecting to all wi-fi networks that you have access to and if any are password protected, this will require re-entering the password for a password protected network.

  • Is there a way to avoid the function call ?

    Given the following test case
    CREATE USER TESTER
      IDENTIFIED BY "tester"
      DEFAULT TABLESPACE USERS
      TEMPORARY TABLESPACE TEMP
    GRANT CONNECT, RESOURCE TO TESTER
    GRANT CREATE TYPE TO TESTER
    GRANT CREATE SESSION TO TESTER
    GRANT CREATE PROCEDURE TO TESTER
    GRANT CREATE TABLE TO TESTER
    GRANT UNLIMITED TABLESPACE TO TESTER
    ALTER USER TESTER QUOTA UNLIMITED ON USERS
    COMMIT
    CONNECT TESTER/tester
    CREATE OR REPLACE TYPE TESTER.PATTERN_LIST AS TABLE OF VARCHAR2(1023 CHAR)
    SHOW ERRORS
    CREATE TABLE TESTER.PARENT_TABLE
       FIELD_ID     NUMBER(10)          NOT NULL,
       FIELD_NAME   VARCHAR2( 255 CHAR) NOT NULL,
       FIELD_PATH   VARCHAR2(1023 CHAR) NOT NULL,
       FIELD_VALUE  VARCHAR2( 255 CHAR)
    CREATE TABLE TESTER.CHILD_TABLE
      FIELD_PATH    VARCHAR2(1023 CHAR) NOT NULL,
      MIN_STR_LEN   NUMBER(10),
      MAX_STR_LEN   NUMBER(10),
      PATTERNS      TESTER.PATTERN_LIST
    NESTED TABLE PATTERNS STORE AS PATTERN_TABLE RETURN AS VALUE
    ALTER TABLE TESTER.PARENT_TABLE ADD (
      CONSTRAINT PARENT_TABLE_PK
    PRIMARY KEY
    (FIELD_ID))
    INSERT ALL
      INTO TESTER.PARENT_TABLE
    VALUES (1, 'FIELD_A', '/A', NULL)
      INTO TESTER.PARENT_TABLE
    VALUES (2, 'FIELD_AB', '/A/B', '20090731')
      INTO TESTER.PARENT_TABLE
    VALUES (3, 'FIELD_AC', '/A/C', '2167')
      INTO TESTER.PARENT_TABLE
    VALUES (4, 'FIELD_AC', '/A/C', '1144')
      INTO TESTER.PARENT_TABLE
    VALUES (5, 'FIELD_AD', '/A/D', 'XS10')
      INTO TESTER.PARENT_TABLE
    VALUES (6, 'FIELD_AB', '/A/B', '20090229')
      INTO TESTER.PARENT_TABLE
    VALUES (7, 'FIELD_AD', '/A/D', 'ART')
      INTO TESTER.PARENT_TABLE
    VALUES (8, 'FIELD_AD', '/A/D', 'TESTED')
      INTO TESTER.CHILD_TABLE
    VALUES ('/A', NULL, NULL, PATTERN_LIST())
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/B',   NULL, NULL, PATTERN_LIST(   '[12][0-9]{3}[0][13578]([0][1-9]|[12][0-9]|[3][01])'
                                                , '[12][0-9]{3}[0][469]([0][1-9]|[12][0-9]|[3][0])'
                                                , '[12][0-9]{3}[1][02][3][1]'
                                                , '[12][0-9]{3}[1][1][3][0]'
                                                , '[12][0-9]{3}[0][2][2][8]'
                                                , '([2][048]|[1][26])([02468][048]|[13579][26])[0][2][2][9]'))
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/C',   NULL, NULL, PATTERN_LIST(  '[0-1][0-9][0-5][0-9]'
                                               , '[2][0-3][0-5][0-9]'))
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/D',   3, 4, PATTERN_LIST('[^0-9]*'))
    SELECT * FROM DUAL
    CREATE OR REPLACE FUNCTION TESTER.MATCH_PATTERN(p_value IN VARCHAR2, p_patterns IN TESTER.PATTERN_LIST) RETURN NUMBER
    AS
    v_count NUMBER := 0;
    BEGIN
       SELECT COUNT(*)
         INTO v_count
         FROM TABLE(p_patterns)
        WHERE REGEXP_SUBSTR(p_value, COLUMN_VALUE) = p_value;
        RETURN v_count;
    END MATCH_PATTERN;
    SHOW ERRORS
    COMMIT
    /the query
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , b.PATTERNS
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a
                      INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )gives me ORA-03113: end-of-file on communication channel
    If on the other hand, I replace the nested single-row SELECT with the function call like this
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , b.PATTERNS
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND (TESTER.MATCH_PATTERN(a.FIELD_VALUE, b.PATTERNS) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a
                      INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )the query gives the correct results which should be
    FIELD_ID    FIELD_PATH    ERRINDEX    FIELD_VALUE
    6           /A/B          4           20090229
    3           /A/C          4           2167
    5           /A/D          4           XS10
    8           /A/D          2           TESTEDIs there a way to do this without the PL/SQL function call and at the same time avoid the ORA-03113 ? Or, have I hit a bug on 11.1.0.7 ?
    Many thanks in advance
    Best Regards
    Philip

    I found the Oracle Bug on my own in the end, in the most unlikely of places !
    The following code
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a, TESTER.CHILD_TABLE b
                WHERE a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )works as intended i.e. like a charm !
    The only difference between the one that gives the ORA-03113 and the above is the way the join is written. The ANSI way (INNER JOIN) fails, the old way (WHERE clause) succeeds.
    I will open a SR with Oracle so that it may be recorded and fixed.
    Best Regards
    Philip

  • Getting status Pending when calling rest function call

    Hi,
    Coldfusion version 10.
    The app hangs using IE9 when I do a REST cf function call from js file. Observing the console, I see Pending status. However, it works fine in later versions of IE, Chrome and Mozilla.
    When I changed cffunction httpmethod from DELETE to PUT it worked. So, I figure that maybe javascript function call and cffunction header mismatch.
    Here is cffunction;
    <cffunction output="no" name="zeroUpdateCredits" access="remote" produces="application/json" consumes="application/json" returnType="struct" httpmethod="DELETE">
    <cfargument name="DATA" type="struct" required="yes"/>
    <cfset var retStatus = StructNew() />
    <cfset retStatus["success"] = true />
    <cftry>
    <cfset var qSponsDetails = APPLICATION.cfc.properties.getsettings(DATA.employee_id)>
    <cfif qSponsDetails.allow_credits>
      <cfset temp = saveCredits(credits = 0, employee_id = DATA.employee_id, effective_date = DATA.effective_date)>
    </cfif>
    <cfcatch type="any">
    <cfthrow errorcode="401" message="error zero credits" />
    <cfreturn>
    </cfcatch>
    </cftry>                  
    <cfreturn retStatus>
    </cffunction>
    Here is the function call:
    exports.clearCredits = function(employeeId, effectiveDate){
    data = {
      employee_id: employeeId,
      effective_date: effectiveDate
    var promise = rest.DELETE({
      url: appConfig.restPrefix + 'selections/unusedcredits?t=' + new Date().getTime(),
        contentType: 'application/json'
      }, JSON.stringify(data)
      return promise;
    Thank you,
    Gena

    Hi,
    Are you sure your Sender SOAP adapter is configured properly. Also ensure that the SIEBEL team is using the right URL to communicate to the SOAP adapter.
    First try using SOAP Client and see if the scenario is working fine. If so then the problem lies in SIEBEL.
    Check this link for confiuring SOAP sender
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Thanks,
    Pakash

  • NiRFSA_Rea​dPowerSpec​trumF64 function call in TestStand 4.5.1 cause system error

    I am using TestStand with niRFSA.dll to call the function niRFSA_ReadPowerSpectrumF64. This function will make the NI RFSA takes a spectrum sweep and return an array of amplitudes, as well as a structure that contains the frequencies information. My teststand sequence file is attached. The sequence editor will execute this function call, and actually retrieve correct data from the RFSA, I can see all the data in the Locals variables. The data are correct. However, the sequence editor also throws out system error, with no further details.
    See the error window also attached.
    Once in a while, the sequence editor will work just fine, executing the same function call without throwing out error, this is less than 10% of the time.
    I am using this on Windows 7.
    Let me know if you have any insight.
    Attachments:
    RFSA Sequence.seq ‏7 KB
    Capture.JPG ‏33 KB

    Hi Doug:
    Yes this is what I suspected also. Since the container type was a TS custom type I created to accept the C struct from the instrument. But when the data come back from the dll is a C struct, and there lays the conflict, I think its the packaging layer semantics have some conflict, even though each of the element in the C struct matches the TS type definitions, as I received all that data correctly in TS.
    Thanks,
    Juswanto

  • HT203175 I have no problem signing on to iTunes my issue is once on the site I can not use the "search". It says there is a runtime error R6025 pure virtual function call. Has anyone had this problem and how do I fix it. Thanks

    I do not have a problem getting in the iTunes stores. My issue is once on the site I can not use the "search". It says there is a pure virtual function call R6025. How can I solve this problem? Do I have to create a new account? Do I have to uninstall and re-install? Thanks

    Thanks so much for your feedback. I really appreciate any input here.
    If someone from Adobe could GUARANTEE that this problem would go away if I
    purchased CS4, I would pony up the cash and do it. However, I'm skeptical
    about that because I just saw someone else post a message on the forum today
    who is running CS4 and getting the exact same runtime error as me.
    I'll try un-installing and re-installing as Admin, and if that doesn't work,
    maybe I can find a used copy of CS3.
    In the meantime, I'm also wondering if a Photoshop file can carry any sort
    of corrupt metadata inside it once it has errored out? Reason I ask is, I
    had to port all of my old PSD files to the new computer, and I only seem to
    be getting this error when I attempt to work on one of the files that
    previously got the runtime error when they were sitting on my XP machine.
    When I create new files from scratch on this new computer, they seem to be
    working just fine (at least, for now).
    If so, I would probably be smart to never open those troublesome
    "errored-out" files again.

  • Calling and executing a function module in the Portal iview development

    Hello Portal development gurus...
        I am very new to portal iview development and am learning a lot of stuff.. I now have a requirement to do the following:
      1. I need to use the NWDS to create java code in developing an iview
      2. I need to call and execute a function module and display the parameters pulled in from the function module onto a Jsp.
    3. I need to create an iview based on this deployed component.
    Could anybody please explain me how to do the coding on this front?
    I appreciate if anybody can share documentation about this kind of a development.
    As always, points galore for useful and helpful suggestions.
    Regards,
    ~~~LB

    Hi,
    Firstly Have you searched in SDN for the same, anyhow please go through the link to work on the requirement
    [/docs/DOC-8061#15|/docs/DOC-8061#15]
    Go through the thread which will talk in detail
    [https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955|https://forums.sdn.sap.com/click.jspa?searchID=19551584&messageID=6348955]
    Hope this helps.
    Cheers-
    Pramod

Maybe you are looking for

  • Having Trouble Saving Itunes

    Okay heres the problem ive been having ever since i updated Itunes with the latest version, Itunes Doesn't seem to be save on my comp. Everytime i tried to open it i have to install it all over again the whole process(agreed to terms, search for mp3'

  • Available for Aqualogic/oracle bpm project

    thanks

  • What is the number at the end of an unsealed MP?

    Hi all; When looking the unsealed versions of sealed Management Packs in the following location, each one has a number at the end of their names, as shown below? %ProgramFiles%\System Center Operations Manager\Agent\Health Service State\Management Pa

  • How to maximize a Form

    How to maximize a Form ? I want to set my Form in full-screen mode. Set_window_property (... MAXIMIZE ) does'nt work... Please Help... Thanks

  • Content Viewer Artwork (for creating client comp)

    Does anyone have, or know where I could find, an art file of the Adobe Content Viewer? What I need to do is show my client a comp of what their branded Content Viewer could look like - with custom icons, etc.  We don't have the Pro service yet, so I