Virtual function problem with SC 4.2

Hi
I'm using SC CC 4.2
[CC -V
CC: WorkShop Compilers 4.2 18 Sep 1997 C++ 4.2 patch 104631-04]
not the latest patch, I realize.
The following bit of code:
ProcessParameters *ppp = &(_config.process_params_);
ppp->save_to_file(String("abc"));
config.processparams_.save_to_file(String("xyz"));
does not work as I'd expect it to!
config.processparams_ is of type ProcessParametersEnhanced,
and the definition of this, and its base class, looks like:
class ProcessParameters
public:
virtual int save_to_file(String filename);
and
class ProcessParametersEnhanced : public ProcessParameters
public:
virtual int save_to_file(String filename);
(I've cut everything else out of the class definitions for clarity, and I've changed the names a bit as well, hopefully without typos).
ppp->save_to_file(String("abc"));
calls ProcessParameters::save_to_file(String)
even though ppp points to an instance of ProcessParametersEnhanced, and the function is virtual.
I've tried building a small test application, using the minimum class interfaces, but this works as I'd expect (it also works fine with gcc).
I'm getting deseperate. Is there a bug in SC4.2 whereby it fails to resolve virtual functions correctly?
TIA
Paul Floyd

Oh well, it was an SC4.2 bug
Patch-ID# 104631-07
Keywords: C++ 4.2 SC4.2
Synopsis: SPARCompiler C++ 4.2: C++ 4.2 patch for Solaris 2.x
Date: Jul/17/98
4066271 C++ has a problem with a copy constructor using virtual and multiple inheritance
It seems as though the copy ctor doesn't copy the vtbl.
Cheers
Paul

