Avoid NOT NULL error on CMR

When I try to create an EJB with an CMR field passed on the ejbCreate I have two options:
1. set the CRM in ejbCreate (setXXX method): not posible, illegal state (ok by EJB 2.0 specifications)
2. set the CMR in ejbPostCreate (setXXX method): not posible - after ejbCreate the container tries to make the insert and gets the "unable to insert null into XXX" because the id of the CMR must be set NOT NULL in the database.
On bea there is something like delay-insert-until ejbCreate or ejbPostCreate.
What are my options on oc4j 9.0.3?

I will state the obvious, but nevertheless, have you restarted the j2ee engine?

Similar Messages

  • Avoid JDBC sender error: Execute statement did not return a result set

    Hi!
    My JDBC sender adapter towards MS SQL server works fine, with an Execute statement calling a stored procedure that returns the source data needed. The stored procedure itself updates the status of database table records, so that only the unread records are returned each time the stored procedure is called.
    However, the communication channel monitoring sets a red flag for the JDBC sender adapter, when there are no values to fetch from the database table (using the stored procedure). Message says: "Database-level error reported by JDBC driver while executing statement 'EXECUTE FetchMessage 1, 9000'. The JDBC driver returned the following error message: 'com.microsoft.sqlserver.jdbc.SQLServerException: The statement did not return a result set.'. For details, contact your database server vendor."
    This is not an error situation, as I do not expect there to be any values to fetch from the database at all times.
    I do not see how to change the stored procedure to avoid this error.
    Is there a parameter to be set on the JDBC adapter that I can use, so the red flag is avoided?
    Thanks for any input!
    Regards,
    Oeystein Emhjellen

    Hi Oeystein Emhjellen.
    The problem is Store Procedure that has to generate always a ResultSet (or cursor). If it doesn't have a output, you have to generate an Empty ResultSet.
    Like a SELECT Statement:
    If there are data, SELECT get an output result but if it get nothing the SELECT Statement get a empty ResultSet.
    Ask to your database team.
    I hope it helps you.
    Bruno.

  • Stream not found null error

    Hello everybody,
    I am able to embed the strobe player on a web page and play flv videos. However, if I don't let the videoplay through and refresh my web page, then I am getting  "We are unable to connect to the content you've requested" error.
    When the video is played all the way to the end, I can replay it without any issues.  
    When I set the verbose value to true, I am getting Stream not found null error instead,
    It seems to me that the strobe player can stream the video from server when it is not found in local cache. If the video is not cache completely in local machine, strobe player will display "We are unable to connect to the content you've requested" error.
    Is there a setting in Strobe can resolve this issue?
    The flv file is loaded on Windows Media Services 2008.
    Below is my embed code. It is very standard that generate from the strobe setup page
    <object width="470" height="320"> <param name="movie" value="myserver/strobe/flash101/StrobeMediaPlayback.swf"></param><param name="flashvars" value="src=http%3A%2F%2Fmy.domain.com%2Fnews%2Ftest.flv&optimizeInitialIndex=false"></par am><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="myserver/strobe/flash101/StrobeMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="470" height="320" flashvars="src=http%3A%2F%2Fmy.domain.com%2Fnews%2Ftest.flv&optimizeInitialIndex=false">< /embed></object>
    Any help would be greatly appreciated.
    Regards,
    Joe

    Hi,
    On what browser does exhibit this behavior?
    Can you provide a link to the video? You can PM it, if you want to keep it secret.
    You might want to raise an issue at http://bugs.adobe.com/jira/browse/ST . It will allow us to prioritize and investigate it easier.
    p.s. Optimize initial index works with MBR streams, you don't need it.

  • Visual Web ICEfaces - 'library must not be null' error

    Hi Everyone...
    I installed the following plugins 'ICEfaces Run-Time Libraries' and 'VisualWeb ICEfaces'. I restarted the IDE and went on to create a 'Web Application'. I selected 'Visual Web ICEfaces' in the famework option and clicked on 'finish'. As the progress bar hits 75%, I am getting a message that says 'library must not be null' and there is no further progress beyond 75%. When I click on the 'library' tab, I can see 'ICEfaces Run-Time 1.8.2', so I dont understand why I am getting a 'library must not be null' error. Any idea why I am getting this?
    OS: WinXP Professional
    IDE: Netbeans 6.5.1

    any clues anyone?

  • BlackBerry Desktop Software displays the error "Caught _com_error exception. Description(): (null): Error(): -2147319779 (0x8002801D). ErrorMessage(): Library not registered.:Source(): (null)." when attempting to synchronize organizer data

    BlackBerry Desktop Software displays the error "Caught _com_error exception. Description(): (null): Error(): -2147319779 (0x8002801D). ErrorMessage(): Library not registered.ource(): (null)." when attempting to synchronize organizer data.Can someone help me with this?  

    Tried clean wipe and reinstall. Immediately after reinstall of DM, in setting up my 9900 "for the first time", I received the following error message...
    "Either there is no default email client or the current mail client cannot fulfill the messaging request. Please open Microsoft Outlook and set it as the default mail client."
    I opened Outlook 2013 and checked that it was the default mail client. It was already.
    After going in and clicking to confirm default email client, I was allowed to proceed to configure organizer sync settings. I configured memo only (one way from device). I then received the same error message that I was receiving (per my original post in the last message). I've previously tried configuring only one type of organizer sync and not one of them completed a successful sync, so it can't be a bad entry in the calendar or contacts. I also tried deleting CICAL entries for all of email addresses other than my primary one. No difference. Also, prior to setup and sync, I confirmed that my 9900 was not on wireless sync.
    I was hoping that this was an old issue and I could use one of the old work-arounds, so if anyone has any ideas for something else to try, please let me know.
    In the mean time, I  have to assume that it's something that's changed with Outlook 2013 (particularly given the new error message I reported above. I hope that someone at RIM is aware of these error messages and is working on a compatibility fix for Office 2013.
    Thanks in advance,
    Sheldon
    Twitter: @sheldonbk
    Twitter: @sheldonbk

  • Need help to avoid ORA-04030 error

    Oracle version : 11.1.0.6.0
    OS - Solaris 64bit Sparc
    Hi All,
    Today we have recieved the below error messeges in the alert log.
    ORA-04030: out of process memory when trying to allocate 56 bytes (callheap,kghscAllocDataElem:dataElem)
    ORA-04030: out of process memory when trying to allocate 184 bytes (callheap,temporary memory)
    ORA-04030: out of process memory when trying to allocate 56 bytes (callheap,temporary memory)
    Trace dumping is performing id=[cdmp_20110222134605]
    Tue Feb 22 13:46:52 2011
    Sweep Incident[104533]: completed
    Sweep Incident[104532]: completed
    Sweep Incident[104531]: completed
    Sweep Incident[104530]: completed
    Sweep Incident[104528]: completed
    Tue Feb 22 17:04:25 2011
    SYS@MYDB>!oerr ora 4030
    04030, 00000, "out of process memory when trying to allocate %s bytes (%s,%s)"
    //*Cause:  Operating system process private memory was exhausted.
    //*Action:I came to know that it was due to the operating system prvate memory exhausted. Database memory configuration is as below
    SYS@MYDB>show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 2000M
    sga_target                           big integer 0
    SYS@MYDB>show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 521658240
    SYS@MYDB>OS Memory information
    load averages:  1.58,  1.82,  2.13;                    up 196+10:43:15                                                         20:55:35
    408 processes: 406 sleeping, 2 on cpu
    CPU states: 80.0% idle, 15.6% user,  4.4% kernel,  0.0% iowait,  0.0% swap
    Memory: 32G phys mem, 18G free mem, 43G total swap, 42G free swapThere are other 2 more databases are running on this server, one is 10g and another one is 9i and its memory configuration have given below respectivly
    SQL>show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 4G
    sga_target                           big integer 4G
    RPT>show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 4G
    SQL> show parameter sga
    NAME                                 TYPE        VALUE
    lock_sga                             boolean     FALSE
    pre_page_sga                         boolean     FALSE
    sga_max_size                         big integer 1135171060
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 2147483648
    SQL>Could you please suggest me how to avoid this error in future ? Looks like i need to fine tune the memory parameters, could you please suggest how can i do so ? I also noticed SGA Target is set to 0 (Automatic Memory managment is not enabled), If i set SGA target will resolve the issue ?
    Kindly advise ..
    Thanks in advance
    Nishant

    I just took the plan by setting set autotrace traceonly explain. Please check this will help, I will check and update you the table's statistics soon.
    Execution Plan
    Plan hash value: 1841079096
    | Id  | Operation                               | Name               | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                        |                    |   210M|    96G|       |    29M  (1)| 99:12:47 |
    |   1 |  SORT ORDER BY                          |                    |   210M|    96G|       |    29M  (1)| 99:12:47 |
    |   2 |   HASH UNIQUE                           |                    |   210M|    96G|  1000K| 41115   (2)| 00:08:14 |
    |   3 |    CONCATENATION                        |                    |       |       |       |            |          |
    |   4 |     NESTED LOOPS                        |                    |       |       |       |            |          |
    |   5 |      NESTED LOOPS                       |                    |   980 |   470K|       | 34365   (2)| 00:06:53 |
    |   6 |       NESTED LOOPS                      |                    |   980 |   455K|       | 33384   (2)| 00:06:41 |
    |   7 |        NESTED LOOPS                     |                    |   980 |   445K|       | 32893   (2)| 00:06:35 |
    |*  8 |         HASH JOIN                       |                    |   980 |   434K|  7968K| 31912   (2)| 00:06:23 |
    |   9 |          NESTED LOOPS                   |                    | 19606 |  7735K|       | 28804   (2)| 00:05:46 |
    |* 10 |           HASH JOIN                     |                    |     1 |   306 |    11M| 27300   (2)| 00:05:28 |
    |  11 |            TABLE ACCESS FULL            | VERSION_FILE_MAP   |   517K|  6064K|       |  2275   (3)| 00:00:28 |
    |* 12 |            HASH JOIN                    |                    |   296K|    83M|    11M| 20121   (2)| 00:04:02 |
    |* 13 |             HASH JOIN                   |                    |   296K|  8401K|  7168K|  4103   (4)| 00:00:50 |
    |  14 |              INDEX FAST FULL SCAN       | ATTACHMENT_PK      |   407K|  2389K|       |   280   (3)| 00:00:04 |
    |* 15 |              HASH JOIN                  |                    |   296K|  6663K|  8408K|  2966   (4)| 00:00:36 |
    |  16 |               TABLE ACCESS FULL         | ATTACHMENT_MAP     |   296K|  4925K|       |  1810   (5)| 00:00:22 |
    |  17 |               INDEX FAST FULL SCAN      | VERSION_PK         |   482K|  2829K|       |   317   (3)| 00:00:04 |
    |  18 |             TABLE ACCESS FULL           | FILES              |   509K|   128M|       |  8744   (1)| 00:01:45 |
    |* 19 |           TABLE ACCESS FULL             | ATTACHMENT         | 31967 |  3059K|       |  1504   (2)| 00:00:19 |
    |  20 |          TABLE ACCESS FULL              | VERSION            |   482K|    23M|       |  1290   (2)| 00:00:16 |
    |* 21 |         TABLE ACCESS BY INDEX ROWID     | VERSION            |     1 |    12 |       |     1   (0)| 00:00:01 |
    |* 22 |          INDEX UNIQUE SCAN              | VERSION_PK         |     1 |       |       |     1   (0)| 00:00:01 |
    |* 23 |        INDEX UNIQUE SCAN                | PAGE_THREE_PK      |     1 |    10 |       |     1   (0)| 00:00:01 |
    |* 24 |       INDEX UNIQUE SCAN                 | PAGE_TWO_PK        |     1 |       |       |     1   (0)| 00:00:01 |
    |  25 |      TABLE ACCESS BY INDEX ROWID        | PAGE_TWO           |     1 |    16 |       |     1   (0)| 00:00:01 |
    |  26 |     NESTED LOOPS                        |                    |       |       |       |            |          |
    |  27 |      NESTED LOOPS                       |                    |     1 |   492 |       |  6644   (2)| 00:01:20 |
    |  28 |       NESTED LOOPS                      |                    |     1 |   227 |       |  6643   (2)| 00:01:20 |
    |  29 |        NESTED LOOPS                     |                    |     1 |   215 |       |  6641   (2)| 00:01:20 |
    |  30 |         NESTED LOOPS                    |                    |     1 |   209 |       |  6640   (2)| 00:01:20 |
    |  31 |          MERGE JOIN CARTESIAN           |                    |     1 |   192 |       |  6639   (2)| 00:01:20 |
    |  32 |           NESTED LOOPS                  |                    |       |       |       |            |          |
    |  33 |            NESTED LOOPS                 |                    |     1 |   186 |       |  6359   (2)| 00:01:17 |
    |  34 |             NESTED LOOPS                |                    |     1 |   170 |       |  6358   (2)| 00:01:17 |
    |  35 |              NESTED LOOPS               |                    |     1 |   158 |       |  6357   (2)| 00:01:17 |
    |* 36 |               HASH JOIN                 |                    |     1 |   148 |    28M|  6356   (2)| 00:01:17 |
    |  37 |                TABLE ACCESS FULL        | VERSION            |   482K|    23M|       |  1290   (2)| 00:00:16 |
    |* 38 |                TABLE ACCESS FULL        | ATTACHMENT         |   407K|    38M|       |  1504   (2)| 00:00:19 |
    |* 39 |               INDEX UNIQUE SCAN         | PAGE_THREE_PK      |     1 |    10 |       |     1   (0)| 00:00:01 |
    |* 40 |              TABLE ACCESS BY INDEX ROWID| VERSION            |     1 |    12 |       |     1   (0)| 00:00:01 |
    |* 41 |               INDEX UNIQUE SCAN         | VERSION_PK         |     1 |       |       |     1   (0)| 00:00:01 |
    |* 42 |             INDEX UNIQUE SCAN           | PAGE_TWO_PK        |     1 |       |       |     1   (0)| 00:00:01 |
    |  43 |            TABLE ACCESS BY INDEX ROWID  | PAGE_TWO           |     1 |    16 |       |     1   (0)| 00:00:01 |
    |  44 |           BUFFER SORT                   |                    |   407K|  2389K|       |  6638   (2)| 00:01:20 |
    |  45 |            INDEX FAST FULL SCAN         | ATTACHMENT_PK      |   407K|  2389K|       |   280   (3)| 00:00:04 |
    |* 46 |          TABLE ACCESS BY INDEX ROWID    | ATTACHMENT_MAP     |     1 |    17 |       |     2   (0)| 00:00:01 |
    |* 47 |           INDEX RANGE SCAN              | ATTACHMENTMAP_IDX3 |     1 |       |       |     1   (0)| 00:00:01 |
    |* 48 |         INDEX UNIQUE SCAN               | VERSION_PK         |     1 |     6 |       |     1   (0)| 00:00:01 |
    |  49 |        TABLE ACCESS BY INDEX ROWID      | VERSION_FILE_MAP   |     1 |    12 |       |     2   (0)| 00:00:01 |
    |* 50 |         INDEX RANGE SCAN                | VERSION_FMAP_IDX2  |     1 |       |       |     1   (0)| 00:00:01 |
    |* 51 |       INDEX UNIQUE SCAN                 | FILES_PK           |     1 |       |       |     1   (0)| 00:00:01 |
    |* 52 |      TABLE ACCESS BY INDEX ROWID        | FILES              |     1 |   265 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       8 - access("A"."ID"="VERSION"."ATTACH_ID" AND "A"."LATEST_VSN"="VERSION"."ID")
           filter("A"."LATEST_VSN">="VERSION"."ID")
      10 - access("C"."ID"="D"."VERSION_ID" AND "D"."FILE_ID"="E"."ID")
      12 - access("E"."ID"="A"."FILE_ID")
      13 - access("A"."ATTACH_ID"="B"."ID")
      15 - access("A"."LATEST_VSN"="C"."ID")
      19 - filter(NVL("A"."DELETE_FLAG",0)=0 AND ("CTXSYS"."CONTAINS"("A"."DESCRIPTION",'EHS%')>0 OR
                  "CTXSYS"."CONTAINS"("E"."CONTENT_URL",'EHS%')>0 AND "E"."CONTENT_URL" IS NOT NULL))
      21 - filter("A"."ID"="D"."ATTACH_ID")
      22 - access("A"."LATEST_VSN"="D"."ID")
      23 - access("A"."ID"="C"."ID" AND "A"."CLASS"="C"."CLASS")
      24 - access("A"."ID"="B"."ID" AND "A"."CLASS"="B"."CLASS")
      36 - access("A"."ID"="VERSION"."ATTACH_ID" AND "A"."LATEST_VSN"="VERSION"."ID")
           filter("A"."LATEST_VSN">="VERSION"."ID")
      38 - filter(NVL("A"."DELETE_FLAG",0)=0)
      39 - access("A"."ID"="C"."ID" AND "A"."CLASS"="C"."CLASS")
      40 - filter("A"."ID"="D"."ATTACH_ID")
      41 - access("A"."LATEST_VSN"="D"."ID")
      42 - access("A"."ID"="B"."ID" AND "A"."CLASS"="B"."CLASS")
      46 - filter("A"."FILE_ID"=0)
      47 - access("A"."ATTACH_ID"="B"."ID")
      48 - access("A"."LATEST_VSN"="C"."ID")
      50 - access("C"."ID"="D"."VERSION_ID")
      51 - access("D"."FILE_ID"="E"."ID")
           filter(LNNVL("E"."ID"="A"."FILE_ID"))
      52 - filter("CTXSYS"."CONTAINS"("A"."DESCRIPTION",'EHS%')>0 OR
                  "CTXSYS"."CONTAINS"("E"."CONTENT_URL",'EHS%')>0 AND "E"."CONTENT_URL" IS NOT NULL)

  • Page not found errors

    I am stuck with the following error "page not found" when i click on my link. I am trying to use the cgicmd.dat.
    In the .dat file:
    report: server=Rep60.sony.com userid=#####/#####@dwhs report=%1 %*
    In the HTML code:
    href="http://sddb5.station.sony.com/dev60gci/rwcgi60.exe/report?by_day.RDF&reptype=hrts_unique_users&destype=cache&desformat=HTML"
    Again when i click on the link i get page not found errors. ANy clues?
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by the oracle reports team:
    hello,
    did you try to specify the whole URL for testing ... without using the cgicmd.dat ?
    and i hope the part in the URL .../dev60gci/rw... is just a typo in this message ;-) it should say .../dev60cgi/...
    regards,
    the oracle reports team<HR></BLOCKQUOTE>
    Yes it is working when i pass the whole thing throught the html string. What i am trying to avoid is the db autho betting passed. I would like to require none what so ever and let the Apache Server do that bidding. But i understand that i have to use the .dat file and i can't make it work for me.
    null

  • Is not null and null join

    Hi, I am trying to properly display a list of tasks for a project however without a join to the project number (which I was aware of) and the employee table, I get over 500 results.
    The task can be created without a employee assigned to it so therefore the page does not require the field to be filled in.
    Here is the SQL code, any does anyone have any ideas?
    select
        pd.pk_proj_detail_id    "Task Number",
        pd.task_title           "Task Title",
        pd.DETAIL_STATUS        "Task Status",
        pm.name                 "Associated Project",
        pps.last_name||', '||pps.first_name||', '||pps.middle_initial||'.' "Assigned Employee",
        pd.TRACKIT_NUMBER       "TrackIt! Number",
        pd.CREATEBY_DATE        "Date Entered",
        pd.DATE_BEGIN           "Date Began",
        pd.ESTIMATED_DATE       "Estimated Completion Date",
        pd.DATE_END             "Date Completed"
    from
        PROTRAC_DETAIL pd,
        protrac_master pm,
        cobr.vw_pps_payroll pps,
        resources r
    where
        pd.fk_proj_master_id = pm.PK_PROJ_MASTER_ID
        and r.fk_master_id = pm.PK_PROJ_MASTER_ID
        and (r.emp_id = pps.emple_no
            or r.emp_id is null)

    It's 10g r2 with Application Express 3.1.0.00.32
    This is the tasks (detail) table
    ALTER TABLE PROTRAC_DETAIL
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PROTRAC_DETAIL CASCADE CONSTRAINTS;
    CREATE TABLE PROTRAC_DETAIL
      PK_PROJ_DETAIL_ID      NUMBER                 NOT NULL,
      FK_PROJ_MASTER_ID      NUMBER,
      TRACKIT_NUMBER         NUMBER,
      DETAIL_DESCRIPTION     VARCHAR2(4000 CHAR),
      DETAIL_STATUS          VARCHAR2(19 CHAR),
      DETAIL_STATUS_COMMENT  VARCHAR2(4000 CHAR),
      DATE_BEGIN             DATE,
      DATE_END               DATE,
      ESTIMATED_DATE         DATE,
      CREATEBY_DATE          DATE,
      CREATEBY_USER          VARCHAR2(50 CHAR),
      LASTMOD_DATE           DATE,
      LASTMOD_USER           VARCHAR2(50 CHAR),
      TASK_TITLE             VARCHAR2(100 CHAR)
    TABLESPACE DEVPROTRAC_DATA
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE UNIQUE INDEX PROTRAC_DETAIL_PK ON PROTRAC_DETAIL
    (PK_PROJ_DETAIL_ID)
    TABLESPACE DEVPROTRAC_DATA
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE OR REPLACE TRIGGER BUI_PROTRAC_DETAIL
    before insert or update
    on PROTRAC_DETAIL
    referencing new as New old as Old
    for each row
    begin
        if inserting then
            select users_seq.nextval, sysdate, apex_application.g_user
                into :new.pk_proj_detail_id, :new.createby_date, :new.createby_user
                from dual;
        elsif updating then
            select sysdate, apex_application.g_user
                into :new.lastmod_date, :new.lastmod_user
                from dual;
        end if;
    end;
    SHOW ERRORS;
    ALTER TABLE PROTRAC_DETAIL ADD (
      CONSTRAINT PROTRAC_DETAIL_PK
    PRIMARY KEY
    (PK_PROJ_DETAIL_ID)
        USING INDEX
        TABLESPACE DEVPROTRAC_DATA
        PCTFREE    10
        INITRANS   2
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    MINEXTENTS       1
                    MAXEXTENTS       2147483645
                    PCTINCREASE      0
    ALTER TABLE PROTRAC_DETAIL ADD (
      CONSTRAINT PROTRAC_DETAIL_NUM
    FOREIGN KEY (FK_PROJ_MASTER_ID)
    REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
    ALTER TABLE DEVPROTRAC.RESOURCES ADD (
      FOREIGN KEY (FK_DETAIL_ID)
    REFERENCES DEVPROTRAC.PROTRAC_DETAIL (PK_PROJ_DETAIL_ID));
    SET DEFINE OFF;
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (34, 24, NULL, 'test', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/30/2008 13:37:01', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:35', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'bananana');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (41, 40, NULL, '2354234', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/31/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 13:52:02', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', 'I can type on the keyboarddf');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (49, 32, 78888, 'one day fishsticks will walk on the moon.', 'Queued',
        'waiting for fishsticks.', NULL, NULL, NULL, TO_DATE('11/03/2008 11:28:11', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', NULL, NULL, 'Fix the keyboard');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (50, 38, NULL, 'dfdfdfdfdfdfdfdfdf', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 12:03:06', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:44', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'resreeeeeeeeee');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (33, 31, NULL, 'Make sure the bananas are fresh', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/29/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:52', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'e543563465');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (48, 37, NULL, 'guitar heros! yay', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 11:26:06', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:57', 'MM/DD/YYYY HH24:MI:SS'), NULL, '34444444444444543etfg');
    COMMIT;This is for the resources table:
    ALTER TABLE RESOURCES
    DROP PRIMARY KEY CASCADE;
    DROP TABLE RESOURCES CASCADE CONSTRAINTS;
    CREATE TABLE RESOURCES
      PK_RESOURCES_ID   NUMBER,
      FK_DETAIL_ID      NUMBER,
      EMP_ID            NUMBER,
      RESOURCE_STATUS   VARCHAR2(8 CHAR),
      RESOURCE_COMMENT  VARCHAR2(4000 CHAR),
      CREATEBY_DATE     DATE,
      CREATEBY_USER     VARCHAR2(50 CHAR),
      LASTMOD_DATE      DATE,
      LASTMOD_USER      VARCHAR2(50 CHAR),
      FK_MASTER_ID      NUMBER
    TABLESPACE DEVPROTRAC_DATA
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE UNIQUE INDEX RESOURCES_PK ON RESOURCES
    (PK_RESOURCES_ID)
    TABLESPACE DEVPROTRAC_DATA
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE OR REPLACE TRIGGER BUI_RESOURCES
    before insert or update
    on RESOURCES
    referencing new as New old as Old
    for each row
    begin
        if inserting then
            select users_seq.nextval, sysdate, apex_application.g_user
                into :new.pk_resources_id, :new.createby_date, :new.createby_user
                from dual;
        elsif updating then
            select sysdate, apex_application.g_user
                into :new.lastmod_date, :new.lastmod_user
                from dual;
        end if;
    end;
    SHOW ERRORS;
    ALTER TABLE RESOURCES ADD (
      CONSTRAINT RESOURCES_PK
    PRIMARY KEY
    (PK_RESOURCES_ID)
        USING INDEX
        TABLESPACE DEVPROTRAC_DATA
        PCTFREE    10
        INITRANS   2
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    MINEXTENTS       1
                    MAXEXTENTS       2147483645
                    PCTINCREASE      0
    ALTER TABLE RESOURCES ADD (
      FOREIGN KEY (FK_DETAIL_ID)
    REFERENCES PROTRAC_DETAIL (PK_PROJ_DETAIL_ID),
      FOREIGN KEY (FK_MASTER_ID)
    REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
    SET DEFINE OFF;
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (53, 50, 356654, 'Active', NULL,
        TO_DATE('11/04/2008 09:32:06', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, NULL);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (51, 41, 447250, 'Active', 'No Sure.',
        TO_DATE('11/03/2008 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('11/04/2008 09:00:04', 'MM/DD/YYYY HH24:MI:SS'), NULL, 40);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (54, 50, 323829, 'Active', NULL,
        TO_DATE('11/04/2008 10:26:08', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, 38);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (52, 33, 8915, 'Active', 'get to work',
        TO_DATE('11/03/2008 15:20:18', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', TO_DATE('11/03/2008 15:35:10', 'MM/DD/YYYY HH24:MI:SS'), NULL, NULL);
    COMMIT;The results I want is everything above regardless of emp_id assigned (if any). Without the r.emp_id = pps.emple_no join, the query will generate 234234239482304234 results.
    Hope this helps.
    Edited by: leland on Nov 4, 2008 12:56 PM

  • File not found error

    I get the following error, but don't know why it can't find the file. Is there anything in this script that would call "\" instead of "/"? Is there any line of code that will switch a wayward "\" back?
    01-09-24 09:37:02 - path="" :jsp: init
    2001-09-24 09:43:42 - path="" :LoginServlet: init
    2001-09-24 09:44:15 - path="" :CourseServlet: init
    2001-09-24 09:46:48 - path="" :LessonServlet: init
    2001-09-24 09:46:54 - path="" :Error: /usr/local/apache/sites/tesco.spinweb.net/htdocs/cmi/courses\Food Service/Intro/AU00.html (No such file or directory)
    The script is below. Thanks for any help anyone can provide me.
    import cmi.xml.AU;
    import cmi.xml.Block;
    import cmi.xml.CourseReader;
    import cmi.xml.CSFElement;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletOutputStream;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServlet;
    import org.jdom.JDOMException;
    public class LessonServlet extends HttpServlet
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    try {
                   Class.forName (GlobalData.DatabaseDriverName);
                   _jdbcConnection = DriverManager.getConnection (GlobalData.DatabaseName, "tesco", "scorm");
    _jdbcConnection.setAutoCommit (true);
    //should I do this?
    //_jdbcConnection.setAutoCommit (false);
    //load serialized course data
    loadCourseData();
              catch (Exception xcp) {
                   xcp.printStackTrace();     
                   getServletContext().log("Error: " + xcp.getMessage());     
    public void doGet( HttpServletRequest request,
                             HttpServletResponse response)
              throws ServletException, IOException
    boolean normalMode = true;
    try {
    HttpSession session = request.getSession (true);
    //can I load the session given the id??
    //System.out.println ("Lesson.valid session " + session.getId() + ": " + request.isRequestedSessionIdValid());
    response.setContentType ("text/html");
    JDBCHelper dbHelper = new JDBCHelper (_jdbcConnection);
    //get student ID
    Integer studentID = (Integer) session.getAttribute ("studentID");
    //get course ID
    Integer courseID = (Integer) session.getAttribute ("courseID");
    //get lesson ID
    String lessonID = request.getParameter ("lessonID");
    if (lessonID == null) {
    lessonID = (String) session.getAttribute ("lessonID");
    if (studentID == null || courseID == null || lessonID == null) {
    //reset session data by re-logging the user
    sendProfileError (response.getOutputStream());
    return;
    //store lesson ID in session
    session.setAttribute ("lessonID", lessonID);
    String auID = request.getParameter ("auID");
    String mode = request.getParameter ("mode");
    if (mode != null) {
    session.setAttribute ("mode", mode);
    else {
    mode = (String) session.getAttribute ("mode");
    if (mode.equalsIgnoreCase ("review")) {
    normalMode = false;
    else {
    normalMode = true;
    //synchronize access to course hash table
    synchronized (_courseHash)
    //make sure _courseHash is in tact
    if (_courseHash == null) {
    //try reloading it....
    loadCourseData();
    if (_courseHash == null) {
    //error
    response.getOutputStream().close();
    throw new IOException ("Corrupt course data");
    if (! _courseHash.containsKey (courseID.toString())) {
    //try reloading it....
    loadCourseData();
    if (! _courseHash.containsKey (courseID.toString())) {
    //error
    response.getOutputStream().close();
    throw new IOException ("Corrupt course data (course not found)");
    if (auID == null) {
    //show course menu
    Hashtable hash = (Hashtable) _courseHash.get (courseID.toString());
    sendAvailableAUs (hash, studentID.intValue(), courseID.intValue(), lessonID, response.getOutputStream(), response, dbHelper);
    return;
    //if AU has not been attempted, initialize it
    Integer auDataID = new Integer (getAUDataID (studentID.intValue(), courseID.intValue(), lessonID, auID, dbHelper));
    //if (getAUDataID (studentID.intValue(), courseID.intValue(), lessonID, auID, dbHelper) == -1) {
    if (auDataID.intValue() == -1) {
    int newID = initializeAUData (studentID.intValue(), courseID.intValue(), lessonID, auID, dbHelper);
    dbHelper.addAUToPath (studentID.intValue(), courseID.intValue(), lessonID, auID);
    auDataID = new Integer (newID);
    session.setAttribute ("AUID", auID);
    session.setAttribute ("AUDataID", auDataID);
    sendAU (studentID.intValue(), courseID.intValue(), lessonID, auID, auDataID.intValue(), normalMode, response.getOutputStream(), dbHelper);
    //to do: detailed messages should be sent to the client depending on which
    // exception was thrown. Don't have one try/catch....have one for each situation
    catch (Exception e) {
    e.printStackTrace();
                   getServletContext().log("Error: " + e.getMessage());
    public void destroy()
              try {
                   if (_jdbcConnection != null) {
                        _jdbcConnection.close();
              catch (Exception ignored) {}
    private int initializeAUData (int studentID, int courseID, String lessonID, String auID, JDBCHelper dbHelper)
    String sqlQuery = null;
    ResultSet results = null;
    try {
    //get student's name
    sqlQuery = "SELECT Full_Name" +
    " FROM " + GlobalData.StudentTable +
    " WHERE Student_ID = " + studentID;
    results = dbHelper.doQuery (sqlQuery);
    if (! results.next()) {
    //error
    return -1;
    String studentName = results.getString (1);
    results.close();
    //the lock prevents CMIServlet from reading AU_ID before it's committed
    //sqlQuery = "LOCK TABLES " + GlobalData.AUDataTable + " WRITE;";
    //System.out.println (sqlQuery);
    //dbHelper.executeUpdate (sqlQuery);
    sqlQuery = "Insert Into " + GlobalData.AUDataTable +
    "(Course_ID, Lesson_ID, AU_ID, student_id, student_name, lesson_location, credit," +
    " lesson_status, entry, exit, score_raw, score_max, score_min, total_time," +
    " session_time, lesson_mode, suspend_data, launch_data, Evaluation_ID, Objective_ID)" +
    " Values (" + courseID + ", '" + lessonID + "', '" + auID + "', " + studentID + ", '" + studentName + "'," +
    " 'NA', 'credit'," + " 'not attempted', 'ab-initio', " + "'NA', " + 0 + ", " + 0 + ", " + 0 +
    ", '00:00:00.0', '00:00:00.0', " + " 'normal'" + ", 'NA', " + "'NA', " + 0 + ", " + 0 + ");";
    dbHelper.executeUpdate (sqlQuery);
    return getAUDataID (studentID, courseID, lessonID,auID, dbHelper);
    //sqlQuery = "UNLOCK TABLES;";
    //System.out.println (sqlQuery);
    //dbHelper.executeUpdate (sqlQuery);
    catch (Exception e) {
    e.printStackTrace();
                   getServletContext().log("Error: " + e.getMessage());
    return -1;
    private int getAUDataID (int studentID, int courseID, String lessonID, String auID, JDBCHelper dbHelper)
    throws SQLException
    String sqlQuery = "SELECT AUData_ID, lesson_status, lesson_mode, exit" +
                                  " FROM " + GlobalData.AUDataTable +
                                  " WHERE student_id = " + studentID +
                                  " AND Course_ID = " + courseID +
    " AND Lesson_ID = " + "'" + lessonID + "'" +
    " AND AU_ID = '" + auID + "';";
    ResultSet results = dbHelper.doQuery (sqlQuery);
    if (results.next()) {
    return results.getInt ("AUData_ID");
    return -1;
    private void sendAU (int studentID, int courseID, String lessonID, String auID, int auDataID, boolean normalMode, ServletOutputStream htmlOut, JDBCHelper dbHelper)
    throws IOException, ClassNotFoundException
    Hashtable hash = null;
    synchronized (_courseHash)
    hash = (Hashtable) _courseHash.get (String.valueOf (courseID));       
    if (hash == null) {
    loadCourseData();
    hash = (Hashtable) _courseHash.get (String.valueOf (courseID));
    if (hash == null) {
    throw new IOException ("Corrupt course data (course not found)");
    AU au = (AU) hash.get (auID);
    try {
    if (! normalMode) {
    dbHelper.setReviewMode (auDataID);
    String courseFileName = getFileName (String.valueOf (courseID), dbHelper);
    File file = new File (courseFileName);
    //create absolute path to file so we can resolve relative URLs
    String newFileName = file.getParent() + "\\" + au.getLaunchParams();
                   BufferedReader buf = new BufferedReader (new FileReader (newFileName));
    PrintWriter htmlWriter = new PrintWriter (htmlOut);
                   String temp;
    htmlWriter.write (getAUHtml (au.getLaunchParams()));
    htmlWriter.flush();
    htmlWriter.close();
    catch (Exception e) {
    e.printStackTrace();
                   getServletContext().log("Error: " + e.getMessage());
    private String getAUHtml (String path){
    path = path.replace ('\\','/');
    String response;
    response = "<html>\n" +
                        "<head>\n" +
    "</head>\n" +
    "<body>\n" +
    "<script language=\"JavaScript\">\n" +
    "document.location = \"/cmi/courses/" + path + "\"\n" +
    //"win = window.open ('','displayWindow','menubar=yes,scrollbars=yes,status=yes,width=300,height=300');\n" +
    //"window.onload = \"win.close();\"" +
    "</script>\n" +
    "</body>\n" +
    "</html>\n";
    return response;
    private void sendAvailableAUs (Hashtable hash, int studentID, int courseID, String lessonID, ServletOutputStream out, HttpServletResponse response, JDBCHelper dbHelper)
    StringBuffer buf = new StringBuffer (200);
    Block block = (Block) hash.get (lessonID);
    AU au = null;
    try {
    Vector completedAUs = dbHelper.getCompletedAUs (studentID, courseID, lessonID);
    buf.append ("<html>\n" +
                        "<head>\n" +
    "<title>" + block.getTitle() + " units</title>\n" +
    "<script language=\"JavaScript\">\n" +
    "function go() {\n" +
    " var form = document.goForm;\n" +
    " var index = form.gotoSelect.selectedIndex;\n" +
    " if (index == 0) {\n" +
    " document.location = \"/servlet/CourseServlet?courseID=" + courseID + "\";\n" +
    " }\n" +
    " else if (index == 1) {\n" +
    " top.restart();\n" +
    " }\n" +
    "}\n" +
    "</script>\n" +
    "</head>\n" +
    "<body background=\"/cmi/images/marble.jpg\">\n" +
    "<center><h1><b><u>" + block.getTitle() + "</u></b></h1></center>\n" +
    "<p></p>\n<p></p>\n" +
    "<b>" + block.getTitle() + " contains the following units: </b>\n" +
    "<dl>\n");
    Enumeration enum = block.getChildren();
    while (enum.hasMoreElements()) {
    String temp = (String) enum.nextElement();
    CSFElement element = (CSFElement) hash.get (temp);
    if (element.getType().equals ("au")) {
    au = (AU) element;
    if (completedAUs.contains (au.getID())) {
    buf.append ("<dt><p><img src=\"/cmi/images/node2.gif\"><a href=\"/servlet/LessonServlet?lessonID=" + block.getID() + "&auID=" + au.getID() + "&mode=review\">" + au.getTitle() + " (<i>review</i>) </a></p></dt>\n");
    else {
    buf.append ("<dt><p><img src=\"/cmi/images/node.gif\"><a href=\"" + response.encodeURL ("/servlet/LessonServlet?lessonID=" + block.getID() + "&auID=" + au.getID() + "&mode=normal") + "\">" + au.getTitle() + "</a></p></dt>\n");
    else if (element.getType().equals ("block")) {
    buf.append ("<dt><p><img src=\"/cmi/images/folder.gif\"><a href=\"" + response.encodeURL ("/servlet/LessonServlet?lessonID=" + element.getID() + "&mode=normal") + "\">" + element.getTitle() + "</a></p></dt>\n");
    buf.append ("</dl>\n" +
    "<br><br>\n" +
    "<form name=\"goForm\">\n" +
    "<select name=\"gotoSelect\">\n" +
    " <option value=\"lesson\">Lesson Menu</option>\n" +
    " <option value=\"exit\">Exit LMS</option>\n" +
    "</select>\n" +
    "<input type=\"button\" value=\"Go\" onClick=\"go()\">\n" +
    "</form>\n" +
    "</body>\n" +
    "</html>");
    PrintWriter writer = new PrintWriter (out);
    writer.write (buf.toString());
    writer.flush();
    writer.close();
    catch (Exception e) {
    e.printStackTrace();
                   getServletContext().log("Error: " + e.getMessage());
    private String getFileName (String courseID, JDBCHelper dbHelper)
    throws ClassNotFoundException, SQLException
              ResultSet results = null;
              String fileName = null;
    String sqlQuery = "SELECT CourseFile" +
                                  " FROM Course" +
                                  " WHERE Course_ID = " + Integer.parseInt (courseID) + ";";
    results = dbHelper.doQuery (sqlQuery);
              if (results.next()) {
                   fileName = results.getString (1);
              else {
    //need to do more than this :)
                   System.out.println("crap");
    results.close();
    return fileName;
    private void loadCourseData()
    throws IOException, ClassNotFoundException
    //load serialized course data
    File file = new File (GlobalData.DataFileName);
    if (! file.exists()) {
    //error
    throw new FileNotFoundException (GlobalData.DataFileName + " not found.");
    FileInputStream fis = new FileInputStream (GlobalData.DataFileName);
    ObjectInputStream ois = new ObjectInputStream (fis);
    _courseHash = (Hashtable) ois.readObject();
    ois.close();
    private void sendProfileError (ServletOutputStream out)
    String html = "<html>\n" +
    "<body>\n" +
    "<p>An error has occurred with your profile. Please " +
    "<a href=\"\" onClick=\"top.restart(); return true\">login again</a>" +
    "</body>\n" +
    "</html>\n";
    PrintWriter writer = new PrintWriter (out);
    writer.write (html);
    writer.flush();
    writer.close();
    private Connection _jdbcConnection;
    private Hashtable _courseHash;

    I know that is where my error is, but why and where is
    the script calling it up way?You wrote it right? check out the sendAU() method, there is line
    String newFileName = file.getParent() + "\\" + au.getLaunchParams();

  • 'UIComponent is null' error while opening a tab in ADF

    Hi,
    I am using JDeveloper 11.1.1.5.0
    I am navigating from one ADF page to other in my ADF task flow. 2nd ADF page is having multiple tabs with showDetailItem. My requirement is that i need to open a particular tab in 2nd page from 1st page
    (1st page) ---> (2nd page) (here a particular tab should open)
    I have made use of NavigationHandler in my code which is working fine. But when I am trying to open a tab during navigation, I am getting 'UIComponent is null' error. below is the code I am using
        public void openDataTab(ActionEvent actionEvent) {
            NavigationHandler nvHndlr = FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
            nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, "showOverview");
            AdfFacesContext.getCurrentInstance().addPartialTarget(panelTabbed);  //getting 'UIComponent is null' error here
            dataTab.setDisclosed(true);
            transactionTab.setDisclosed(false);
        }I am getting the error only for the first time. From second time onwards, the functionality is working fine.
    Please let me know how to resolve this error.
    regards,
    Rajan

    Hi,
    this code should not be used for navigation as it bypasses JSF lifecycle methods
    //don't use
    NavigationHandler nvHndlr = FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
    nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, "showOverview");
    To solve your issue, add a managed bean in pageFlowScope or use an attribute inpageFlowScope that you use to identify the tab to be opened. Then in the second page, use the "disclosed" property on the showdetailItems to evaluate the pageFlowScope information and then return true or false respectively. The tab that evaluates to "true" will be opened.
    Frank
    Ps.: JSF component trees are created upon render response phase, which is why your programmatic attempt (which happens during invoke_application phase fails

  • While running a report through workspace getting "Null" error

    While running a report through workspace i am getting "Null" error.i have checekd the db connection and also access to hfm.
    Thanks

    Hi Raj,
    There are a few OSS Notes for your issue.
    If your Query has hierarchy in it then check 734184
    If your query is based on Infoset then check Note 784502 and 701941.
    Also check 668921.
    Bye
    Dinesh

  • BOOLEAN DEFAULT FALSE NOT NULL for key-column

    Hello,
    These statements show an unexpected behavior when a column is added to a table as 'BOOLEAN DEFAULT FALSE NOT NULL' and added afterward to the table's primary key column set:
    create table test_1 (a char(1))
    insert into test_1 values('A')
    alter table test_1 add b boolean default false not null
    alter table test_1 add primary key (a,b)
    create table test_2 (a char(1), b boolean default false not null)
    insert into test_2 (a) values('A')
    alter table test_2 add foreign key f_test_1 (a,b) references test_1 (a,b)
          -> [350]: Referential integrity violated
    update test_1 set b=false
    alter table test_2 add foreign key f_test_1 (a,b) references test_1 (a,b)
          -> success
    delete from test_2
    delete from test_1
    insert into test_1 (a,b) values('A',false)
    insert into test_2 (a) values('A')
          -> success
    I think the error message '[350] Referential integrity violated' should not happen because the column 'b' really contains 'false'. But there obviously seem to be a difference before and after setting the column 'b' explicitly to 'false'. I can imagine that this depends on the way how the index for the primary key is updated. Probably the index is not properly updated in this context(?)
    Gabriel

    Hi Gabriel,
    you're right, this is a bug and indeed seems to caused by the way the DEFAULT boolean is stored in the page.
    (There is no separate index for the primary key in MaxDB as all data is stored in B*trees - basically the table is the primary key).
    This is how the record looks like when column b is 'false' only due to the change of the DEFAULT value:
    ROOT/LEAF 460  perm       entries : 1         [block 0]
         bottom  : 93         filevers: 14888     convvers: 83
                                                  writecnt: 1
      1: (pos 00081)
    00001      recLen      : 12                recKeyLen   : 4
    00005      recVarcolOff: 0                 recVarcolCnt: 0
         record
          1  2  3  4  5  6  7  8  9 10 11 12
         81 82 83 84 85 86 87 88 89 90 91 92
    dec: 12  0  4  0  0  0  0  0 32 65  0  0
    hex: 0C 00 04 00 00 00 00 00 20 41 00 00
    chr:                             A
    And this is how it looks like after the explicit UPDATE:
    ROOT/LEAF 460  perm       entries : 1         [block 0]
         bottom  : 93         filevers: 14888     convvers: 84
                                                  writecnt: 2
      1: (pos 00081)
    00001      recLen      : 11                recKeyLen   : 3
    00005      recVarcolOff: 0                 recVarcolCnt: 0
         record
          1  2  3  4  5  6  7  8  9 10 11
         81 82 83 84 85 86 87 88 89 90 91
    dec: 11  0  3  0  0  0  0  0 32 65  0
    hex: 0B 00 03 00 00 00 00 00 20 41 00
    chr:                             A
    Little difference but this leads to the problems during the foreign key validation.
    I'll inform the developers next week about this.
    As a workaround you'll have to explicitly update the columns for which you change the default setting.
    regards,
    Lars

  • Alter Table Add column not null default value

    I want to add two columns to a table with not null and default as 0 for both columns
    Can i write the whole in one statement or do i have to split statement
    I tried this, but didn't work
    alter table DWSODS01.DWT00301_ORD_DTL_OMS add (
    COMB_ORD_FLG NUMBER(5,0) default 0 not null,
    COMB_ORD_NO NUMBER(12,0)
    default 0 not null);
    How can i modify the code?

    user10390682 wrote:
    I tried this, but didn't workSince you are specifying default values, it should work (regardless if table DWSODS01.DWT00301_ORD_DTL_OMS is empty or not):
    SQL> select count(*) from emp1
      2  /
      COUNT(*)
            14
    SQL> alter table emp1 add (
      2  COMB_ORD_FLG NUMBER(5,0) default 0 not null,
      3  COMB_ORD_NO NUMBER(12,0)
      4  default 0 not null);
    Table altered.
    SQL> desc emp1
    Name                                      Null?    Type
    EMPNO                                              NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    COMB_ORD_FLG                              NOT NULL NUMBER(5)
    COMB_ORD_NO                               NOT NULL NUMBER(12)
    SQL> What error are you getting?
    SY.

  • Empty string in NOT NULL column

    I'm migrating data to Oracle 9i from a database engine that supports emtpy strings in column with NOT NULL specified in the DDL. I would have thought Oracle would support this, but any attempt to put empty string data into a column created with NOT NULL is returning a 'column does not support nulls'-type error.
    Is there an option to allow this, or does Oracle simply not support this and assumes blank is null?
    Thanks

    I would have thought Oracle would support this, but any attempt to put empty string data into a column created with NOT NULL is returning a 'column does not support nulls'-type error.In Oracle Null means null nothing not even an empty String.
    Yes DB's like Ingress supports this. But I think Oracle is right.
    Is there an option to allow this, or does Oracle simply not support this and assumes blank is null?I am not aware of any options as it is against the basic principles.
    you can find work arounds to do the migration. But storing a blank NO.
    Good Luck
    Vij

  • To Check column is NOT NULL

    Hi
    I am trying to find out whether table column is NOT NULL or Not using ALL_CONSTRAINTS VIEW.But the problem is I am getting 'C' for the columns with NOT NULL and the columns with Check constraint. IF I want to find out the column is NOT NULL or not what is the best way.Help is appreciated.
    thanks
    srinivas vundi

    Hi
    Inorder to filter the records I am trying to use SUBSTR(SEARCH_CONDITION,-4) LIKE 'NOT NULL'.But it is throwing error. How do I filter the records where value is '%NOT NULL'. Please respond .
    thanks
    srinivas

Maybe you are looking for

  • Problem with application and storage and memory.

    I NEED HELP!! I am trying to add more application s to my Blackberry Curve 8330. My problem is I don't have enough storage to even add a couple of application s and their updates to my phone. I have an 8GB media card with like 7.3GB of free space. Al

  • EFI Firmware 1.7 on't update on late 2012 Mac Mini

    I bought a 500 GB i5 Mac Mini last Dec. I set it up and updated it to 10.8.2 and updated the EFI Firmware to 1.7 to cover the HDMI flicker issues. But I decided that I wanted to start over from scratch so I re partitioned and did a clean install of M

  • Css centering layout problem

    Hi, I'm building a website from a photoshop design and I have a problem with the layout I can't see how to fix: I have a header and a footer which both need to stay centered and expand to whatever the browser window width is set to. Between them I ha

  • [FIXED!] tearing in sdl (GL) apps

    Problem: If you have compositing extension enabled, sdl 1.2 based opengl apps will produce tearing unless you manage to disable backing store. Causes: * In the past SDL relied on the environment variable: SDL_VIDEO_X11_BACKINGSTORE to enable backing

  • Quantity field conversion problem in SAP script

    Hi experts, I have problem with sap script quantity field conversion. In purchase order the actual value of field( MDPM-ERFMG) is 3,500. But in Print preview it is showing only 3.5 Any one Please help me in this problem thanks in advance murali