Trouble with compiling packages

I ve posted this in other forums but most of the soultions that i got was problamatic. if there is a way to compile a application which has 3 or 4 sub packages without using any other tools other than what comes with jdk that's what im looking for
itried what was in this post but that didnt work
http://forum.java.sun.com/thread.jspa?threadID=541081&messageID=2622943
Thanks in advance

The other thread has the right answers if you're using a real operating system like a unix variety.
If you're using Windows, you can improve the situation by using cygwin. That will give you access to a tool like find (unix find) so you'll be able to do something like
find . -name \*java > @files
java @filesor
java `find . -name \*java`But seriously, the best solution is to use a build tool like Ant or Make. You can use Ant on Windows.
Windows isn't really designed for small independant tools (e.g., getting work done) like unix is. You're supposed to use a big monolithic application, one at a time. Once you've learned enough Java that you are developing larger applications like this, and if you insist on using Windows, then either get cygwin, or download an IDE like Eclipse.

Similar Messages

  • Having trouble with xml package in "Building Oracle Xml Applications"

    I have modified the xml package found in Building Oracle XML Applications chapter 5 to exclude everything but the CLOB function, see Package below. When compiling the package body I am getting the following error.
    SQL> @xml_body
    35 /
    Warning: Package Body created with compilation errors.
    SQL> show errors
    Errors for PACKAGE BODY XML:
    LINE/COL ERROR
    19/5 PL/SQL: Statement ignored
    19/15 PLS-00382: expression is of wrong type
    SQL>
    The error occurs at this line in the xml_body package.
    retDoc := xmlparser.getDocument(parser);
    I am new to Oracle and any help would be appreciated.
    CREATE OR REPLACE PACKAGE xml AS
    -- Parse and return an XML document
    FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument;
    -- Free the memory used by an XML document
    PROCEDURE freeDocument(doc xmldom.DOMDocument);
    END;
    CREATE OR REPLACE PACKAGE BODY xml AS
    parse_error EXCEPTION;
    PRAGMA EXCEPTION_INIT(parse_error,-20100);
    -- Parse functions parse an XML document and return a handle to
    -- the in-memory DOM Document representation of the parsed XML.
    -- Call freeDocument() when you're done using the document returned
    -- by the function.
    FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument IS
    retDoc xmldom.DOMDocument;
    parser xmlparser.Parser;
    BEGIN
    IF xml IS NULL THEN RETURN NULL; END IF;
    parser := xmlparser.newParser;
    xmlparser.parseCLOB(parser,xml);
    retDoc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    RETURN retDoc;
    EXCEPTION
    WHEN parse_error THEN
    xmlparser.freeParser(parser);
    RETURN retDoc;
    END;
    -- Free the Java objects associated with an in-memory DOM tree
    PROCEDURE freeDocument(doc xmldom.DOMDocument) IS
    BEGIN
    xmldom.freeDocument(doc);
    END;
    END;
    null

    I have modified the xml package found in Building Oracle XML Applications chapter 5 to exclude everything but the CLOB function, see Package below. When compiling the package body I am getting the following error.
    SQL> @xml_body
    35 /
    Warning: Package Body created with compilation errors.
    SQL> show errors
    Errors for PACKAGE BODY XML:
    LINE/COL ERROR
    19/5 PL/SQL: Statement ignored
    19/15 PLS-00382: expression is of wrong type
    SQL>
    The error occurs at this line in the xml_body package.
    retDoc := xmlparser.getDocument(parser);
    I am new to Oracle and any help would be appreciated.
    CREATE OR REPLACE PACKAGE xml AS
    -- Parse and return an XML document
    FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument;
    -- Free the memory used by an XML document
    PROCEDURE freeDocument(doc xmldom.DOMDocument);
    END;
    CREATE OR REPLACE PACKAGE BODY xml AS
    parse_error EXCEPTION;
    PRAGMA EXCEPTION_INIT(parse_error,-20100);
    -- Parse functions parse an XML document and return a handle to
    -- the in-memory DOM Document representation of the parsed XML.
    -- Call freeDocument() when you're done using the document returned
    -- by the function.
    FUNCTION parse(xml CLOB) RETURN xmldom.DOMDocument IS
    retDoc xmldom.DOMDocument;
    parser xmlparser.Parser;
    BEGIN
    IF xml IS NULL THEN RETURN NULL; END IF;
    parser := xmlparser.newParser;
    xmlparser.parseCLOB(parser,xml);
    retDoc := xmlparser.getDocument(parser);
    xmlparser.freeParser(parser);
    RETURN retDoc;
    EXCEPTION
    WHEN parse_error THEN
    xmlparser.freeParser(parser);
    RETURN retDoc;
    END;
    -- Free the Java objects associated with an in-memory DOM tree
    PROCEDURE freeDocument(doc xmldom.DOMDocument) IS
    BEGIN
    xmldom.freeDocument(doc);
    END;
    END;
    null

  • Trouble with compiling class that contains "import com.sun.xacml.*;"

    I think the package com.sun.xacml is included in j2sdk 1.4.2 (the one that I have)
    but every time I try to compile a class that importes this package classes, the compiler dosen't recognize the package.
    It's a problem of updating the CLASSPATH?
    Thanks in advance

    I don't think this would be part of any standard java distribution.
    But I found a couple of jars (versions) available for download at
    http://ebxmlrr.sourceforge.net/maven/repository/xacml/jars/

  • Help with compiling package

    I'm currently getting this error when compiling my package.
    Compilation failed,line 6 (10:56:34)
    PLS-00323: subprogram or cursor 'ADD_PROJECT' is declared in a package specification and must be defined in the package body
    Here is the specification
    Create or replace PACKAGE PKG_WORKPLAN
    IS
    TYPE t_char IS TABLE of varchar2(5000) INDEX BY BINARY_INTEGER;
    function ARR_SPLIT(field_delim varchar2, v_row varchar2)
         RETURN T_CHAR;
    Procedure add_project
    (V_PROJECT_TITLE IN WP_PROJECTS.TITLE%TYPE,
    V_PROJECT_CATEGORY IN WP_PROJECTS.CATEGORY%TYPE,
    V_PROJECT_DESC IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_PROJECT_LEADER IN WP_PROJECTS.PROJECT_LEADER%TYPE,
    V_CLIENT_MANAGER IN WP_PROJECTS.CLIENT_MANAGER%TYPE,
    V_START_DATE IN WP_PROJECTS.START_DATE%TYPE,
    V_FINISH_DATE IN WP_PROJECTS.FINISH_DATE%TYPE,
    v_FISC_YEAR IN WP_PROJECT_USERS_TIME.YEAR%TYPE,
    V_SERVICE_LINE IN WP_PROJECTS.SERVICE_LINE_ID%TYPE,
    V_COMMENTS IN WP_PROJECTS.COMMENTS%TYPE,
    V_INTERNAL_ORDER IN WP_PROJECTS.INTERNAL_ORDER%TYPE,
    V_MEMBERS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_MEMBERS IN NUMBER,
    V_CLIENTS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_CLIENTS IN NUMBER);
    END PKG_WORKPLAN;
    and here is the body
    create or replace PACKAGE BODY PKG_WORKPLAN
         IS
    function ARR_SPLIT(field_delim varchar2, v_row varchar2)
         RETURN T_CHAR
    IS
    v_char t_char;
    v_rowRep varchar2(999);
    BEGIN
    v_rowRep:=Replace(v_row,field_delim, '|^');
              For i in 1.. LENGTH(v_rowRep) LOOP
                   v_char(i):=Substr(v_rowRep,instr(v_rowRep,'|^',1,i)+2,instr(v_rowRep,'|^',1,i+1)-instr(v_rowRep,'|^',1,i)-2);
              END LOOP;
              RETURN v_char;
    END ARR_SPLIT;
    Procedure add_team_members
         (V_PROJECT_ID IN WP_PROJECTS_USERS.PROJECT_ID%TYPE,
         V_START_DATE IN WP_PROJECTS_USERS.START_DATE%TYPE,
    v_FISC_YEAR IN WP_PROJECT_USERS_TIME.YEAR%TYPE,
         v_members IN WP_PROJECTS.DESCRIPTION%TYPE,
         v_num_members IN NUMBER,
         v_op_type IN VARCHAR2)
    IS
    V_FYEAR NUMBER(4);
    V_COUNTER NUMBER;
    V_USER_ID NUMBER(10);
    V_DESCRIPTION VARCHAR(2000);
    V_PD1 NUMBER(3);
    V_PD2 NUMBER(3);
    V_PD3 NUMBER(3);
    v_string_org CLOB;
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    BEGIN
    delimiter:='||';
    v_string_org:=v_members;
    For j in 1.. v_num_members LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org , DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    V_FYEAR:=v_FISC_YEAR;
    INSERT INTO WP_PROJECTS_USERS (PROJECT_USERS_ID, FIELD_UNIT_ID, PROJECT_ID, USER_ID, START_DATE, DESCRIPTION)
    VALUES
    (PROJ_USERS_ID_SEQ.NEXTVAL, v_char(4), V_PROJECT_ID, v_char(2), V_START_DATE, v_char(5));
    INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
    VALUES
    (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, PROJ_USERS_ID_SEQ.CURRVAL, V_FYEAR, v_char(6));
    V_FYEAR:=V_FYEAR+1;
    INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
    VALUES
    (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, PROJ_USERS_ID_SEQ.CURRVAL, V_FYEAR, v_char(7));
    V_FYEAR:=V_FYEAR+1;
    INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
    VALUES
    (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, PROJ_USERS_ID_SEQ.CURRVAL, V_FYEAR, v_char(8));
    END LOOP;
    end add_team_members;
    Procedure update_team_members
         (V_PROJECT_ID IN WP_PROJECTS_USERS.PROJECT_ID%TYPE,
         V_START_DATE IN WP_PROJECTS_USERS.START_DATE%TYPE,
         v_FISC_YEAR IN WP_PROJECT_USERS_TIME.YEAR%TYPE,
         v_members IN WP_PROJECTS.DESCRIPTION%TYPE,
         v_num_members IN NUMBER,
         v_op_type IN VARCHAR2)
    IS
    V_FYEAR NUMBER(4);
    V_COUNTER NUMBER;
    V_USER_ID NUMBER(10);
    V_PROJ_USER_ID NUMBER(10);
    V_DESCRIPTION VARCHAR(2000);
    V_PD1 NUMBER(3);
    V_PD2 NUMBER(3);
    V_PD3 NUMBER(3);
    v_string_org CLOB;
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    BEGIN
    delimiter:='||';
    v_string_org:=v_members;
    For j in 1.. v_num_members LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org , DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    V_FYEAR:=V_FISC_YEAR;
    -- new team member
    IF v_char(10)='n' THEN
         SELECT PROJ_USERS_ID_SEQ.NEXTVAL INTO V_PROJ_USER_ID FROM DUAL;
    INSERT INTO WP_PROJECTS_USERS (PROJECT_USERS_ID, FIELD_UNIT_ID, PROJECT_ID, USER_ID, START_DATE, DESCRIPTION)
    VALUES
    (V_PROJ_USER_ID, v_char(3), V_PROJECT_ID, v_char(8), V_START_DATE, v_char(4));
    -- modify team member
    ELSIF v_char(10)='m' THEN
         UPDATE WP_PROJECTS_USERS
         SET FIELD_UNIT_ID=v_char(3),
         PROJECT_ID=V_PROJECT_ID, USER_ID=v_char(8),
         START_DATE=V_START_DATE, DESCRIPTION=v_char(4)
         WHERE PROJECT_USERS_ID=v_char(9);
         DELETE FROM WP_PROJECT_USERS_TIME WHERE PROJECT_USERS_ID=v_char(9);
         V_PROJ_USER_ID:=v_char(9);
    -- delete team member
    ELSIF v_char(10)='d' THEN
         DELETE FROM WP_PROJECT_USERS_TIME WHERE PROJECT_USERS_ID=v_char(9);
         DELETE FROM WP_PROJECTS_USERS WHERE PROJECT_USERS_ID=v_char(9);
    END IF;
    -- add time records for new/modified team member
    IF (v_char(10)='n') OR (v_char(10)='m') THEN
    INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
    VALUES
    (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, V_PROJ_USER_ID, V_FYEAR, v_char(5));
    V_FYEAR:=V_FYEAR+1;
    INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
         VALUES
         (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, V_PROJ_USER_ID, V_FYEAR, v_char(6));
    V_FYEAR:=V_FYEAR+1;
         INSERT INTO WP_PROJECT_USERS_TIME (PROJECT_USERS_TIME_ID, PROJECT_USERS_ID, YEAR, TIME)
         VALUES
         (PROJ_USERS_TIME_ID_SEQ.NEXTVAL, V_PROJ_USER_ID, V_FYEAR, v_char(7));
    END IF;
    END LOOP;
    end update_team_members;
    Procedure add_clients
         (V_PROJECT_ID IN WP_PROJECTS_USERS.PROJECT_ID%TYPE,
         v_clients IN WP_PROJECTS.DESCRIPTION%TYPE,
         v_num_clients IN NUMBER,
         v_op_type IN VARCHAR2)
    IS
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    v_string_org CLOB;
    BEGIN
    delimiter:='||';
    v_string_org:=v_clients;
    for j in 1..v_num_clients LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org, DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    IF v_char(3)='n' THEN
         INSERT INTO WP_PROJECTS_FIELD_UNITS (FIELD_UNIT_ID, PROJECT_ID)
         VALUES
         (v_char(2), V_PROJECT_ID);
    ELSIF v_char(3)='d' THEN
         DELETE FROM WP_PROJECTS_FIELD_UNITS
         WHERE FIELD_UNIT_ID=v_char(2) AND PROJECT_ID=V_PROJECT_ID;
    END IF;
    END LOOP;
    end add_clients;
    Procedure add_project
    (V_TITLE IN WP_PROJECTS.TITLE%TYPE,
    V_PROJECT_CATEGORY IN WP_PROJECTS.CATEGORY%TYPE,
    V_PROJECT_DESC IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_PROJECT_LEADER IN WP_PROJECTS.PROJECT_LEADER%TYPE,
    V_CLIENT_MANAGER IN WP_PROJECTS.CLIENT_MANAGER%TYPE,
    V_START_DATE IN WP_PROJECTS.START_DATE%TYPE,
    V_FINISH_DATE IN WP_PROJECTS.FINISH_DATE%TYPE,
    v_FISC_YEAR IN WP_PROJECT_USERS_TIME.YEAR%TYPE,
    V_SERVICE_LINE IN WP_PROJECTS.SERVICE_LINE_ID%TYPE,
    V_COMMENTS IN WP_PROJECTS.COMMENTS%TYPE,
    V_INTERNAL_ORDER IN WP_PROJECTS.INTERNAL_ORDER%TYPE,
    V_MEMBERS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_MEMBERS IN NUMBER,
    V_CLIENTS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_CLIENTS IN NUMBER)
    IS
    V_PROJECT_ID NUMBER(10);
    begin
    Select proj_id_seq.nextval INTO V_PROJECT_ID FROM DUAL;
    INSERT INTO WP_PROJECTS (PROJECT_ID, TITLE, CATEGORY, DESCRIPTION,
    PROJECT_LEADER, CLIENT_MANAGER,
    START_DATE, FINISH_DATE, SERVICE_LINE_ID, COMMENTS, INTERNAL_ORDER)
    VALUES
    (V_PROJECT_ID, V_TITLE, V_PROJECT_CATEGORY, V_PROJECT_DESC, V_PROJECT_LEADER,
    V_CLIENT_MANAGER, V_START_DATE, V_FINISH_DATE, V_SERVICE_LINE,
    V_COMMENTS, V_INTERNAL_ORDER);
    add_clients(V_PROJECT_ID, V_CLIENTS ,V_NUM_CLIENTS,'add');
    add_team_members(V_PROJECT_ID, V_START_DATE, v_FISC_YEAR, V_MEMBERS ,V_NUM_MEMBERS,'add');
    end add_project;
    Procedure update_project
    (V_PROJECT_ID IN WP_PROJECTS.PROJECT_ID%TYPE,
    V_TITLE IN WP_PROJECTS.TITLE%TYPE,
    V_PROJECT_CATEGORY IN WP_PROJECTS.CATEGORY%TYPE,
    V_PROJECT_DESC IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_PROJECT_LEADER IN WP_PROJECTS.PROJECT_LEADER%TYPE,
    V_CLIENT_MANAGER IN WP_PROJECTS.CLIENT_MANAGER%TYPE,
    V_START_DATE IN WP_PROJECTS.START_DATE%TYPE,
    V_FINISH_DATE IN WP_PROJECTS.FINISH_DATE%TYPE,
    v_FISC_YEAR IN WP_PROJECT_USERS_TIME.YEAR%TYPE,
    V_SERVICE_LINE IN WP_PROJECTS.SERVICE_LINE_ID%TYPE,
    V_COMMENTS IN WP_PROJECTS.COMMENTS%TYPE,
    V_INTERNAL_ORDER IN WP_PROJECTS.INTERNAL_ORDER%TYPE,
    V_MEMBERS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_MEMBERS IN NUMBER,
    V_CLIENTS IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_CLIENTS IN NUMBER)
    IS
    begin
    UPDATE WP_PROJECTS
    SET TITLE=V_TITLE, CATEGORY=V_PROJECT_CATEGORY,
    DESCRIPTION=V_PROJECT_DESC, PROJECT_LEADER=V_PROJECT_LEADER,
    CLIENT_MANAGER=V_CLIENT_MANAGER,
    START_DATE=V_START_DATE, FINISH_DATE=V_FINISH_DATE,
    SERVICE_LINE_ID=V_SERVICE_LINE,
    COMMENTS=V_COMMENTS, INTERNAL_ORDER=V_INTERNAL_ORDER
    WHERE PROJECT_ID=V_PROJECT_ID;
    add_clients(V_PROJECT_ID, V_CLIENTS ,V_NUM_CLIENTS,'update');
    update_team_members(V_PROJECT_ID, V_START_DATE, V_FISC_YEAR, V_MEMBERS ,V_NUM_MEMBERS,'update');
    end UPDATE_PROJECT;
    Procedure ADD_TIMEREC
    (V_PROJ_USERS_ID IN WP_TIME_RECORDER.PROJECT_USERS_ID%TYPE,
    V_CATEGORY IN WP_TIME_RECORDER.CATEGORY%TYPE,
    V_IN IN WP_PROJECTS.DESCRIPTION%TYPE,
    V_NUM_MEMBERS IN NUMBER)
    IS
    v_string_org CLOB;
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    begin
    delimiter:='||';
    v_string_org:=V_IN;
    For j in 1.. v_num_members LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org , DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    -- add new time record
    IF v_char(6)='n' THEN
    INSERT INTO WP_TIME_RECORDER (TIME_RECORDER_ID, PROJECT_USERS_ID,
    START_DATE, END_DATE, HOURS, NOTES, CATEGORY)
    VALUES
    (TIME_REC_ID_SEQ.NEXTVAL, V_PROJ_USERS_ID, TO_DATE(v_char(1),'MM-DD-YYYY'), TO_DATE(v_char(2),'MM-DD-YYYY'), v_char(3),      v_char(4), V_CATEGORY);
    -- modify time record
    ELSIF v_char(6)='m' THEN
    UPDATE WP_TIME_RECORDER
         SET PROJECT_USERS_ID=V_PROJ_USERS_ID,
         START_DATE=TO_DATE(v_char(1),'MM-DD-YYYY'),
         END_DATE=TO_DATE(v_char(2),'MM-DD-YYYY'),
         HOURS=v_char(3),
         NOTES=v_char(4),
         CATEGORY=V_CATEGORY
    WHERE TIME_RECORDER_ID=v_char(5);
    -- delete time record
    ELSIF v_char(6)='d' THEN
    DELETE FROM WP_TIME_RECORDER WHERE TIME_RECORDER_ID=v_char(5);
    END IF;
    END LOOP;
    end ADD_TIMEREC;
    Procedure ADD_TIME_NONPROJECT
    (V_NONPROJ_USERS_ID IN WP_TIME_NONPROJECT.USER_ID%TYPE,
    V_CATEGORY IN WP_TIME_NONPROJECT.CATEGORY%TYPE,
    V_IN IN WP_TIME_NONPROJECT.NOTES%TYPE,
    V_NUM_MEMBERS IN NUMBER)
    IS
    v_string_org CLOB;
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    begin
    delimiter:='||';
    v_string_org:=V_IN;
    For j in 1.. v_num_members LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org , DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    -- add new time record
    IF v_char(6)='n' THEN
    INSERT INTO WP_TIME_NONPROJECT (TIME_NONPROJECT_ID, USER_ID,
    START_DATE, END_DATE, HOURS, NOTES, CATEGORY)
    VALUES
    (TIME_REC_ID_SEQ.NEXTVAL, V_NONPROJ_USERS_ID, TO_DATE(v_char(1),'MM-DD-YYYY'), TO_DATE(v_char(2),'MM-DD-YYYY'), v_char(3), v_char(4), V_CATEGORY);
    -- modify time record
    ELSIF v_char(6)='m' THEN
    UPDATE WP_TIME_NONPROJECT
         SET START_DATE=TO_DATE(v_char(1),'MM-DD-YYYY'),
         END_DATE=TO_DATE(v_char(2),'MM-DD-YYYY'),
         HOURS=v_char(3),
         NOTES=v_char(4),
         CATEGORY=V_CATEGORY
    WHERE TIME_NONPROJECT_ID=v_char(5);
    -- delete time record
    ELSIF v_char(6)='d' THEN
    DELETE FROM WP_TIME_NONPROJECT WHERE TIME_NONPROJECT_ID=v_char(5);
    END IF;
    END LOOP;
    end ADD_TIME_NONPROJECT;
    Procedure ADD_TIME_NONPROJECT_LEAVE
    (V_NONPROJ_USERS_ID IN WP_TIME_NONPROJECT.USER_ID%TYPE,
    V_CATEGORY IN WP_TIME_NONPROJECT.CATEGORY%TYPE,
    V_IN IN WP_TIME_NONPROJECT.NOTES%TYPE,
    V_NUM_MEMBERS IN NUMBER)
    IS
    v_string_org CLOB;
    v_row varchar2(8000);
    V_CHAR T_CHAR;
    delimiter varchar2(4);
    begin
    delimiter:='||';
    v_string_org:=V_IN;
    For j in 1.. v_num_members LOOP
         v_row:=DBMS_LOB.SUBSTR( v_string_org , DBMS_LOB.instr(v_string_org,'|^|',1,j+1)-DBMS_LOB.instr(v_string_org,'|^|',1,j)-2,DBMS_LOB.INSTR(v_string_org,'|^|',1,j)+3);
         v_row:=delimiter||v_row||delimiter;
         v_char:=arr_split(delimiter,v_row);
    -- add new time record
    IF v_char(8)='n' THEN
    INSERT INTO WP_TIME_NONPROJECT (TIME_NONPROJECT_ID, LEAVE_TRAINING_ID, USER_ID,
    START_DATE, END_DATE, HOURS, NOTES, CATEGORY)
    VALUES
    (TIME_REC_ID_SEQ.NEXTVAL, v_char(6), V_NONPROJ_USERS_ID, TO_DATE(v_char(1),'MM-DD-YYYY'), TO_DATE(v_char(2),'MM-DD-YYYY'), v_char(4), v_char(5), V_CATEGORY);
    -- modify time record
    ELSIF v_char(8)='m' THEN
    UPDATE WP_TIME_NONPROJECT
         SET LEAVE_TRAINING_ID=v_char(6),
         START_DATE=TO_DATE(v_char(1),'MM-DD-YYYY'),
         END_DATE=TO_DATE(v_char(2),'MM-DD-YYYY'),
         HOURS=v_char(4),
         NOTES=v_char(5),
         CATEGORY=V_CATEGORY
    WHERE TIME_NONPROJECT_ID=v_char(7);
    -- delete time record
    ELSIF v_char(8)='d' THEN
    DELETE FROM WP_TIME_NONPROJECT WHERE TIME_NONPROJECT_ID=v_char(7);
    END IF;
    END LOOP;
    end ADD_TIME_NONPROJECT_LEAVE;
    END PKG_WORKPLAN;
    Thanks in Advance!!!

    Welcome to the forum.
    Error messages are documented and online available.
    "PLS-00323: subprogram or cursor "string" is declared in a package specification and must be defined in the package body
    Cause: A subprogram specification was placed in a package specification, but the corresponding subprogram body was not placed in the package body. The package body implements the package specification. So, the package body must contain the definition of every subprogram declared in the package specification.
    Action: Check the spelling of the subprogram name. If necessary, add the missing subprogram body to the package body."
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/plsus.htm#sthref13568
    Documtentation is your friend (and database versions do matter ).
    Bookmark:
    http://www.oracle.com/pls/db102/homepage
    http://www.oracle.com/pls/db112/homepage
    In other words: it might be a case of parameters that exist in the package specification, that do not exist (yet) in the package body.
    Compare your package specification to your package body, something appears to be different.

  • Trouble with compiling

    G-day.
    I have been having problems compiling most programs. After running the ./configure as per instruction... then make. It will start compiling but will always seems to halt and display make: Fatal error: Command failed for target `all-recursive' as the last line.
    This has happend when trying to compile apache 2, nmap, gnu gcc 4.2.1 and other apps.
    Anybody have any suggestions??

    No Probs
    The below is last lot of lines generated when trying to install Apache 2.
    "Previous Compile Text"
    random/unix/apr_random.lo random/unix/sha2.lo random/unix/sha2_glue.lo shmem/unix/shm.lo support/unix/waitio.lo threadproc/unix/proc.lo threadproc/unix/procsup.lo threadproc/unix/signals.lo threadproc/unix/thread.lo threadproc/unix/threadpriv.lo time/unix/time.lo time/unix/timestr.lo user/unix/groupinfo.lo user/unix/userinfo.lo -luuid -lsendfile -lrt -lsocket -lnsl -lpthread
    /Desktop/httpd-2.2.6/srclib/apr/libtool: line 5904: ar: command not found
    *** Error code 127
    make: Fatal error: Command failed for target `libapr-1.la'
    Current working directory /Desktop/httpd-2.2.6/srclib/apr
    *** Error code 1
    The following command caused the error:
    otarget=`echo all-recursive | sed s/-recursive//`; \
    list='random/unix dso/os2 time/unix locks/unix user/unix locks/beos tables support/unix file_io/unix mmap/unix atomic/unix poll/os2 dso/os390 atomic/os390 dso/beos poll/unix passwd network_io/beos threadproc/os2 network_io/os2 threadproc/beos shmem/unix network_io/unix file_io/os2 dso/aix threadproc/unix misc/unix shmem/beos dso/unix locks/os2 shmem/os2 memory/unix strings '; \
    for i in $list; do \
    if test -f "$i/Makefile"; then \
    target="$otarget"; \
    echo "Making $target in $i"; \
    if test "$i" = "."; then \
    made_local=yes; \
    target="local-$target"; \
    fi; \
    (cd $i && make $target) || exit 1; \
    fi; \
    done; \
    if test "$otarget" = "all" && test -z "libapr-1.la export_vars.c apr.exp"; then \
    made_local=yes; \
    fi; \
    if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
    fi
    make: Fatal error: Command failed for target `all-recursive'
    Current working directory /Desktop/httpd-2.2.6/srclib/apr
    *** Error code 1
    The following command caused the error:
    otarget=`echo all-recursive|sed s/-recursive//`; \
    list=' apr apr-util pcre '; \
    for i in $list; do \
    if test -d "$i"; then \
    target="$otarget"; \
    echo "Making $target in $i"; \
    if test "$i" = "."; then \
    made_local=yes; \
    target="local-$target"; \
    fi; \
    (cd $i && make $target) || exit 1; \
    fi; \
    done; \
    if test "$otarget" = "all" && test -z ''; then \
    made_local=yes; \
    fi; \
    if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
    fi
    make: Fatal error: Command failed for target `all-recursive'
    Current working directory /Desktop/httpd-2.2.6/srclib
    *** Error code 1
    The following command caused the error:
    otarget=`echo all-recursive|sed s/-recursive//`; \
    list=' srclib os server modules support'; \
    for i in $list; do \
    if test -d "$i"; then \
    target="$otarget"; \
    echo "Making $target in $i"; \
    if test "$i" = "."; then \
    made_local=yes; \
    target="local-$target"; \
    fi; \
    (cd $i && make $target) || exit 1; \
    fi; \
    done; \
    if test "$otarget" = "all" && test -z 'httpd '; then \
    made_local=yes; \
    fi; \
    if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
    fi
    make: Fatal error: Command failed for target `all-recursive'
    bash-3.00#

  • Trouble compiling package with JDK 1.4

    Hi,
    I just installed JDK 1.4 on a new machine, now I have trouble running compile scripts that used to work on my old machine. The old an new are configured with Win 2000. The following compiles without problem:
    javac -classpath "..." -d "..." "c:\.....\com\...\some package\MyClass.java"
    Changing this statemetn to:
    javac -classpath "..." -d "..." "c:\.....\com\...\some package\*.java"
    should compile all Java files in 'some package', instead what I get is the following error message:
    error: cannot read: c:\.....\com\...\some package\*.java
    The documentation says that this should still work. Anyone aware of changes in 1.4 that could cause this problem?
    Thanks for responding

    As a work-around, you can use some Unix-styled shell (that is, command processor) which expands the *.expression into the list of the matching file names, thus releaving javac from this task. (Caveat: directory names with a space inside will cause problems.)
    I can recommend the Cygnus package (including the command processor "bash") or "MinGW", the Minimalist GNU For Windows with its simpler sh:
    http://www.mingw.org/
    ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32/porters/Mikey/

  • Command Line Compilation of  a Project with different packages

    Hi,
    I am trying to compile a project through command line, which has different packages with many classes in it. Now If I try to compile package by package It's complaining about other referenced classes of different packages. So I created .bat file, which includes all the packages, but it's complaining input line is too long.
    D:\jdk1.3.1\bin>app.bat
    My bat file is
    javac -d d:\Application\build d:\Application\source\com\ibc\rules\login\*.java d:\Application\source\com\ibc\rules\lookup\*.java .................d:\Application\source\com\ibc\wid\events\*.java d:\Application\source\com\ibc\wid\frames\cust\*.java ...
    and so on............
    Is there any solution for this problem?
    Thanks in advance....

    I think the prefered and more elegant way to compile project including packages should be writing makefiles including their compilation, installation, deploying - rules ..
    Make is really powerful, the maybe only weak-point is that there are some distribution of them, gnu-make, microsoft nmake .. which are slightly different, that made porting among platforms difficult.
    The jakarta-ant was a new approach to this which uses xml parser to proof the dependencies, etc ..
    Because I'm not familiar yet with xml & ant and as a in-blooded unix user, "make" is still my prefered way to do roject.
    The easiest way to get unix environment required for using make in Windows platforms is to download the "unxutils". It includes make, bzip2, diff, ... and other unix-tools. Refer to this (found from search by google) :
    http://www.weihenstephan.de/~syring/win32/
    http://www.weihenstephan.de/~syring/win32/UnxUtils.zip
    http://sourceforge.net/projects/unxutils/
    For more documentation on how to write makefile, use make -tool, see
    http://www.gnu.org/manual/
    http://www.gnu.org/manual/make-3.79.1/html_mono/make.html

  • Compiling with nested packages

    Hello, I have a problem trying to compile packages. Let's assume the following:
    - The classpath variable is set to include ..jdkxxx\lib\dt.jar;..jdkxxx\lib\tools.jar
    - I have a directory called 'd:\com\mycompany\mainpackage'
    - Inside dir mainpackage, are two more dir. called 'subpack1' and 'subpack2'
    - Dir subpack1 contains some classes, and all classes contain the statement 'package com.mycompany.mainpackage.subpack1'
    - subpack1 is independent of all packages, except the java.lang
    - Dir subpack2 contains some classes, and all classes contain the statement 'package com.mycompany.mainpackage.subpack2'
    - subpack2 is dependent on some classes of subpack1
    How would I go about compiling the 'mainpackage'? I have managed to compile the subpack1 classes, but when I try to compile the subpack2 classes, I get 'cannot resolve symbol' error messages, pointing to classes in subpack1, which are already compiled, but not found.
    My classpath variable (at compile time) includes 'd:\com\mycompany\mainpackage', 'd:\com\mycompany\mainpackage\subpack1', and 'd:\com\mycompany\mainpackage\subpack2'
    Any reply will be greatly appreciated!

    You need to have the directory that contains the com directory in your Classpath when you compile (d:\ according to your post).
    Classes that are in com.mycompany.mainpackage.subpack2 will need to import any classes they need from com.mycompany.mainpackage.subpack1, unless you use the fully qualified class name each time.
    Note that there is no such thing as "nested packages" in Java. For example, you can not use a line like "import com.mycompany.mainpackage.*;" to try to import all classes in subpack1 and subpack2.
    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

  • Trouble with Toshiba built-in webcam: "unable to enumerate USB device"

    I am running archlinux on a Toshiba Satellite L70-B-12H laptop, and having troubles with the Webcam. *Once in a while*, everything goes well and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 004: ID 04f2:b448 Chicony Electronics Co., Ltd
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    # dmesg
    [ 3433.456115] usb 3-1.3: new high-speed USB device number 4 using ehci-pci
    [ 3433.781119] media: Linux media interface: v0.10
    [ 3433.809842] Linux video capture interface: v2.00
    [ 3433.826889] uvcvideo: Found UVC 1.00 device TOSHIBA Web Camera - HD (04f2:b448)
    [ 3433.835893] input: TOSHIBA Web Camera - HD as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/input/input15
    [ 3433.835976] usbcore: registered new interface driver uvcvideo
    [ 3433.835977] USB Video Class driver (1.1.1)
    Unfortunately, *most of the time* the camera seems invisible to my system, and I get
    # lsusb
    Bus 004 Device 002: ID 8087:8000 Intel Corp.
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 003: ID 8087:07dc Intel Corp.
    Bus 003 Device 002: ID 8087:8008 Intel Corp.
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    (note the missing "04f2:b448 Chicony Electronics Co., Ltd" device), and
    # dmesg
    [ 480.104252] usb 3-1.3: new full-speed USB device number 4 using ehci-pci
    [ 480.171097] usb 3-1.3: device descriptor read/64, error -32
    [ 480.341235] usb 3-1.3: device descriptor read/64, error -32
    [ 480.511375] usb 3-1.3: new full-speed USB device number 5 using ehci-pci
    [ 480.578007] usb 3-1.3: device descriptor read/64, error -32
    [ 480.748151] usb 3-1.3: device descriptor read/64, error -32
    [ 480.918282] usb 3-1.3: new full-speed USB device number 6 using ehci-pci
    [ 481.325196] usb 3-1.3: device not accepting address 6, error -32
    [ 481.392091] usb 3-1.3: new full-speed USB device number 7 using ehci-pci
    [ 481.798926] usb 3-1.3: device not accepting address 7, error -32
    [ 481.799166] hub 3-1:1.0: unable to enumerate USB device on port 3
    Searching on the web, most results I found lead to this page, where it is said that the problem is due to badly tuned overcurrent protection, and advocated that unplugging and switching off the computer for a little while gets things back into normal. This does not really work for me; the problem seems to occur more randomly, unfortunately with high probability (my camera is available after less than one boot out of ten).
    I tried to ensure that the ehci-hcd module is loaded at boot with the ignore-oc option (with a file in /etc/module-load.d/), to no avail.
    I also wrote a script which alternatively removes and reloads the ehci-pci driver until my device is found in lsusb. It is sometimes helpful, but usually not. And even when my device is found that way, it can only be used for a while before disappearing again.
    Anyway, such a hack is unacceptable... So, my questions are:
    is it indeed related to overcurrent protection ?
    is there anything else I can try ?
    should I file somewhere an other of the numerous bug reports about "unable to enumerate USB device" already existing ?
    If of any importance, I am running linux 3.15.7, because at the time I installed my system, I couldn't get the hybrid graphic card Intel/AMD working under 3.16.
    Last edited by $nake (2014-10-18 16:29:06)

    uname -a
    Linux libra 3.9.4-1-ARCH #1 SMP PREEMPT Sat May 25 16:14:55 CEST 2013 x86_64 GNU/Linux
    pacman -Qi linux
    Name : linux
    Version : 3.9.4-1
    Description : The linux kernel and modules
    Architecture : x86_64
    URL : http://www.kernel.org/
    Licences : GPL2
    Groups : base
    Provides : kernel26=3.9.4
    Depends On : coreutils linux-firmware kmod mkinitcpio>=0.7
    Optional Deps : crda: to set the correct wireless channels of your country
    Required By : nvidia
    Optional For : None
    Conflicts With : kernel26
    Replaces : kernel26
    Installed Size : 65562.00 KiB
    Packager : Tobias Powalowski <[email protected]>
    Build Date : Sat 25 May 2013 16:28:17 CEST
    Install Date : Sun 02 Jun 2013 15:30:35 CEST
    Install Reason : Explicitly installed
    Install Script : Yes
    Validated By : Signature

  • Trouble with OR in where clause

    Hello,
    I'm having trouble with execution speed. The problem seems to be with using OR in my where clause.
    Here's the meat of the function where i_pledge_number is an input parm:
    BEGIN
    SELECT /*+ INDEX (pp) */ SUM(pp.prim_pledge_amount)
    INTO return_amount
    FROM
    primary_pledge pp
    WHERE
    -- Get total if multiple allocations
    pp.prim_pledge_number IN
    (SELECT pc.pledge_number
    FROM pledge_codes pc
    WHERE pc.pledge_code_type = 'M'
    AND pc.pledge_code = 'AC'
    AND lpad(pc.pledge_comment,10,'0') = i_pledge_number)
    -- Get total if single allocation
    OR pp.prim_pledge_number = i_pledge_number;
    RETURN return_amount;
    END;
    If I comment out either half of the OR statement (either the subquery or the pp.prim_pledge_number = i_pledge_number half) the function returns a value in .02 seconds. If I leave the OR in, it takes 2.764 seconds to execute?? Can someone please show me a better way (faster) to do this? I tried using nvl() around the subquery but couldn't get it to compile.
    Thanks

    These things are difficult to diagnose remotely, but here is something you can try....
    SELECT */ SUM(pp.prim_pledge_amount)
    INTO return_amount
    FROM   primary_pledge pp
    WHERE  pp.prim_pledge_number IN (SELECT pc.pledge_number
                                     FROM pledge_codes pc
                                     WHERE pc.pledge_code_type = 'M'
                                     AND pc.pledge_code = 'AC'
                                     AND lpad(pc.pledge_comment,10,'0') = i_pledge_number
    UNION ALL
    SELECT i_pledge_number FROM dual)
       RETURN return_amount;
    END;If that doesn't do anything (and it might well not) there are a large number of different ways we can recast this query. To save us further guessing please give us more details: execution plans, database version number, volumetrics.
    Cheers, APC

  • Unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    unable to update itunes. help. error message when trying to update to latest version of itunes. "the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. error code 2721"

    Hello chae84swangin,
    I recommend following the steps in the article below when getting an error message trying to install iTunes:
    Trouble installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Trouble with Reader

    Having trouble with Adobe Reader 9.5.  Cannot open program; and cannot open a .pdf file.  No error messages, just nothing happens.  Tried to delete software and re-download.  Cannot delete it - message says patch package could not be opened.

    What is your operating system?  If Windows, use http://labs.adobe.com/downloads/acrobatcleaner.html and reinstall Reader.

  • Having problem with javax packages

    i had problem with compiling my program which is java servlet, and it is complaining that it does exist javax servlet * package , how can i solve this problem?

    I don't think servlets come with the standard packages. You have to find it somewhere else. I think you can try J2EE API. There in beta version for 1.3. Should be ok though. Hopefully it will fit right into 1.4.

  • Having Trouble With Formula

    i am doing an assignment and im having a lot of trouble with it.
    here is what it is asking for
    read a value representing a number of seconds, then print the equivalent amount of time as a combination of hours, minutes, and seconds. (For example, 9999 seconds is equivalent to 2 hours, 46 minutes, and 39 seconds).
    and so far i have this
    package Convert;
    import java.util.Scanner;
    public class nSeconds {
    public static void main(String[] args)
    long Seconds = 0;
    long Hours = 0;
    long Minutes = 0;
    Scanner scan = new Scanner(System.in);
    System.out.println("Please enter the hours: ");
    Hours = scan.nextInt();
    System.out.println("Please enter the minutes: ");
    Minutes = scan.nextInt();
    System.out.println("Please enter the seconds: ");
    Seconds = scan.nextInt();
    Seconds = (Hours*3600) + (Minutes*60) + (Seconds + 0);
    System.out.println("The total number of seconds is: " + Seconds);
    please help me with the formula
    thanks

    sorry that was the wrong app.
    this is the code i need help with
    package Convert;
    import java.util.Scanner;
    public class reverseSeconds {
         public static void main(String[] args)
              long Hours = 0;
    long Minutes = 0;
    long Second = 0;
              Scanner scan = new Scanner (System.in);
              System.out.println ("Please enter in the seconds:");
         Second = scan.nextInt();
         Hours = (Second / 3600);
         Minutes = (Second / 60) + Minutes;
         Second = Second / 60;
         System.out.println ("Hours:" + Hours);
         System.out.println ("Minutes:" + Minutes);
         System.out.println ("Seconds:" + Second);
         System.out.println(Hours + " Hours :" + Minutes + " Minutes:" + Second + " Seconds");
    }

  • Execution of Immediate SQL in compiled package in two versions of SQL*PLUS

    A peculiar problem has risen in our database.
    Execution of Immediate SQL in compiled package in two versions of SQLPLUS gives different results
    We have a compiled package with two procedures that contain immediate SQL statements, and these are:
    +PROC_DELETE_ROWS+
    +     -- This immediate sql deletes unreferenced Document Types from the DOC_REF_TYPE table+
    +     delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)+
       +     and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)+
       +     and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)+
       +     and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)+
    +PROC_ADD_NEW_ROWS+
    +     -- Drop the temporary table+
    +     drop table TMP_PROARC_DOC_REF_TYPE+
    +     -- Create a temporary table+
    +     create table tmp_PROARC_DOC_REF_TYPE as+
    +     select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC+
    +     from PROARC_DOC_REF_TYPE_VW+
    +     -- Insert document types that do not exist in the DOC_REF_TYPE table+
    +     insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)+
            +     select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s+
            +     where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)+
    I am using the following test script:
    +Exec mypackage.proc_delete_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+
    +Exec mypackage.proc_add_new_rows;+
    +Commit;+
    +Select count(*) from DOC_REF_TYPES;+We have a Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
    I am using SQL*Plus: Release 8.1.7.0.0
    The test script is working as expected.
    Count after delete =155
    Count after insert = 511
    but when I use another computer with SQL*Plus: Release 10.x
    The Test script returns the following
    Count after delete =155
    Count after insert =155
    The same is happening when I am running the scripts as a scheduled job.
    QUESTION:
    I believe I have found a fix for the problem though. By changing tmp_PROARC_DOC_REF_TYPE in the insert statement to all upper case, the script is running in both environments apparently. But how is this possible? I am executing a compiled package in the database. The session shell should have no impact on the behaveour of the procedure I am calling. What causes this?
    Edited by: Reon on Jun 16, 2011 4:44 AM

    1) I am using the same user (PANDORA)
    2) (PANDORA) for both
    3) I am actually not handling any errors. Just skipping any error altogether. I'll check to see what exceptions are raised, and come back.
    I have also noticed that SQL/PLUS is not the culprit here. If I use SQLTools 1.5 to run the script, the same thing happens. So it has to do something with the connection or session environment that is inheritet to both clients.
    The CODEZ:_
      procedure add_doc_types IS
      sqlstr     VARCHAR2(2000);
      begin
      BEGIN
           sqlstr := 'drop table TMP_PROARC_DOC_REF_TYPE';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      BEGIN
           sqlstr := 'create table tmp_PROARC_DOC_REF_TYPE as select DOC_REF_TYPE, substr(DOC_REF_TYPE_DESC,1,100) as DOC_REF_TYPE_DESC from PROARC_DOC_REF_TYPE_VW';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
        BEGIN
            sqlstr := 'insert into doc_ref_type t (DOC_REF_TYPE, DOC_REF_TYPE_DESC)
                    select distinct DOC_REF_TYPE, DOC_REF_TYPE_DESC from TMP_PROARC_DOC_REF_TYPE s
                    where not exists (select 1 from doc_ref_type t where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
            sqlstr := 'update doc_ref_type t set DOC_REF_TYPE_DESC = (
                    select DOC_REF_TYPE_DESC from tmp_PROARC_DOC_REF_TYPE s
                    where t.doc_ref_type = s.doc_ref_type)
                    where exists (select 1 from tmp_PROARC_DOC_REF_TYPE s where t.doc_ref_type = s.doc_ref_type)';
         EXECUTE IMMEDIATE sqlstr;
        EXCEPTION
          WHEN OTHERS THEN
            null;
        END;
      end add_doc_types;
      procedure delete_doc_types IS
      sqlstr     VARCHAR2(2000);
       BEGIN
            sqlstr := 'delete from doc_ref_type t where exists (select 1 from PROARC_DOC_REF_TYPE_VW d where d.doc_ref_type = t.doc_ref_type)
            and not exists (select 1 from doc_ref d where d.doc_ref_type = t.doc_ref_type)
            and doc_ref_type not in (select doc_ref_type from eis_doc_ref_type)
            and doc_ref_type not in (select eis_doc_ref_type from eis_doc_ref_type)';
          EXECUTE IMMEDIATE sqlstr;
         EXCEPTION
           WHEN OTHERS THEN
             null;
      end delete_doc_types;Edited by: Reon on Jun 16, 2011 2:01 AM

Maybe you are looking for