Similar Messages

  • View with columns based on function - problem with query

    Hi,
    I'm using Oracle 9i;
    I've created a view which has columns based on a table columns (multiple columns from 1 table) and funtion (multiple columns based on 1 function).
    The function takes ID as the first argument and name of the column to determine which value to return as the second one.
    Here is a sample of such function (simplified):
    FUNCTION my_function
    (in_id IN NUMBER, in_col_name IN VARCHAR2)
    RETURN VARCHAR2
    IS
    c_name VARCHAR2(100);
    c_last_name VARCHAR2(100);
    BEGIN
    SELECT T.NAME, T.LAST_NAME
    INTO c_name, c_last_name
    FROM TABLE_1 T, TABLE_2 Z
    WHERE T.PK = Z.FK
    AND Z.ID = in_id;
    IF in_col_name = 'NAME' THEN
    RETURN c_name;
    ELSIF in_col_name = 'LAST_NAME' THEN
    RETURN c_last_name;
    END IF;
    END;
    For simplicty I've restricted the number of columns.
    CREATE OR REPLACE VIEW my_view
    (ID, NAME, LAST_NAME)
    AS
    SELECT
    T.ID ID
    ,CAST(my_function(T.ID,'NAME') AS VARCHAR2(100)) NAME
    ,CAST(my_function(T.ID,'LAST_NAME') AS VARCHAR2(100)) LAST_NAME
    FROM TABLE T;
    There is no problem with query:
    SELECT * FROM my_view;
    The problem arises when I query the view (regardles of '=' or 'LIKE'):
    SELECT * FROM my_view
    WHERE name LIKE '%some_part_of_name%'
    The query returns rows for same names, for same it doesn't. If I put '=' and the whole name the query returns nothing, but when I put 'LIKE' and the first letter it returns rows in some cases.
    I've tried to debug this situation and I've discovered that the function recives ID not in the proper order and not the same amount of times - in explicit:
    for each ID in (1, 2, 3, 4, 5, 6, ... , 100) the function should be called twice for each ID and in the same order, but it does not.
    I get 1, 1, 2, 3, 3, 6, 20, 20 and so on.
    Help needed.
    Greetings.

    The problem is more complicated than the solutions provided here.
    The reason why I'm using the function is this:
    the original view was constructed using multiple union all selects and the speed was terrible. I've created the index on the base table to obtain a proper sort. For retriving all records at once the view works perfectly, but if one wants to query by columns based on function the results are suprisng - sometimes there are, some times there are none, or if you serch with "like" and only a part of string there are results, but with "=" there are no results.
    Here are real DDLs:
    View:
    CREATE OR REPLACE VIEW V_DOK_ARCH
    (ID_ZDAR, TYP, STAN, DATE_CREATED, CREATED_BY,
    DATE_MODIFIED, MODIFIED_BY, SPRA_ID_SPRA, PODM_ID_PODM, PODM_UMOW_ID_UMOW,
    NR_WFS, WFS_NR_INTER, UWAGI_OPER, FUNDUSZ, NUMER,
    DATA_PODPISANIA, RODZAJ, TYP_PRZY, TYP_UBEZ, NAZWISKO,
    IMIE, IMIE_OJCA, NAZWA_FIRMY, NAZWA_FIRMY_SKR, DANE_KLIE)
    AS
    SELECT /*+ INDEX(Z ZDAR_DATE_CREATED_DESC_I) */
    Z.ID_ZDAR ID_ZDAR
    , Z.TYP TYP
    , Z.STAN STAN
    , Z.DATE_CREATED DATE_CREATED
    , Z.CREATED_BY CREATED_BY
    , Z.DATE_MODIFIED DATE_MODIFIED
    , Z.MODIFIED_BY MODIFIED_BY
    , Z.SPRA_ID_SPRA SPRA_ID_SPRA
    , Z.PODM_ID_PODM PODM_ID_PODM
    , Z.PODM_UMOW_ID_UMOW PODM_UMOW_ID_UMOW
    , Z.NR_WFS NR_WFS
    , Z.WFS_NR_INTER WFS_NR_INTER
    , Z.UWAGI_OPER UWAGI_OPER
    , Z.FUNDUSZ FUNDUSZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NUMER') AS VARCHAR2(30)) NUMER
    , F_Rej_Zdar_Date(Z.ID_ZDAR, 'DATA_PODPISANIA') DATA_PODPISANIA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'RODZAJ') AS VARCHAR2(4)) RODZAJ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_PRZY') AS VARCHAR2(4)) TYP_PRZY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'TYP_UBEZ') AS VARCHAR2(3)) TYP_UBEZ
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO') AS VARCHAR2(30)) NAZWISKO
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE') AS VARCHAR2(30)) IMIE
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA') AS VARCHAR2(30)) IMIE_OJCA
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY') AS VARCHAR2(300)) NAZWA_FIRMY
    , CAST(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR') AS VARCHAR2(100)) NAZWA_FIRMY_SKR
    , CAST(LTRIM(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWISKO')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE')||' '||F_Rej_Zdar_Char(Z.ID_ZDAR, 'IMIE_OJCA')||F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY')||DECODE(F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY'),NULL,F_Rej_Zdar_Char(Z.ID_ZDAR, 'NAZWA_FIRMY_SKR'),NULL)) AS VARCHAR2(492)) DANE_KLIE
    FROM T_ZDARZENIA Z
    WHERE F_Rej_Zdar_Char(Z.ID_ZDAR, 'JEST') = 'T';
    and functions:
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Char
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN VARCHAR2
    IS
    c_numer           T_PRZYSTAPIENIA.NUMER%TYPE;--VARCHAR2(30);
    c_rodzaj           T_KLIENCI.RODZAJ%TYPE;--VARCHAR2(1);
    c_typ_przy           T_PRZYSTAPIENIA.TYP_PRZY%TYPE;--VARCHAR2(1);
    c_typ_ubez           T_PRZYSTAPIENIA.TYP_UBEZ%TYPE;--VARCHAR2(3);
    c_nazwisko           T_KLIENCI.NAZWISKO%TYPE;--VARCHAR2(30);
    c_imie                T_KLIENCI.IMIE%TYPE;--VARCHAR2(30);
    c_imie_ojca      T_KLIENCI.IMIE_OJCA%TYPE;--VARCHAR2(30);
    c_nazwa_firmy      T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(300);
    c_nazwa_firmy_skr T_KLIENCI.NAZWA_FIRMY%TYPE;--VARCHAR2(100);
    c_jest                VARCHAR2(1) := 'T';
    c EXCEPTION;
    BEGIN
    --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR);
    BEGIN
    SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
    INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.NUMER, k.RODZAJ,p.TYP_PRZY,p.TYP_UBEZ,k.nazwisko, k.imie, k.imie_ojca, k.nazwa_firmy, k.nazwa_firmy_skr
         INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, I.nazwisko, I.imie, I.imie_ojca, I.NAZWA NAZWA_FIRMY, I.NAZWA_SKR nazwa_firmy_skr
              INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                   INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.NUMER NUMER, DECODE(a.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(a.TYP_AGENTA,'P','R',a.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,a.nazwisko, a.imie, a.imie_ojca, a.nazwa_firmy, a.nazwa_firmy_skr
                        INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                             INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.NUMER_UMOWY NUMER, DECODE(p.TYP_AGENTA,'A','F','P') RODZAJ, DECODE(p.TYP_AGENTA,'P','R',p.TYP_AGENTA) TYP_PRZY,NULL TYP_UBEZ,p.nazwisko, p.imie_pierwsze, p.imie_ojca, p.nazwa_firmy, p.nazwa_firmy_skr
                                  INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.NUMER_UMOWY NUMER, DECODE(k.TYP_PRZYSTAPIENIA,'P','F','P') RODZAJ,k.TYP_PRZYSTAPIENIA TYP_PRZY,'NPO' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, k.nazwa_firmy nazwa_firmy, k.nazwa_firmy_skr nazwa_firmy_skr
                                       INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.NUMER_UMOWY NUMER, 'F' RODZAJ,'-' TYP_PRZY,'OPS' TYP_UBEZ, k.nazwisko, k.imie_pierwsze, k.imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                            INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL NUMER, NULL RODZAJ,NULL TYP_PRZY,NULL TYP_UBEZ, NULL nazwisko, NULL imie_pierwsze, NULL imie_ojca, NULL nazwa_firmy, NULL nazwa_firmy_skr
                                                 INTO c_numer, c_rodzaj, c_typ_przy, c_typ_ubez, c_nazwisko, c_imie, c_imie_ojca, c_nazwa_firmy, c_nazwa_firmy_skr
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           --dbms_output.put_line('id zdar wykonania '||WE_ID_ZDAR||' ostatni wyjatek');
                                                           NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    --raise c;
    IF WE_KOLUMNA = 'NUMER' THEN
    RETURN c_numer;
    ELSIF WE_KOLUMNA = 'RODZAJ' THEN
    RETURN c_rodzaj;
    ELSIF WE_KOLUMNA = 'TYP_PRZY' THEN
    RETURN c_typ_przy;
    ELSIF WE_KOLUMNA = 'TYP_UBEZ' THEN
    RETURN c_typ_ubez;
    ELSIF WE_KOLUMNA = 'NAZWISKO' THEN
    RETURN c_nazwisko;
    ELSIF WE_KOLUMNA = 'IMIE' THEN
    RETURN c_imie;
    ELSIF WE_KOLUMNA = 'IMIE_OJCA' THEN
    RETURN c_imie_ojca;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY' THEN
    RETURN c_nazwa_firmy;
    ELSIF WE_KOLUMNA = 'NAZWA_FIRMY_SKR' THEN
    RETURN c_nazwa_firmy_skr;
    ELSIF WE_KOLUMNA = 'JEST' THEN
    RETURN c_jest;
    END IF;
    END;
    CREATE OR REPLACE FUNCTION F_Rej_Zdar_Date
    (WE_ID_ZDAR IN NUMBER
    ,WE_KOLUMNA IN VARCHAR2
    RETURN DATE
    IS
    d_data DATE;
    BEGIN
    BEGIN
    SELECT p.DATA_PODPISANIA
    INTO d_data
    FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D1, T_PODMIOTY D2
    WHERE p.KLIE_ID_KLIE = k.ID_KLIE
    AND z.PODM_ID_PODM = D1.ID_PODM
    AND D1.KLIE_ID_KLIE = p.KLIE_ID_KLIE
    AND Z.PODM_UMOW_ID_UMOW = D2.ID_PODM
    AND D2.PRZY_ID_PRZY = P.ID_PRZY
    AND z.ID_ZDAR = WE_ID_ZDAR;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         BEGIN
         SELECT p.DATA_PODPISANIA
         INTO d_data
         FROM T_KLIENCI k, T_PRZYSTAPIENIA p, T_ZDARZENIA z, T_PODMIOTY D
         WHERE z.PODM_UMOW_ID_UMOW IS NULL
         AND z.PODM_ID_PODM = D.ID_PODM
         AND D.KLIE_ID_KLIE = k.ID_KLIE
         AND p.KLIE_ID_KLIE = k.ID_KLIE
         AND z.ID_ZDAR = WE_ID_ZDAR;
         EXCEPTION
              WHEN NO_DATA_FOUND THEN
              BEGIN
              SELECT NULL DATA_PODPISANIA
              INTO d_data
              FROM T_ZDARZENIA z, T_INSTYTUCJE I
              WHERE Z.TYP IN ('WFS526','WFS542','WFS553','WFS609','WFS611','WYP_KS','WYP_PO','WYP_SB','DI_ZAT')
              AND z.PODM_UMOW_ID_UMOW IS NULL
              AND Z.PODM_ID_PODM = I.ID_INST
              AND z.ID_ZDAR = WE_ID_ZDAR;
              EXCEPTION
                   WHEN NO_DATA_FOUND THEN
                   BEGIN
                   SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                   INTO d_data
                   FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                   WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                   AND z.PODM_UMOW_ID_UMOW = p.ID_AGUM
                   AND z.ID_ZDAR = WE_ID_ZDAR;
                   EXCEPTION
                        WHEN NO_DATA_FOUND THEN
                        BEGIN
                        SELECT p.DATA_PODPISANIA DATA_PODPISANIA
                        INTO d_data
                        FROM T_AG_AGENCI a, T_AG_UMOWY p, T_ZDARZENIA z
                        WHERE a.ID_AGAG = p.AGAG_ID_AGAG
                        AND z.PODM_ID_PODM = a.ID_AGAG
                        AND z.PODM_UMOW_ID_UMOW IS NULL
                        AND z.ID_ZDAR = WE_ID_ZDAR;
                        EXCEPTION
                             WHEN NO_DATA_FOUND THEN
                             BEGIN
                             SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                             INTO d_data
                             FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                             WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                             AND z.PODM_UMOW_ID_UMOW = p.TECH_ID_AGUMT
                             AND z.ID_ZDAR = WE_ID_ZDAR;
                             EXCEPTION
                                  WHEN NO_DATA_FOUND THEN
                                  BEGIN
                                  SELECT p.DATA_PODPISU_AGENTA DATA_PODPISANIA
                                  INTO d_data
                                  FROM T_AG_KANDYDACI a, T_AG_UMOWY_TAB p, T_ZDARZENIA z
                                  WHERE a.ID_AGKAN = p.TECH_PODM_ID_PODM
                                  AND z.PODM_ID_PODM = a.ID_AGKAN
                                  AND z.PODM_UMOW_ID_UMOW IS NULL
                                  AND z.ID_ZDAR = WE_ID_ZDAR;
                                  EXCEPTION
                                       WHEN NO_DATA_FOUND THEN
                                       BEGIN
                                       SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                       INTO d_data
                                       FROM T_WE_UM_NPO_TAB k, T_ZDARZENIA z
                                       WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                       AND k.TYP_PRZYSTAPIENIA IN ('P','W')
                                       AND z.PODM_ID_PODM IS NULL
                                       AND z.PODM_UMOW_ID_UMOW IS NULL
                                       AND z.ID_ZDAR = WE_ID_ZDAR;
                                       EXCEPTION
                                            WHEN NO_DATA_FOUND THEN
                                            BEGIN
                                            SELECT k.DATA_PODPISANIA_UM DATA_PODPISANIA
                                            INTO d_data
                                            FROM T_WE_UM_OPS_TAB k,T_ZDARZENIA z
                                            WHERE z.ID_ZDAR = k.TECH_ZDAR_ID_ZDAR
                                            AND z.PODM_ID_PODM IS NULL
                                            AND z.PODM_UMOW_ID_UMOW IS NULL
                                            AND z.ID_ZDAR = WE_ID_ZDAR;
                                            EXCEPTION
                                                 WHEN NO_DATA_FOUND THEN
                                                 BEGIN
                                                 SELECT NULL DATA_PODPISANIA
                                                 INTO d_data
                                                 FROM T_ZDARZENIA z
                                                 WHERE z.TYP NOT IN ('UM_OPS','UM_NPO','NPO_OP','UZUP_U')
                                                 AND z.PODM_ID_PODM IS NULL
                                                 AND z.PODM_UMOW_ID_UMOW IS NULL
                                                 AND z.ID_ZDAR = WE_ID_ZDAR;
                                                 EXCEPTION
                                                      WHEN NO_DATA_FOUND THEN
                                                           d_data := NULL;
                                                 END;
                                            END;
                                       END;
                                  END;
                             END;
                        END;
                   END;
              END;
         END;
    END;
    IF WE_KOLUMNA = 'DATA_PODPISANIA' THEN
    RETURN d_data;
    END IF;
    END;

  • Analitic functions (problem with SELECT)

    Hi!
    I've got a problem with analitic functions (I'm newbie in this topic).
    I have a table gpw_notowania which have colums: not_open, not_minimum, not_maximum, not_close, not_volume, not_sp_id and not_date.
    I need to receive from database the information: what is the open, minimum, maximum, close and sum of volume in every week? I have tried the code below but it tells me: ORA-01791 (marking not_date in ORDER clause).
    Help me, please.
    SELECT     distinct
         FIRST_VALUE(not_open)      OVER (partition by to_char(not_date,'WW') ORDER BY not_date)          as open,
         MIN(not_minimum)     OVER (partition by to_char(not_date,'WW') ORDER BY not_date)          as minimum,
         MAX(not_maximum)     OVER (partition by to_char(not_date,'WW') ORDER BY not_date)          as maximum,
         FIRST_VALUE(not_close)     OVER (partition by to_char(not_date,'WW') ORDER BY not_date DESC)     as close,
         sum(not_volume)          OVER (partition by to_char(not_date,'WW'))                    as volume
    FROM     gpw_notowania
    WHERE     not_sp_id = 80
    ORDER BY not_date;

    This is an interesting question.
    create table SortWithDistinct(Val1,Val2,sortKey,SubSortKey) as
    select 1,3,10,1 from dual union all
    select 1,3,10,1 from dual union all
    select 1,3,10,1 from dual union all
    select 2,4,30,2 from dual union all
    select 2,4,30,2 from dual union all
    select 3,5,20,1 from dual union all
    select 3,5,20,1 from dual union all
    select 4,6,10,3 from dual union all
    select 5,5,10,2 from dual union all
    select 5,5,10,2 from dual union all
    select 9,9,10,4 from dual union all
    select 6,4,20,2 from dual union all
    select 6,4,20,2 from dual union all
    select 7,3,30,1 from dual union all
    select 7,3,30,1 from dual;
    select distinct Val1,Val2
      from SortWithDistinct
    order by sortKey,SubSortKey;
    ORA-01791: not a SELECTed expressionIt is one way that we use "group by".
    for instance
    select Val1,Val2
      from SortWithDistinct
    group by Val1,Val2
    order by max(sortKey),max(SubSortKey);
    Val1  Val2
       1     3
       5     5
       4     6
       9     9
       3     5
       6     4
       7     3
       2     4It is one way that we use "Inline View".
    for instance
    select Val1,Val2
    from (select distinct Val1,Val2,sortKey,SubSortKey
    from SortWithDistinct)
    order by sortKey,SubSortKey;
    Furthermore, we may use below alternative solution which uses "dense_Rank".
    select Val1,Val2
    from (select distinct Val1,Val2,
          dense_Rank() over(order by sortKey,SubSortKey) as willSortKey
            from SortWithDistinct)
    order by willSortKey;Because "distinct" works after OLAP.
    for instance
    SQL> select distinct ColA,ColB,Row_Number() over(order by 1) as Rank
      2  from (select 1 as ColA,1 as ColB from dual
      3  union all select 1,1 from dual
      4  union all select 1,1 from dual
      5  union all select 1,1 from dual
      6  union all select 2,2 from dual
      7  union all select 2,2 from dual
      8  union all select 2,2 from dual)
      9  order by 1,2,3;
    ColA  ColB  Rank
       1     1     1
       1     1     2
       1     1     3
       1     1     4
       2     2     5
       2     2     6
       2     2     7my site :-)
    http://www.geocities.jp/oraclesqlpuzzle/1-6.html

  • RAM and Virtual RAM Problems with Fireworks

    I'm working on a Fireworks file with 25 pages and some heavy graphics. However, I've turned some of the heavy objects into symbols which are repeated from page to page.
    The file is 17 Mb and my Virtual Memory bumps to 3.4 Gigs when I open this file and things are slow and often crash. I'm working on a Mac with CS4 and have 4 Gigs of RAM. The actual ram is 2.27 GB. Seems like a crap ton of Ram? Plus it's running slow and crashes regularly.
    Please advise if there are settings I can change to improve the performance.

    I have this same problem.
    We design websites like shops and stuff. We'll need to work out all the pages and show them to our clients.
    I have just finished a site with 45 pages. I have to cut this up in 3 different files. Highly annoying. And working on a windows system to so you get my irritations.
    I get the feeling that this is a result of the buggy-ness in Fireworks. The contact with the Adobe help-team is dramatic. I don't understand that you sell a product this expensive and not give a good service afterwhile.
    I must say that i don't have any problems with the other programs. Only Fireworks. The rest is very good (to end with someting nice)

  • OBIEE: non empty cross join function problem with some reports

    Hi all,
    I am getting some problem ,when we are excuting some requests in OBIEE its taking long time , Actually our OBIEE is connected with Essbase when we are generating some reports its taking long time so i captured the Query in OBIEE and Iam excuting that query in Essbase MDX editor
    its having the the function " NON EMPTy CROSS JOIN"
    which reports having non empty crossjoin function its taking long time so how can i disable this function in OBIEEfor that reports
    I dont want to use that function for my reports so how can i do this in OBIEE
    your help would be appriciated.
    Thanks
    Edited by: user8815661 on 26 mai 2010 08:44

    Any Help

  • Date function problems with dates from core not recognized as dates

    Our core provides dates in two formats: YYYYDDD and MMDDYY (YYYYDDD for today [2/21/12] would be 2012052).  We have determined that Crystal Reports is not viewing them as dates, but rather numbers. If querying on just a specific date, no problem. But if I want to use a date function like DayOfWeek, then things don't work.
    I need a report to always provide yesterday's data - except on Monday, where it needs to look back at Friday.
    I tried a criteria of:
    if DayOfWeek(CurrentDate) = 1 then {DDMAST.DATOP7} = CurrentDate - 2 else
    if DayOfWeek(CurrentDate) = 2 then {DDMAST.DATOP7} = CurrentDate - 3 else
    {DDMAST.DATOP7} = CurrentDate -1
    {DDMAST.DATOP7} is the date field from our core.
    I tried this but got an error message of "A Number is Required Here" and it highlights the CurrentDate - 2.
    Since we believe that Crystal Report is not viewing our dates as dates - but viewing them as numbers, what do I need to do to correct this?  Someone suggested I'd need to extract each date portion (month, date, and year) and create variables to "build" a date that Crystal Reports would understand.  Any suggestions?

    Hi, 
    You're correct.  There appears to be two branches in this thread. 
    To address your issue, Crystal only recognizes actual date types, ie. Months, Days and Years.  Your serial date isn't a recognized date type so we have to: 
    1)  Determine which format your date field is
    2)  Convert your number to a date using the appropriate formatting. 
    I am assuming your dates will either be 6 (MMddyy) or 7 (yyyyddd) characters long.  If there are other patterns you'll need to determine that. 
    The problem I found is what does your date for today (March 6, 2012) look like in MMddyy format? 
    Any month before October would never have a leading 0 if your date is stored as a number.  So you should take that into account as well using my logic. 
    I added that into the logic by checking for a length of 5. 
    NumberVar Full := 030612;
    StringVar myDate;
    myDate := ToText (Full, 0, "", "");
    Select Length (myDate)
        Case 5: Date (2000 + ToNumber (myDate [4 to 5]), ToNumber (myDate [1]), ToNumber (myDate [2 to 3]))
        Case 6: Date (2000 + ToNumber (myDate [5 to 6]), ToNumber (myDate [1 to 2]), ToNumber (myDate [3 to 4]))
        Case 7: Date (ToNumber (myDate[1 to 4]), 1, 1) + (ToNumber (myDate [5 to 7]) - 1)
        Default: Date (0, 0, 0);
    If you edit the first line and change it to: 
    NumberVar Full := 2012066;
    You will also get today's date.

  • Problem with CSS styles and Previewing in Firefox

    Hello,
    I recently rebooted my Mac OS X system (leopard) and reinstalled Adobe CS3. Before this I had virtually no problems with Dreamweaver and everything was running smoothly. However, now whenever I preview my pages in Safari, the CSS code is completely mangled.
    Also, my site won't preview in Firefox unless I close any existing tabs and exit Firefox completely. I have no idea why these problems are occurring, but I have pasted the code below so any advice would be extemely helpful.
    ---------------------------------html----------------------------------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv= "Content-Type" content="text/html; charset= UTF-8" />
    <title>armed and harmless</title>
    <link href="untitled.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="wrapper">
        <div id="nav">
        </div>
    </div>
    </body>
    </html>
    -----------------------------------css-----------------------------------
    @charset "UTF-8";
        background-color: #000000;
        background-image: url(images/header.jpg);
        background-repeat: no-repeat;
        margin: 0px;
    #wrapper {
        height: 800px;
        width: 1000px;
        margin-top: 0px;
        margin-right: auto;
        margin-left: auto;
        background-color: transparent;
        background-image: none;
    #wrapper #nav {
        background-color: transparent;
        background-image: none;
        height: 30px;
        width: 1000px;
        margin-top: 260px;
        clear: both;
        border-top-width: 1px;
        border-bottom-width: 1px;
        border-top-style: solid;
        border-bottom-style: solid;
        border-top-color: #FFFFFF;
        border-bottom-color: #FFFFFF;

    hey there,
    thanks so much for the insight on the firefox issue. hopefully they fix that soon.
    as for the css, i do have a screenshot of what's happening. the background image seems to repeat after the navigation bar instead of keeping the transparent background. it's extremely odd and i've never seen it before. it can be seen in the attached photo.
    thanks again for your help,
    -e

  • Error "pure virtual function call"

    Hi,
    Windows7, PCI-GPIB, NI-488.2 Version 3.1.1, Visual Studio 2010 C++ Application.
    Randomly between 10 minuntes and 4 hours I get the error "pure virtual function call"
    With the debbuger attached to the process in error I identified NI4882.dll as the source of the error.
    Then I deinstalled NI-488.2 Version 3.1.1 and installed NI488.2 July 2000. Then my application runs without any error!
    I tried to attach the source files which represents the interface between my application and the NI-4882 driver but it did not work for the C++ file.
    Any help appreciated.
    Best Regards
    Walter
    Attachments:
    _GPIB.h ‏4 KB

    Part 2:
    Int TGpib::Open (UShort adr, ULong timeoutMs)
    if (mDevices.empty ())
    Reset ();
    Int ud = ibdev (mBoardID, adr, 0, TimeoutCode (timeoutMs), 1, 0);
    if (ud < 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("open device '%d' failed"), adr);
    GPIBError (-1, FCTX, true);
    return -1;
    SDevInfo devInf;
    devInf.mGpibAdr = adr;
    mDevices[ud] = devInf;
    if (!DeviceClear (ud))
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    if (Send (ud, "*IDN?"))
    Tstring s = String2Tstring (Enter (ud));
    StringList l = Split (s, _T(','));
    if (l.size () == 4)
    mDevices[ud].mVendorName = l[0];
    mDevices[ud].mModelName = l[1];
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("no device on address '%d'"), adr);
    GPIBError (ud, FCTX, true);
    Close (ud);
    return -1;
    Local (ud);
    return ud;
    bool TGpib::Close (Int ud)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    Local (ud);
    Int stat = ibonl (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("close device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices.erase (it);
    return true;
    return false;
    bool TGpib::SetTimeout (Int ud, ULong timeoutMs)
    Int stat = ibtmo (ud, TimeoutCode (timeoutMs));
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("set timeout device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    ULong TGpib::Timeout ()
    return mTimeout;
    bool TGpib::EnableSRQ (Int ud, HANDLE srqEvent)
    if (srqEvent != INVALID_HANDLE_VALUE)
    GPIBDevMap::iterator it = mDevices.find (ud);
    if (it != mDevices.end ())
    (it->second).mSRQEvent = srqEvent;
    Int stat = ibnotify (mBoardID, SRQI, GpibSRQ, (void*)this);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    MCTraceLib (this, eTraceDebug, TFCTX, _T("(SRQ)on device ud = '%d' success"), ud);
    return true;
    else
    MCTraceLib (this, eTraceError, TFCTX, _T("srqEvent == INVALID_HANDLE_VALUE"));
    return false;
    bool TGpib::DisableSRQ (Int /*ud*/)
    return true;
    bool TGpib::Remote (Int ud)
    Int adr;
    ibask (ud, IbaPAD, &adr);
    adr += 32; // Talk Address = Listen Address + 32
    char cmdbuf[] = {MTA0, 0, LLO, UNT, UNL};
    cmdbuf[1] = char(adr);
    Int stat = ibcmd (mBoardID, &cmdbuf, 5);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    mDevices[ud].mRemote = true;
    return true;
    bool TGpib::Local (Int ud)
    mDevices[ud].mRemote = false;
    Int stat = ibloc (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    char TGpib::SerialPoll (Int ud)
    char pollChr;
    Int stat = ibrsp (ud, &pollChr);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return static_cast<char> (pollChr & 0x9F); // VM QueryError eliminieren
    bool TGpib::DeviceClear (Int ud)
    Int stat = ibclr (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX, true);
    return false;
    return true;
    bool TGpib::Trigger (Int ud)
    Int stat = ibtrg (ud);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    return true;
    bool TGpib::Send (Int ud, const std::string& str)
    Int stat = ibeot (ud, 1);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI on' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    bool TGpib::SendNoEOI (Int ud, const std::string& str)
    Int stat = ibeot (ud, 0);
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("'EOI off' on ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    stat = ibwrt (ud, (void*)str.c_str (), str.length ());
    Long sent = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    return false;
    if (sent != static_cast<Long> (str.length ()))
    MCTraceLib (this, eTraceError, TFCTX, _T("only %d of %d characters sent"), sent, str.length ());
    return false;
    return true;
    std::string TGpib::Enter (Int ud)
    std::string str = "";
    char* buf = new char[2048];
    Int stat = ibrd (ud, (void*)buf, 2047);
    Long got = ThreadIbcntl ();
    if ((stat & ERR) != 0)
    MCTraceLib (this, eTraceError, TFCTX, _T("on device ud = '%d' failed"), ud);
    GPIBError (ud, FCTX);
    else
    buf[got] = '\0';
    str = buf;
    // eventuelle LF und CR vom Ende entfernen!
    string::size_type idx = str.find_last_of (k_CR);
    str = str.substr (0, idx);
    idx = str.find_last_of (k_LF);
    str = str.substr (0, idx);
    delete[] buf;
    return str;

  • Problems with MIDI, Sound, Etc.

    Hi all,
    Well, I have grown up on Macs and my dad has brought home everything from the Plus to the IIci to the Classic Colour when I was a kid 20 years go. Circumstances have forced me to move to PC, and I even had one in my home studio, but I recently had the chance to upgrade and was absolutely thrilled at the prospect of getting back into the Mac world after more than 10 years of absence. So, I got myself a Mac Mini 2.53 GHz (I only upgraded the hard drive to a 500 GB 7200-RPM model, as is common in the audio world), with a Focusrite Saffire 24 Pro DSP Firewire audio interface.
    Well, I am saddened to say that so far, I have been BITTERLY disappointed. Problems :
    1. This Mac is NOISY!!! I don't mean physical computer/fan/etc. noise. I mean static noise going through the interface. The interface is dead-silent during bootup until, at some point in the sequence (when looking at the Apple logo during bootup), the same static hiss and hum comes back that's been plaguing me for a few days. This noise seems to be matching my activities - it changes when I scroll, when I open a program, etc., for example. So, this is DEFINITELY sub-par;
    2. Snow Leopard simply refuses to acknowledge my Roland XV-5050's existence on USB. Ableton Live can find it in its list of "destinations" for MIDI data, but Audio Midi Setup simply refuses to even see it, precluding me from using Roland's very handy Editor. Again, unacceptable, given that I've never had this problem with PCs (although, Roland expressly does not support Vista with the XV-5050 USB drivers);
    3. There's something weird about the Mac (could also be Live, I suppose, but I never had this problem on PC) where my music applications do not see the Korg Legacy Cell VSTs that are installed, even though they are in the same folder as, say, Sylenth, which Live DOES see. (And they all end in .vst extensions.) What gives?
    I think that's it so far. I've got a very important gig coming up around Christmas time that I have to start getting ready for. I had anticipated virtually zero problems with the Mac, which is why I chose to upgrade, but the reality is definitely otherwise. Please, PLEASE don't make me buy the Dell Studio or something!!
    Thanks in advance for all the help!
    JS

    Korg Legacy and the XV are not critical to my workflow, just items I had invested on I would like to keep. I did not research compatibility with Snow Leopard vwery thoroughly for those two, but I certainly did with the interface, which IS critical. Focusrite has released brand-new drivers that are supposed to be compatible with Snow Leopard, as they loudly trumpet on their web site.
    And by and large, they do work - there's just that incessant noise. And THAT's an issue, and somehow I doubt it has to do with the interface as, like I mentioned, the noise only appears during the bootup sequence when, I assume, the Firewire drivers are loaded.
    Inputs?

  • Problem with variable name in ZXRSRTOP include (virtual KF)

    Hi all,
    I am coding a routine to use a virtual key figure in the BEx.
    I have just a little problem with the name of a variable:
    as explained in the documentation, I created the variable with the prefix G_POS_, the name of the infocube and the name of the infoobject all together:
    DATA: G_POS_BC_ST_003_C_DIV__C_COMPAR   type i.
    The problem is that this variable name is longer than 30 characters, so the system doesn't accept it.
    Is there a workaround, other than changing the name of the infoobject (which is a navigational attribute)?
    Any help would be appreciated.
    Loï

    Hello Marc,
    I understand that I have to use a concatenate function and a dynamic call of the variable with (variable) instruction, but i do not understand how to implement it.
    the infocube name is BC_ST_003
    the characterisdtic name is C_DIV__COMPAR
    So, in the include ZXRSRTOP the statement
    DATA : G_POS_BC_ST_003_C_DIV__COMPAR
    does not work due a length problem (see first post)
    But in the same include the statement
    +DATA: l_global_name type c.
    concatenate 'GPOS' 'BC_ST_003' 'C_DIV__C_COMPAR' into l_global_name separated by '_'.+
    drives to the following error : statement is not accessible.
    Could u please provide me with an example of the code in the include ZXRSRTOP, and in the include ZXRSRZZZ for the use of this variable.
    Thanks in advance.
    Loï

  • Application Class Loader problem calling virtual function

    Hello everyone
    I have run in to very strange behavior of JVM
    I have created a class loader which allows my to load classes from
    jar file, regardless that URLClassLoader supplies this functionality.
    I am using this class loader to load some classes and call their virtual functions. The class diagram looks like that:
    public interface I {
       public void init();
    public class AAA implements
       public void init(){
    public class BBB extends AAA{
       public void init(){
          //here comes implementation
    }Interface I and class AAA are loaded with System Class loader and Class BBB is loaded using my class loader from jar file.
    ByteStreamClassLoader  classLoader =  new ByteStreamClassLoader  ();
    Class cl = classLoader. loadClass(�com.product.BBB�,true);
    I myInterface = cl.newInstance();
    myInterface.init();The problem is that from some unknown reason java class AAA.init() instead of BBB.init().
    Can somebody help me what am I doing wrong?
    Class Loader code attached below
      public class ByteStreamClassLoader   extends ClassLoader {
        protected HashMap m_cache = new HashMap();
        public void clearCashe() {
          m_cache = new HashMap();
        private String definePackage(String className) {
          StringBuilder strB = new StringBuilder();
          //Class name must be removed from the URI in order to define a package
          String[] packageArray = className.split("\\.");
          for (int i = 0; i < packageArray.length - 1; i++) {
            strB.append(packageArray).append(".");
    String packageName = strB.toString();
    packageName = packageName.substring(0, packageName.length() - 1);
    if (getPackage(packageName) == null) {
    m_logger.log(Level.FINEST, "Defining package '" + packageName + "'");
    definePackage(packageName, null, null, null, null, null, null, null);
    return packageName;
    public synchronized Class loadClass(String name, boolean resolve) throws
    ClassNotFoundException {
    name = name.replaceAll("/", ".").replaceAll(".class", "");
    //Try to locate the Class in cashe
    Class c = (Class) m_cache.get(name);
    //Try to locate the Class in the System Class Loader
    if (c == null) {
    try {
    c = ClassLoader.getSystemClassLoader().loadClass(name);
    catch (Exception ex) {}
    else {
    m_logger.log(Level.FINEST, "Class '" + name + "' found in cache");
    //Load the class from byte array
    if (c == null) {
    String resourceName = name;
    if (!resourceName.endsWith(".class")) {
    resourceName = resourceName.concat(".class");
    //Retrieve class byte representation
    if (resourceName.indexOf(".") != -1) {
    resourceName =
    resourceName.replaceAll("\\.", "/").replaceAll("/class", ".class");
    //Use the ByteStreamClassLoader to load the class from byte array
    byte[] classByteArray = null;
    try {
    classByteArray = getResourceBytes(resourceName);
    catch (IOException ex1) {
    throw new ClassNotFoundException(
    "Could not load class data." + ex1.getMessage());
    m_logger.log(
    Level.FINEST, "Loading class '" +
    name + "' Byte Length: " + classByteArray.length);
    String p = definePackage(name);
    c = defineClass(
    name,
    classByteArray,
    0,
    classByteArray.length,
    ByteStreamClassLoader.class.getProtectionDomain());
    m_cache.put(name, c);
    if (resolve) {
    resolveClass(c);
    return c;

    Hello everyone
    I have run in to very strange behavior of JVM
    I have created a class loader which allows my to load classes from
    jar file, regardless that URLClassLoader supplies this functionality.
    I am using this class loader to load some classes and call their virtual functions. The class diagram looks like that:
    public interface I {
       public void init();
    public class AAA implements
       public void init(){
    public class BBB extends AAA{
       public void init(){
          //here comes implementation
    }Interface I and class AAA are loaded with System Class loader and Class BBB is loaded using my class loader from jar file.
    ByteStreamClassLoader  classLoader =  new ByteStreamClassLoader  ();
    Class cl = classLoader. loadClass(�com.product.BBB�,true);
    I myInterface = cl.newInstance();
    myInterface.init();The problem is that from some unknown reason java class AAA.init() instead of BBB.init().
    Can somebody help me what am I doing wrong?
    Class Loader code attached below
      public class ByteStreamClassLoader   extends ClassLoader {
        protected HashMap m_cache = new HashMap();
        public void clearCashe() {
          m_cache = new HashMap();
        private String definePackage(String className) {
          StringBuilder strB = new StringBuilder();
          //Class name must be removed from the URI in order to define a package
          String[] packageArray = className.split("\\.");
          for (int i = 0; i < packageArray.length - 1; i++) {
            strB.append(packageArray).append(".");
    String packageName = strB.toString();
    packageName = packageName.substring(0, packageName.length() - 1);
    if (getPackage(packageName) == null) {
    m_logger.log(Level.FINEST, "Defining package '" + packageName + "'");
    definePackage(packageName, null, null, null, null, null, null, null);
    return packageName;
    public synchronized Class loadClass(String name, boolean resolve) throws
    ClassNotFoundException {
    name = name.replaceAll("/", ".").replaceAll(".class", "");
    //Try to locate the Class in cashe
    Class c = (Class) m_cache.get(name);
    //Try to locate the Class in the System Class Loader
    if (c == null) {
    try {
    c = ClassLoader.getSystemClassLoader().loadClass(name);
    catch (Exception ex) {}
    else {
    m_logger.log(Level.FINEST, "Class '" + name + "' found in cache");
    //Load the class from byte array
    if (c == null) {
    String resourceName = name;
    if (!resourceName.endsWith(".class")) {
    resourceName = resourceName.concat(".class");
    //Retrieve class byte representation
    if (resourceName.indexOf(".") != -1) {
    resourceName =
    resourceName.replaceAll("\\.", "/").replaceAll("/class", ".class");
    //Use the ByteStreamClassLoader to load the class from byte array
    byte[] classByteArray = null;
    try {
    classByteArray = getResourceBytes(resourceName);
    catch (IOException ex1) {
    throw new ClassNotFoundException(
    "Could not load class data." + ex1.getMessage());
    m_logger.log(
    Level.FINEST, "Loading class '" +
    name + "' Byte Length: " + classByteArray.length);
    String p = definePackage(name);
    c = defineClass(
    name,
    classByteArray,
    0,
    classByteArray.length,
    ByteStreamClassLoader.class.getProtectionDomain());
    m_cache.put(name, c);
    if (resolve) {
    resolveClass(c);
    return c;

  • Problems calling virtual functions

    Hi,
         We have code running in a shared library that appears to be incorrectly changing registers that contain function parameters before the called (virtual) function acceses the registers containing its parameters.
    Has anyone seen a similar problem ? If so does
    anyone knaw what the solution is ?
    Compiler:
    SunAMD:tbucken@win64bld 247>>> CC -V
    CC: Sun C++ 5.7 2005/01/07
    SunAMD:tbucken@win64bld 248>>> uname -a
    SunOS win64bld 5.10 Generic i86pc i386 i86pc
    solaris is running on an HP DL585 (4 cpu's)
    calling function code (We are setting up a vitual function call):
         tempdatabase->CostModel->GetCompareSelectivity
         (_lhs_base, rhsbase, rhsconverted, op, &sel_est,
         &_value_distrib );
    / Line 922
         movq     -144(%rbp), %r8
         movq     352(%r8), %r8
         movq     0(%r8), %r14
         movq     -144(%rbp), %r13
         movq     -8(%rbp), %r12
         movq     -8(%rbp), %r11
         movq     -8(%rbp), %r10
         movq     -8(%rbp), %r8
         movzbl     120(%r8), %eax
         movq     -8(%rbp), %r9
         movq     -8(%rbp), %r8
         leaq     192(%r8), %r8
         movq     %r8, 0(%rsp)
         leaq     40(%r9), %r9
         movl     %eax, %r8d
         movq     168(%r10), %rcx
         movq     152(%r11), %rdx
         movq     144(%r12), %rsi
         movq     352(%r13), %rdi
         movq     48(%r14), %r10
         movl     $0, %eax
         call     *%r10
    the function called:
    p_expr is a pointer:
    a_relation is an unsigned char
    The last 2 arguments are pointers.
    void CostModel::GetCompareSelectivity(
    p_expr                colexpr,
                        p_expr                expr2,
                        p_expr                expr2_converted,
                        a_relation           reln,
                        SelectivityEstimate      *est,
                        IHistogram          **hist )
    My uderstading of register usage during a function call on opteron (from
    http://www.x86-64.org/documentation/abi-0.96.pdf)
    %rdi - first argument - this pointer
    %rsi - second argument - colexpr
    %rdx - third argument - expr2
    %rcx - fourth argument - expr2_converted
    %r8 - fifth argument - reln
    %r9 - sixth argument - est
         %rcx and %r8 are being setup correctly by the calling function but they are changed by the code that is executed by the call psudo-op that
    calculates that virtual function address.
    setting up the function call
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at line 922 in file "dfp_compares.cpp"
    922 tempdatabase->CostModel->GetCompareSelectivity
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcbd
    0xfffffd7ffe85dcbd: ComputeSelectivity+0x038d: movq 0x0000000000000160(%r8),%r8
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcc4
    0xfffffd7ffe85dcc4: ComputeSelectivity+0x0394: movq 0x0000000000000000(%r8),%r14
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcc8
    0xfffffd7ffe85dcc8: ComputeSelectivity+0x0398: movq 0xffffffffffffff70(%rbp),%r13
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dccf
    0xfffffd7ffe85dccf: ComputeSelectivity+0x039f: movq 0xfffffffffffffff8(%rbp),%r12
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcd3
    0xfffffd7ffe85dcd3: ComputeSelectivity+0x03a3: movq 0xfffffffffffffff8(%rbp),%r11
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcd7
    0xfffffd7ffe85dcd7: ComputeSelectivity+0x03a7: movq 0xfffffffffffffff8(%rbp),%r10
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcdb
    0xfffffd7ffe85dcdb: ComputeSelectivity+0x03ab: movq 0xfffffffffffffff8(%rbp),%r8
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcdf
    0xfffffd7ffe85dcdf: ComputeSelectivity+0x03af: movzbl 0x0000000000000078(%r8),%eax
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dce4
    0xfffffd7ffe85dce4: ComputeSelectivity+0x03b4: movq 0xfffffffffffffff8(%rbp),%r9
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dce8
    0xfffffd7ffe85dce8: ComputeSelectivity+0x03b8: movq 0xfffffffffffffff8(%rbp),%r8
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcec
    0xfffffd7ffe85dcec: ComputeSelectivity+0x03bc: leaq 0x00000000000000c0(%r8),%r8
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcf3
    0xfffffd7ffe85dcf3: ComputeSelectivity+0x03c3: movq %r8,0x0000000000000000(%rsp)
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcf8
    0xfffffd7ffe85dcf8: ComputeSelectivity+0x03c8: leaq 0x0000000000000028(%r9),%r9
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcfc
    0xfffffd7ffe85dcfc: ComputeSelectivity+0x03cc: movl %eax,%r8d
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dcff
    0xfffffd7ffe85dcff: ComputeSelectivity+0x03cf: movq 0x00000000000000a8(%r10),%rcx
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd06
    0xfffffd7ffe85dd06: ComputeSelectivity+0x03d6: movq 0x0000000000000098(%r11),%rdx
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd0d
    0xfffffd7ffe85dd0d: ComputeSelectivity+0x03dd: movq 0x0000000000000090(%r12),%rsi
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd15
    0xfffffd7ffe85dd15: ComputeSelectivity+0x03e5: movq 0x0000000000000160(%r13),%rdi
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd1c
    0xfffffd7ffe85dd1c: ComputeSelectivity+0x03ec: movq 0x0000000000000030(%r14),%r10
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd20
    0xfffffd7ffe85dd20: ComputeSelectivity+0x03f0: movl $0x0000000000000000,%eax
    t@7 stepi
    t@7 (l@7) stopped in dfp_Compares::ComputeSelectivity at 0xfffffd7ffe85dd25
    0xfffffd7ffe85dd25: ComputeSelectivity+0x03f5: call *%r10d
    t@7 regs
    current frame: [1]
    r15 0x0000000000000000
    r14 0xfffffd7ffee61d60
    r13 0xfffffd7fed3f3890
    r12 0xfffffd7fed4573c0
    r11 0xfffffd7fed4573c0
    r10 0xfffffd7ffeaa3b20
    r9 0xfffffd7fed4573e8
    r8 0x0000000000000002
    rdi 0xfffffd7fed3ff1a8
    rsi 0x0000000000000000
    rbp 0xfffffd7ffdbfa730
    rbx 0xfffffd7ffdee1400
    rdx 0x0000000000000000
    rcx 0x0000000000000000
    rax 0x0000000000000000
    trapno 0x0000000000000001
    err 0x0000000000000000
    rip 0xfffffd7ffe85dd25:ComputeSelectivity+0x3f5 call *%r10d
    cs 0x000000000000004b
    eflags 0x0000000000000286
    rsp 0xfffffd7ffdbfa600
    ss 0x0000000000000043
    fs 0x00000000000001bb
    gs 0x0000000000000000
    es 0x0000000000000000
    ds 0x0000000000000000
    fsbase 0xfffffd7ffdee1400
    gsbase 0xffffffff80000000
    t@7
    %rcx contains 0 which is the correct value for expr2_converted
    %r8 contains 2 which is the correct value for reln
    step through the code generated by the call psudo-op
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b20
    0xfffffd7ffeaa3b20: __SLIP.THUNK__E : pushq %rbp
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b21
    0xfffffd7ffeaa3b21: __SLIP.THUNK__E+0x0001: movq %rsp,%rbp
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b24
    0xfffffd7ffeaa3b24: __SLIP.THUNK__E+0x0004: subq $0x0000000000000010,%rsp
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b28
    0xfffffd7ffeaa3b28: __SLIP.THUNK__E+0x0008: movq %rdi,0xfffffffffffffff8(%rbp)
    t@7 stepi
    %r8 is changed here:
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b2c
    0xfffffd7ffeaa3b2c: __SLIP.THUNK__E+0x000c: movq 0xfffffffffffffff8(%rbp),%r8
    t@7 p -fx $r8
    dbx: warning: The format '0x%x' is not suitable for type long long, will use 'llx' instead
    $r8 = 0x2
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b30
    0xfffffd7ffeaa3b30: __SLIP.THUNK__E+0x0010: leaq 0xfffffffffffffff8(%r8),%r8
    t@7 p -fx $r8
    dbx: warning: The format '0x%x' is not suitable for type long long, will use 'llx' instead
    $r8 = 0xfffffd7fed3ff1a8
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b34
    0xfffffd7ffeaa3b34: __SLIP.THUNK__E+0x0014: movq %r8,0xfffffffffffffff8(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b38
    0xfffffd7ffeaa3b38: __SLIP.THUNK__E+0x0018: movq 0xfffffffffffffff8(%rbp),%rdi
    t@7 stepi
    %rcx is chaged here:
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b3c
    0xfffffd7ffeaa3b3c: __SLIP.THUNK__E+0x001c: movq 0x000000000035d08d [ 0x35d08d ],%rcx
    t@7 p -fx $rcx
    dbx: warning: The format '0x%x' is not suitable for type long long, will use 'llx' instead
    $rcx = 0x0
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b43
    0xfffffd7ffeaa3b43: __SLIP.THUNK__E+0x0023: leave
    t@7 p -fx $rcx
    dbx: warning: The format '0x%x' is not suitable for type long long, will use 'llx' instead
    $rcx = 0xfffffd7ffeaa8aa0
    t@7 stepi
    t@7 (l@7) stopped in __SLIP.THUNK__E at 0xfffffd7ffeaa3b44
    0xfffffd7ffeaa3b44: __SLIP.THUNK__E+0x0024: jmp *%ecx
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8aa0
    0xfffffd7ffeaa8aa0: GetCompareSelectivity : pushq %rbp
    t@7 regs
    current thread: t@7
    current frame: [1]
    r15 0x0000000000000000
    r14 0xfffffd7ffee61d60
    r13 0xfffffd7fed3f3890
    r12 0xfffffd7fed4573c0
    r11 0xfffffd7fed4573c0
    r10 0xfffffd7ffeaa3b20
    r9 0xfffffd7fed4573e8
    r8 0xfffffd7fed3ff1a0
    rdi 0xfffffd7fed3ff1a0
    rsi 0x0000000000000000
    rbp 0xfffffd7ffdbfa730
    rbx 0xfffffd7ffdee1400
    rdx 0x0000000000000000
    rcx 0xfffffd7ffeaa8aa0
    rax 0x0000000000000000
    trapno 0x0000000000000001
    err 0x0000000000000000
    rip 0xfffffd7ffeaa8aa0:GetCompareSelectivity pushq %rbp
    cs 0x000000000000004b
    eflags 0x0000000000000282
    rsp 0xfffffd7ffdbfa5f8
    ss 0x0000000000000043
    fs 0x00000000000001bb
    gs 0x0000000000000000
    es 0x0000000000000000
    ds 0x0000000000000000
    fsbase 0xfffffd7ffdee1400
    gsbase 0xffffffff80000000
    step through the function prolog:
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8aa1
    0xfffffd7ffeaa8aa1: GetCompareSelectivity+0x0001: movq %rsp,%rbp
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8aa4
    0xfffffd7ffeaa8aa4: GetCompareSelectivity+0x0004: subq $0x0000000000000190,%rsp
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8aab
    0xfffffd7ffeaa8aab: GetCompareSelectivity+0x000b: movq %rbx,0xfffffffffffffea8(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ab2
    0xfffffd7ffeaa8ab2: GetCompareSelectivity+0x0012: movq %r12,0xfffffffffffffea0(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ab9
    0xfffffd7ffeaa8ab9: GetCompareSelectivity+0x0019: movq %r13,0xfffffffffffffe98(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ac0
    0xfffffd7ffeaa8ac0: GetCompareSelectivity+0x0020: movq %r14,0xfffffffffffffe90(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ac7
    0xfffffd7ffeaa8ac7: GetCompareSelectivity+0x0027: movq %r15,0xfffffffffffffe88(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ace
    0xfffffd7ffeaa8ace: GetCompareSelectivity+0x002e: movq %rdi,0xfffffffffffffff8(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ad2
    0xfffffd7ffeaa8ad2: GetCompareSelectivity+0x0032: movq %rsi,0xfffffffffffffff0(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ad6
    0xfffffd7ffeaa8ad6: GetCompareSelectivity+0x0036: movq %rdx,0xffffffffffffffe8(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ada
    0xfffffd7ffeaa8ada: GetCompareSelectivity+0x003a: movq %rcx,0xffffffffffffffe0(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ade
    0xfffffd7ffeaa8ade: GetCompareSelectivity+0x003e: movl %r8d,0xffffffffffffffdc(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ae2
    0xfffffd7ffeaa8ae2: GetCompareSelectivity+0x0042: movq %r9,0xffffffffffffffd0(%rbp)
    t@7 stepi
    t@7 (l@7) stopped in CostModel::GetCompareSelectivity at 0xfffffd7ffeaa8ae6
    0xfffffd7ffeaa8ae6: GetCompareSelectivity+0x0046: movl $0x0000000000000000,0xfffffffffffffeb0(%rbp)
    check the values of expr2_converted and reln
    t@7 p expr2_converted
    expr2_converted = 0xfffffd7ffeaa8aa0
    t@7 p reln
    reln = ' '
    t@7 p -fx reln
    reln = 0xa0
    and both values are incorrect because the values in registers %rcx and %r8
    have changed.sus
    Tom

    The original release of Sun Studio 10 had problems with saving and restoring registers in some cases on AMD64. Please visit the Sun Studio patch page at
    http://developers.sun.com/prodtech/cc/downloads/patches/index.html
    Download the current patches for
    C++ Compiler
    x86 compiler backend
    C++ shared library patch for your Solaris version.

  • I downloaded latest update of iTunes (windows 7, 64bit) and have now the problem runtime error R6025 pure virtual function call (Microsoft Visual C   runtime library) - Who would have a solution to that problem? Thanks *********

    I downloaded latest update of iTunes (windows 7, 64bit) and have now the problem runtime error R6025 pure virtual function call (Microsoft Visual C   runtime library) - Who would have a solution to that problem?
    Thanks from Switzerland
    <Edited by Host>

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it, which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    (I've asked the hosts to remove your email address)
    tt2

  • Problem with dynamic LOV and function

    Hello all!
    I'm having a problem with a dynamic lov in APEX 3.0.1.00.08. Hope you can help me!
    I have Report and Form application. On the Form page i have a Page Item (Popup Key LOV (Displays description, returns key value)).
    When i submit the sql code in the 'List of vaules defention' box. I get the following message;
    1 error has occurred
    LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    When i excecute the code below in TOAD or in the SQL Workshop it returns the values i want to see. But somehow APEX doesn't like the sql....
    SELECT REC_OMSCHRIJVING d, REC_DNS_ID r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    returns_dns_lov_fn is a function, code is below;
    CREATE OR REPLACE FUNCTION DRSSYS.return_dns_lov_fn (p2_dns_id number)
    RETURN dns_table_type
    AS
    v_data dns_table_type := dns_table_type ();
    BEGIN
    IF p2_dns_id = 2
    THEN
    FOR c IN (SELECT dns_id dns, omschrijving oms
    FROM d_status dst
    WHERE dst.dns_id IN (8, 10))
    LOOP
    v_data.EXTEND;
    v_data (v_data.COUNT) := dns_rectype (c.dns, c.oms);
    END LOOP;
    RETURN v_data;
    END IF;
    END;
    and the types;
    CREATE OR REPLACE TYPE DRSSYS.dns_rectype AS OBJECT (rec_dns_id NUMBER, rec_omschrijving VARCHAR2(255));
    CREATE OR REPLACE TYPE DRSSYS.dns_table_type AS TABLE OF dns_rectype;
    I tried some things i found on this forum, but they didn't work as well;
    SELECT REC_OMSCHRIJVING display_value, REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT REC_OMSCHRIJVING display_value d, REC_DNS_ID result_display r FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) order by 1
    SELECT a.REC_OMSCHRIJVING display_value, a.REC_DNS_ID result_display FROM
    TABLE(CAST(return_dns_lov_fn(:P2_DNS_ID) AS dns_table_type)) a order by 1
    Edited by: rajan.arkenbout on 8-mei-2009 14:41
    Edited by: rajan.arkenbout on 8-mei-2009 14:51

    I just had the same problem when I used a function in a where clause.
    I have a function that checks if the current user has acces or not (returning varchar 'Y' or 'N').
    In where clause I have this:
    where myFunction(:user, somePK) = 'Y'
    It seems that when APEX checked if my query was valid, my function triggered and exception.
    As Varad pointed out, check for exception that could be triggered by a null 'p2_dns_id'
    Hope that helped you out.
    Max

  • Problem with tpcall and tpgetrply functions

    Hi,
    I have a problem with tpcall() and tpgetrply() functions.
    In this example (invoke tpcall()):
    FBFR32 *buf;
    FLDLEN32 buflen;
    buf = a_buffer.getBuffer(); /* getBuffer() returns FBFR32* */
    buflen = a_buffer.getLongitud();
    /* at this point: buf == a_buffer.getBuffer() */
    if (tpcall(a_contenedor.getServname(),
    (char*)a_contenedor.getBufferPeticion()->getBuffer(),
    a_contenedor.getBufferPeticion()->getLongitud(),
    (char**)&buf,
    (long*)&buflen,
    0) == -1)
    if (tperrno != TPESVCFAIL)
    LANZAR_EXCEPCION(CADENA_WHAT_SB,
    "Error en funcion Execute(), llamada tpcall()",
    tpstrerror(tperrno))
    /* at this point: buf != a_buffer.getBuffer() */
    tpcall() function change the memory address of buf. What is the problem? Is wrong my code? Is a problem with tuxedo version?
    My tuxedo version is:
    tmadmin -vINFO: BEA Tuxedo, Version 8.0, 32-bit, Patch Level 306
    INFO: Serial #: 650522264137-773290431251, Expiration NONE, Maxusers 150
    INFO: Licensed to: Telefonica Moviles Espa?a, S.A.
    INFO: 56-bit Encryption Package
    Thanks,
    ANTONIO.

    There's nothing wrong with your code or tuxedo. tpcall (and tpgetrply) can change the address of the return buffer if it needs to allocate more memory to hold the data. This is the reason why you pass a pointer to the buffer as the output buffer parameter to tpcall and tpreturn. Everything is working as expected.

Maybe you are looking for