Use of DBMS_OUTPUT.GET_LINE to debug triggers

I states in the PL/SQL Users Guide and Reference (page 9-16):
"Package DBMS_OUTPUT enables you to display output from PL/SQL blocks and subprograms, which makes it easier to test and debug them. The procedure put_line outputs information to a buffer in the SGA. You display the information Overview of Product-Specific Packages by calling the procedure get_line or by setting SERVEROUTPUT ON in SQL*Plus."
Also in Supplied PL/SQL Packages and Types Reference it states:
"A trigger might want to print out some debugging information. To do this, the trigger would do:
DBMS_OUTPUT.PUT_LINE(I got here:||:new.col|| is the new value);
If you have enabled the DBMS_OUTPUT package, then this PUT_LINE would be buffered, and you could, after executing the statement (presumably some INSERT, DELETE, or UPDATE that caused the trigger to fire), get the line of information back.
For example:
BEGIN
DBMS_OUTPUT.GET_LINE(:buffer, :status);
END;
It could then display the buffer on the screen. You repeat calls to GET_LINE until status comes back as nonzero. For better performance, you should use calls to GET_LINES which can return an array of lines."
I have tried to use this, but cannot get anything out. I do not find any actual examples in any of the docs on how to use this.
Jim Azeltine
[email protected]

With SET SERVEROUTPUT ON, it causes the usage of DBMS_OUPUT.PUT_LINE to display automatically. With SET SERVEROUPUT OFF, you have to use DBMS_OUPUT.ENABLE to allow things from DBMS_OUTPUT.PUT_LINE to be stored to a buffer and DBMS_OUTPUT.GET_LINE or DBMS_OUTPUT.GET_LINES to retrieve the items from the buffer into variables and use PRINT or SET AUTOPRINT ON or something to display them. I have always just used SET SERVEROUTPUT ON, however I imagine the other method might be useful under certain circumstances where you want to store the values to variables or enter the values into audit tables or something other than just display them directly to the screen. There are also many environments where SET SERVEROUTPUT ON cannot be used, since it is a SQL*Plus command. Below I have given, first, an example of usage of SET SERVEROUTPUT ON, then, second, an example with SET SERVEROUTPUT OFF, that uses DBMS_OUTPUT.ENABLE and DBMS_OUTPUT.GET_LINE and SET AUTOPRINT ON.
SQL> SET ECHO ON
SQL> -- trigger for demonstration:
SQL> CREATE OR REPLACE TRIGGER test_trigger
  2    BEFORE INSERT ON anytable
  3    FOR EACH ROW
  4  BEGIN
  5    DBMS_OUTPUT.PUT_LINE ('I got here: '
  6                          || :NEW.anycolumn
  7                          || ' is the new value.');
  8    :NEW.anycolumn := 0;
  9    DBMS_OUTPUT.PUT_LINE ('I got here: '
10                          || :NEW.anycolumn
11                          || ' is the new value.');
12  END test_trigger;
13  /
Trigger created.
SQL>
SQL>
SQL> -- example with serverouput on
SQL> SET SERVEROUTPUT ON
SQL> INSERT INTO anytable VALUES (1)
  2  /
I got here: 1 is the new value.
I got here: 0 is the new value.
1 row created.
SQL>
SQL>
SQL> -- example with serveroutput off:
SQL> SET SERVEROUTPUT OFF
SQL> EXECUTE DBMS_OUTPUT.ENABLE (40)
PL/SQL procedure successfully completed.
SQL> INSERT INTO anytable VALUES (1)
  2  /
1 row created.
SQL> VARIABLE buffer VARCHAR2 (40)
SQL> VARIABLE status NUMBER
SQL> SET AUTOPRINT ON
SQL> BEGIN
  2    DBMS_OUTPUT.GET_LINE(:buffer, :status);
  3  END;
  4  /
PL/SQL procedure successfully completed.
    STATUS
         0
BUFFER
I got here: 1 is the new value.
SQL> BEGIN
  2    DBMS_OUTPUT.GET_LINE(:buffer, :status);
  3  END;
  4  /
PL/SQL procedure successfully completed.
    STATUS
         0
BUFFER
I got here: 0 is the new value.
SQL> BEGIN
  2    DBMS_OUTPUT.GET_LINE(:buffer, :status);
  3  END;
  4  /
PL/SQL procedure successfully completed.
    STATUS
         1
BUFFER
SQL>

Similar Messages

  • Inconsistent Results from dbms_output.get_lines

    Hi,
    I am getting inconsistent results from using dbms_output.get_lines.
    I'm using get_lines in a procedure A that executes a function B to test if the function returns 0 or > 0 to indicate validity of my data. In that function, I use dbms_output.put_lines to communicate data points that I want to use. My procedure A does a get_lines after executing function B then either logs the lines into a table or sends an email.
    Right now, get_lines is behaving sporadically for me. Sometimes I the chararr returns some lines while other times it doesn't. The strange thing is numlines does return a value, and it's the value that I expected.
    Can someone please help?
    Thanks.

    Use parameters or even global package variables to transport data from one procedure to the other. dbms_output is not meant for this, it will not work.

  • How to use Mulitple DAQs with a single triggered event on only one of the DAQs

    I have three PXI6115 and would like to tie all these to a single triggered event on one of the DAQs. I've scaned the examples and any assistance would be greatly appreciated....

    TCjr,
    Please refer to your other post:
    How to use Multiple DAQs with a single triggered event on only one of the DAQs

  • Can I use "Adobe X Pro" to debug the java code in adobe forms?

    HI,
    Can I use "Adobe X Pro" to debug the java code in adobe forms?, if not how do i debug the java code written in the adobe form.

    I have the adobe acrobat x evaluation version installed, please find the print shot attached, I have pressed CTRL+J in the preview mode, but nothing came up.
    Am I doing something wrong..

  • HOWTO: Use BC4J With or Without DB Triggers

    This HowTo describes how to use BC4J, database sequences and triggers
    and what are the ramifications.
    INTRODUCTION
    BC4J has the ability to work with database sequences in order to obtain a
    unique value when inserting records. BC4J also has the ability to
    work either with a 'before insert' trigger which automatically creates
    a new unique value for the primary key or without a trigger. When not using
    a database trigger, BC4J also has the ability to obtain the sequence value
    and set the primary key value.
    Before discussing the ramifications of using one approach or the other, let's
    show examples of how to use both approaches:
    BC4J & sequences WITH a database trigger
    and
    BC4J & sequences WITHOUT a database trigger
    HOWTO DEMONSTRATION STEPS
    To illustrate both scenarios a simple database setup script is provided which
    creates two tables:
    CUSTOMER_NT which DOES NOT have a before insert trigger and
    CUSTOMER_WT which DOES have a trigger.
    Database Install Script:
    <code>
    drop trigger customer_insert_trigger;
    drop table customer_wt;
    drop table customer_nt;
    drop sequence customer_wt_seq;
    drop sequence customer_nt_seq;
    create sequence customer_wt_seq start with 1;
    create sequence customer_nt_seq start with 101;
    create table customer_wt(
    id number,
    name varchar2(30),
    constraint
    customer_wt_pk
    primary key (id)
    create table customer_nt(
    id number,
    name varchar2(30),
    constraint
    customer_nt_pk
    primary key (id)
    prompt Inserting data...
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Mickey');
    insert into customer_wt (id, name)
    values (customer_wt_seq.nextval, 'Goofy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Daffy');
    insert into customer_nt (id, name)
    values (customer_nt_seq.nextval, 'Porky');
    commit
    prompt Creating trigger
    create trigger customer_insert_trigger
    before insert on customer_wt for each row
    begin
    select customer_wt_seq.nextval into :new.id from dual ;
    end;
    </code>
    The next step is to create the DEFAULT Entity Objects and View Objects using
    the Business Components Wizard.
    USING BC4J WITH A DATABASE TRIGGER
    Let's modify the entity object CustomerWt so it can use the database trigger.
    Edit the entity object CustomerWt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox. This allows you to insert without a value for the primary key
    - Check 'Refresh after Insert'. This obtains the value from the database generated by the trigger.
    - Check 'Updateable While New'. Id is only updateable when inserting.
    Click finish to complete the wizard. Save all and recompile the project.
    Now let's test our work.
    In the navigator right-click the application module and select 'Test..'. This will launch
    BC4J's built in tester. Connect to the application.
    In the tester double-click the CustomerWtView view object to run a test edit form.
    After the edit form renders, navigate through the existing records using the navigate
    buttons on the edit form. Now let's insert a record to execute the trigger.
    click on the '+' button to insert a record. Enter a value in the 'Name' field and commit the change.
    Observe that a new value has automatically been inserted into the Id field.
    That's it! You have successfully used BC4J and a database trigger.
    Now let's try it without a trigger..
    USING BC4J WITHOUT A DATABASE TRIGGER
    Now edit the entity object CustomerNT so it doesn't need a database trigger.
    Similar to before, edit the entity object CustomerNt by right-clicking in the navigator.
    Click on the 'Attribute Settings' tab and edit the ID attribute.
    - Uncheck 'Mandatory'checkbox.
    - Check 'Updateable While New'.
    An additional step is also required. The Create method will have to be modified to extract
    the value of the sequence.
    In the Edit EntityObject Wizard click the Java tab and select Create method and click Finish.
    The create method is generated in your Java fil e. In the Workspace view of the Navigator,
    expand the CustomerNt entity object in the navigator. Double-click
    CustomerNtImpl.java to open it in the Source Editor. In the Structure pane, double-click
    create(AttributeList). Modify the Create method so it looks like this:
    <code>
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl s = new SequenceImpl("customer_nt_seq", getDBTransaction());
    Integer next = (Integer)s.getData();
    setId(new Number(next.intValue())); }
    </code>
    Save and compile the project.
    Now test the ViewObject CustomerNtView using the tester as before.
    In the edit form of CustomerNTView click on the '+' to insert a record. Observe that
    just as before a new value has automatically been inserted in the ID field!
    TO USE A DB TRIGGER OR NOT TO USE A DB TRIGGER.
    Using a Database trigger sometimes preferable if you have non BC4J applications
    also sharing the database. In this case it is still safest to just let the database
    update it's own primary keys.
    If you don't have any other non-BC4J applications sharing the database, then not using
    a database trigger is perfectly acceptable and can have slightly better performance.
    The important thing to remember is that the option is yours to use either approach!
    null

    Thank you for the reply Jonathon. I am using a ViewObject which
    consist of several tables. I haven't tried the DB trigger
    approach but just using the BC4 approach in overriding the
    create method.
    Here is the parent class create as a part of the
    FasNameImpl.java file which does the job correctly.
    public void create(AttributeList attributeList) {
    super.create(attributeList);
    SequenceImpl l_seq = new SequenceImpl
    ("SEQ_CUSTOMER_ID",getDBTransaction());
    Integer l_next = (Integer)l_seq.getData();
    setCustomerId(new Number(l_next.intValue()));
    This is when I triedpassing the value to the child table. But I
    can't figure it out. I think the link is working fine if I had a
    ViewLink deployed but it doesn't look like it's doing the job
    for ViewObject.
    I am trying to call the childclass.method
    (FasCustomer.setCustomerId(l_next);
    But I am getting error.
    Thanks a lot for your suggestions,
    Kamran
    703 696 1121

  • Exception Occur while Using Microsoft Visual Studio for Debugging JNI app.

    Hi all,
    My JNI program works fine. And also Visual Studio IDE allow to debug C++ program properly.
    But after each instance of program executation(Under Visual Studio IDE) I am getting following log file.
    ================================================================================================================
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d99f278, pid=4800, tid=1196
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode)
    # Problematic frame:
    # V [jvm.dll+0x12f278]
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x00446c00): JavaThread "main" [_thread_in_vm, id=1196]
    siginfo: ExceptionCode=0xc0000005, reading address 0x545c3a49
    Registers:
    EAX=0x545c3a45, EBX=0x00000000, ECX=0x004475c8, EDX=0x01bdf6a8
    ESP=0x01bdf69c, EBP=0x00447594, ESI=0x00446c00, EDI=0x00447594
    EIP=0x6d99f278, EFLAGS=0x00010202
    Top of Stack: (sp=0x01bdf69c)
    0x01bdf69c: 00447598 00446c00 000000b6 004475c8
    0x01bdf6ac: 004475c4 004475c0 004475bc 6d99f3d1
    0x01bdf6bc: 01bdf720 00447594 00447598 00000e00
    0x01bdf6cc: 00446c00 6d92a997 01bdf720 00447594
    0x01bdf6dc: 00447598 00000e00 000000b6 00446c00
    0x01bdf6ec: 00446c00 07e73fd9 01bdf768 000000b6
    0x01bdf6fc: 00446c00 00446c00 01bdf700 01c67cb4
    0x01bdf70c: 01bdf768 01bdf708 00447158 00447160
    Instructions: (pc=0x6d99f278)
    0x6d99f268: 4a 57 8b 7c 24 24 3b fb 75 04 33 c0 eb 05 8b 07
    0x6d99f278: 8b 40 04 50 56 8d 4c 24 38 e8 fa 89 ed ff 8b 4c
    Stack: [0x01b90000,0x01be0000), sp=0x01bdf69c, free space=317k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x12f278]
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j FILE_INFO_J.SetOutputFileName(Ljava/lang/String;)V+1
    v ~StubRoutines::call_stub
    j FILE_INFO_J.ReadBinaryFile(Ljava/lang/String;LFILE_INFO_J;)V+0
    j FILE_INFO_J.CopyBinaryFile(Ljava/lang/String;)V+3
    j FILE_INFO_J.main([Ljava/lang/String;)V+38
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0be19c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3888]
    0x0be18000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3752]
    0x0be0cc00 JavaThread "JDWP Event Helper Thread" daemon [_thread_blocked, id=1336]
    0x0be09800 JavaThread "JDWP Transport Listener: dt_socket" daemon [_thread_in_native, id=4848]
    0x0bdfbc00 JavaThread "Attach Listener" daemon [_thread_blocked, id=4160]
    0x0bdfac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1436]
    0x0bde8000 JavaThread "Finalizer" daemon [_thread_blocked, id=676]
    0x0bde6c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=4516]
    =>0x00446c00 JavaThread "main" [_thread_in_vm, id=1196]
    Other Threads:
    0x0bde3800 VMThread [id=4640]
    0x0be34c00 WatcherThread [id=5112]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 17K [0x03cd0000, 0x03dd0000, 0x041b0000)
    eden space 896K, 2% used [0x03cd0000, 0x03cd47c8, 0x03db0000)
    from space 64K, 0% used [0x03dc0000, 0x03dc0000, 0x03dd0000)
    to space 64K, 0% used [0x03db0000, 0x03db0000, 0x03dc0000)
    tenured generation total 11948K, used 7985K [0x041b0000, 0x04d5b000, 0x07cd0000)
    the space 11948K, 66% used [0x041b0000, 0x0497c5b8, 0x0497c600, 0x04d5b000)
    compacting perm gen total 12288K, used 1690K [0x07cd0000, 0x088d0000, 0x0bcd0000)
    the space 12288K, 13% used [0x07cd0000, 0x07e76a30, 0x07e76c00, 0x088d0000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\Program Files (x86)\Java\jdk1.6.0_02\bin\java.exe
    0x7d600000 - 0x7d6f0000      C:\WINDOWS\system32\ntdll.dll
    0x7d4c0000 - 0x7d5f0000      C:\WINDOWS\syswow64\kernel32.dll
    0x00350000 - 0x003eb000      C:\WINDOWS\syswow64\ADVAPI32.dll
    0x7da20000 - 0x7db00000      C:\WINDOWS\syswow64\RPCRT4.dll
    0x7d8d0000 - 0x7d920000      C:\WINDOWS\syswow64\Secur32.dll
    0x7c340000 - 0x7c396000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\msvcr71.dll
    0x6d870000 - 0x6dab9000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\client\jvm.dll
    0x7d930000 - 0x7da00000      C:\WINDOWS\syswow64\USER32.dll
    0x7d800000 - 0x7d890000      C:\WINDOWS\syswow64\GDI32.dll
    0x76aa0000 - 0x76acd000      C:\WINDOWS\system32\WINMM.dll
    0x7dee0000 - 0x7df40000      C:\WINDOWS\system32\IMM32.DLL
    0x6d3c0000 - 0x6d3c8000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\hpi.dll
    0x76b70000 - 0x76b7b000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d4b0000 - 0x6d4d9000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\jdwp.dll
    0x6d770000 - 0x6d776000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\npt.dll
    0x6d820000 - 0x6d82c000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\verify.dll
    0x6d460000 - 0x6d47f000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\java.dll
    0x6d860000 - 0x6d86f000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\zip.dll
    0x6d330000 - 0x6d337000      C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\dt_socket.dll
    0x71c00000 - 0x71c17000      C:\WINDOWS\system32\WS2_32.dll
    0x77ba0000 - 0x77bfa000      C:\WINDOWS\syswow64\msvcrt.dll
    0x71bf0000 - 0x71bf8000      C:\WINDOWS\system32\WS2HELP.dll
    0x10000000 - 0x10023000      C:\WINDOWS\system32\nvappfilter.dll
    0x77670000 - 0x777a9000      C:\WINDOWS\syswow64\ole32.dll
    0x0c150000 - 0x0c1db000      C:\WINDOWS\syswow64\OLEAUT32.dll
    0x7db30000 - 0x7dbb0000      C:\WINDOWS\system32\mswsock.dll
    0x5f270000 - 0x5f2ca000      C:\WINDOWS\system32\hnetcfg.dll
    0x71ae0000 - 0x71ae8000      C:\WINDOWS\System32\wshtcpip.dll
    0x7df50000 - 0x7dfc0000      C:\WINDOWS\system32\uxtheme.dll
    0x4b3c0000 - 0x4b410000      C:\WINDOWS\SysWOW64\MSCTF.dll
    0x777b0000 - 0x77833000      C:\WINDOWS\system32\CLBCatQ.DLL
    0x77010000 - 0x770d6000      C:\WINDOWS\system32\COMRes.dll
    0x77b90000 - 0x77b98000      C:\WINDOWS\syswow64\VERSION.dll
    0x0c500000 - 0x0c7c5000      C:\WINDOWS\system32\xpsp2res.dll
    0x75da0000 - 0x75e5d000      C:\WINDOWS\system32\SXS.DLL
    0x0cc60000 - 0x0ccc1000      E:\TI\Assignment_3\JNIFileOperation_C\Debug\JNIFileOperation.dll
    VM Arguments:
    jvm_args: -Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n
    java_command: FILE_INFO_J E:\Assignment_3\VC.pdf
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=D:\oracle\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files (x86)\Subversion\bin;C:\Program Files (x86)\Java\jdk1.6.0_02\bin;C:\Program Files (x86)\Java\jdk1.6.0_02\jre\bin\client;C:\Sun\SDK\bin;��!
    USERNAME=user
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=AMD64 Family 15 Model 47 Stepping 2, AuthenticAMD
    ================================================================================================================
    So please tell anyone could Figure out what is this file all about??
    Is this says to be worry about it .. or just provide information of current system status??
    I will be obliged to you if you would help me
    Thank you.

    This is exactly due to the memory stack.This error is entirely due to the native code.Check the native code,if there are data conversions handle them carefully
    and if you are passing an array see to that the array doesnt oveflow.
    Have some prints in the native code and watch the data transferred

  • Using ANSI sql in forms 9i triggers

    hi,
    could use some help here please!
    I am getting errors when trying to compile triggers in forms 9i against a 9i DB which include cursors or sql select's which are written using the ANSI join syntax.
    example:
    declare
    cursor cur_test is
    select dual1.dummy "dual1", dual2.dummy "dual2"
    from (dual dual1 inner join dual dual2 on dual1.dummy = dual2.dummy);
    begin
         null;
    end;
    when I try and compile I get error message "103" which seems to think that the SQL is not valid. If I put the same statements into recordgroups they will compile, and they run via SQL*Plus OK.
    versions are:
    Forms [32 Bit] Version 9.0.2.9.0 (Production)
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    Oracle Toolkit Version 9.0.4.0.23 (Production)
    PL/SQL Version 9.0.1.3.1 (Production)
    Oracle Procedure Builder V9.0.2.0.7 Build #1022 - Production
    database: 9.2.0.1.0
    Any ideas?!
    thanks,
    Pete

    If you remember that Sybase and MS worked together on SQLServer. Version 6.5 was pretty much the same database server. MS then built version 7.0 leaving Sybase behind. They added ANSI standard joins to their db. What did they get? PROBLEMS. Every patch contained fixes for ANSI standard joins. Even SQLServer 2000 has problems with it.
    Oracle now trys to follow MS and add ANSI joins to their database. What did it give them? BUGS. Remember this one?
    select * from sys.role$ cross join dual
    http://otn.oracle.com/deploy/security/pdf/sql_joins_alert.pdf
    Use standard joins and not ANSI joins. That will solve this problem.

  • Using MAST/VAST with position conditional triggers

    Hi folks! I'm trying to use a MAST file that loads in VAST files to do preroll, midroll, and postroll all from the same XML. Each of these is triggered by a timecode using a property condition looking at position. Essentially, when the currentTime is greater than or equal to a time code, it triggers the ads. Currently the events are firing at the right time, and the VAST files are being loaded and translated correctly, but all three videos are playing after the main content finishes. Can anyone tell me how to remedy this?
    Here are some more clues. The conditions for triggering look something like this:
    <startConditions>
                                            <condition value="20" type="property" operator="GEQ" name="position" />
    </startConditions>
    <endConditions>
                                            <condition type="event" name="OnItemEnd" />
    </endConditions>
    Another clue is that I delved into the MASTPlugin and found in the getInsertionIndex method of MASTProxyElement a comment:
    "if our current child is in the midst of playback, we don't want to interrupt it, so we insert immediately after the current child."
    The playing status is determined by the presence of a time trait with a currentTime or by the presence of a play trait with a play state of PLAYING. Since the position property will only be triggered after the main content is playing, it would seem that content added with a position trigger would always be added to the end of the main content. Is there some easy way to do this using position triggers or something that might be wrong with the XML?
    I am aware of Advertising Plugin which does a great job of this very task, but unfortunately the client wants to use MAST/VAST and uses tracking implemented in the VAST data. Anybody have a solution, or should I start sweet talking the client?

    Wow, I missed this question a long time ago.
    The basics of what I did were to remove any use of SerialElements or ParallelElements from the MASTProxyElement class. I passed in references to the main MediaContainer and MediaPlayer through metadata on the plugin resource and passed those to the MASTProxyElement from the MASTPluginInfo class. Then I gutted the onDocumentProcessed method of MASTProxyElement. That is what executes when it detects an ad needs to play. There I made the most changes making it just create standard media elements rather than messing with Parallel and Serials. I then created a separate MediaContainer and Player solely for the ads. Using a stage reference off of the main MediaContainer, I add my container to the stage, pause and hide the main player, and then listen for the completion of the ad from my separate player. When that is complete, I clean up my ad and tell the main player to show and resume.
    This was a major reworking of the plugin and required a lot of deep diving into the OSMF plugin, along with a few monkey patches to OSMF. The original plugin's support for different versions of VAST and VPAID are incomplete and I had to fix a lot to get a lot of the expanded functionality to work. The plugin codebase is proprietary now, so I cannot share it with the community. However, I am happy to share the general approach I took and to provide a warning about the complexity of the task to anyone attempting to do the same.

  • Using an applet as a debug-console

    Hi !
    I've made a simple main() which does work but i've to see some output details from an applet. For the moment, I don't know how to print the equivalent of the system.out.println (I put these outputs in a string) line by line in an applet...
    All I am able to do is to write all my string in the applet at the end of the execution of my main().
    Could anybody help me ?
    Thx

    In an applet, stuff written to output on System.out or System.err should show up on the Java console.
    So it should be fine to just keep using that.
    But anyway are you really using applets? Applets don't use main().

  • Using built in camera as motion triggered security camera

    I live in an apartment and suspect that some of the staff have come in and have been rooting through some of my files (paper ones) and playing some of my music instruments. Not at all paranoid, things have really been moved around. What reliable software can I get that will capture people in my apartment, and save it to a terabyte ext hard drive I have connected? And/or send it to my non 3g iphone? I don't want it constantly recording, and I'd like it to shut off recording after x-amount of time of non movement.
    I really need to be sure who this is and what they are doing. Help? Ideas?

    gatehealing wrote:
    ha! I just don't have much experience downloading from unfamiliar sites and have heard of the nightmares folks have had when doing that (though, usually on PC's, not Macs). Thanks for the feedback.
    I think you'll find that dangerous sites, with bad downloads are almost always dealing with protection softwares and p0rn. If you are looking for software with ratings you can always check VersionTracker.com, MacUpdate.com, Downloads.com - These sites have all been around for many years and have earned a great reputation for trying to keep the real dangerous crap off their services.
    There are no download links on the the site I referenced. That site simply provides you with a set of instructions, and refers you to the commercial sites where you can buy the parts or software's.
    Now it's up to you to decide if a commercial site would endanger their reputation or income by selling a product that isn't safe to use or is useless.
    It's an easy matter to check a site's reputation for quality, customer service, etc. I use Google, but it's not perfect. One thing to check is the comments at the end of the instruction page to see if they seem real and if the information on the page makes sense and proves accurate when you go to the sites the article lists for the ingredients. You can also take a look around the site at other articles and judge them for their accuracy and quality.
    One thing that I like is that both the Twisted Melon and Evo Logical sites referenced in the article accept PayPal so they are not given any of your credit card information, they just get paid. They don't get to keep a PayPal account for very long if there are many complaints.
    Both sites also offer some customer support. The Evo Logical site is posting quite a bit of support info on their site about the product and the Twisted Melon site has a Version History showing how often they are updating their program and they also have working links to MacWorld articles and links to software download sites that have ratings and comments:
    http://macupdate.com/info.php/id/22279
    You don't know me, and what I say can be wrong. We are just users on this forum and you still need to check things out and use common sense when spending your money.

  • Using "v" function in row-level triggers

    I have row-level triggers that do
    l_user := nvl(v('APP_USER'),user);
    to get the user that is running the app and record that in the table or wherever.
    Since it is a row-level trigger, the "v" function will be called for each and every row even though it is going to be the same.
    Is there a way to avoid this repeated execution of the v function?
    Thanks

    To avoid calls to the V function, put the values in hidden database text items in the HTML DB page and allow the normal insert/update HTML DB process pass it to your triggers. Then you refer to their values in table triggers with the ":new" method. Doing it this way you remove your V function invocations from your table-level triggers so the triggers do not have to determine from what environment they were being fired.
    Example: In our applications we track user ID and date/time for row creates and last row modifications. The HTML DB page has a default value of :APP_USER for the row create user ID text item and default of TO_CHAR(SYSDATE,'DD-MON-RR') for the row create date text item. It also has conditional computations with the same values for last row modification user ID and last row modification date.

  • Error using Page Items in PL/SQL Triggers

    Hello all,
    I am trying to use a page item value in my PL/SQl trigger statement.Following is my trigger
    create or replace TRIGGER "cts_apps_temp_insert"
    BEFORE INSERT ON CTS_APPS_TEMP
    FOR EACH ROW
    DECLARE
    vComputer_ID NUMBER;
    vTemp varchar(200);
    BEGIN
    select computer_id into vComputer_ID from cts_hardware_info where computer_name = v('P105_DEVICE_NAME');
    INSERT INTO CTS_SERVER_APP_CUSTOMER(SERVER_ID,DEPT_APP_REL_ID,TECHNICAL_MANAGER,FUNCTIONAL,APPLICATION_COORDINATOR,MODIFYUSERID,DATEOFMODIFICATION)
    VALUES (vComputer_ID,:NEW.DEP_APP_REL_ID,:NEW.TECHNICAL_MANAGER,:NEW.FUCNTIONAL_MANAGER,:NEW.APPLICATION_COORDINATOR,v('APP_USER'),sysdate);
    END;
    But am getting an error when I try to insert the data from the form
    ORA-01403: no data found ORA-01403: no data found ORA-06512: at "ESDBA.cts_apps_temp_insert", line 5 ORA-04088: error during execution of trigger 'ESDBA.cts_apps_temp_insert'
    Error Unable to process row of table CTS_APPS_TEMP.
    OK
    I tried printing the value of v('P105_DEVICE_NAME'); from a pl/sql block...It doesnt print anything..
    Can anyone please tell mw why the page item value is becoming null?
    Is there any other way I can use the Page item value in the trigger?
    Thanks in Advance,
    Nehal
    Edited by: user11122439 on Jun 23, 2009 11:27 AM

    Thanks for helping me out Tony.
    It is a single row form. But the same form is used many time to add records for that particular server..
    In the first form the user enters the server details. In the second form they need to associate applications with the server name they entered in the first form.
    They can add any number of such applications.
    The contenst in my form are
    Server_name: ( read only field populated by the name they entered in the first form)
    application_name:
    Manger1:
    Manager2:
    When the user clicks on add button the applcaition should be associated to the server he added in the first form.For this I need the Id of the Server_name he added in the first form.
    I also need to store this info in a temporary table apart from the original Server-App relationt able. Thats the reason I had database trigger which was also adding stuff to a temporary table apart from adding the relationships to the main table.
    But even if we frget about hte temporary table can you please tell me how I can use the Page item value in form 1 and get its id from database and use it to insert server-app relation in second form?

  • Debugging Triggers

    I've created a trigger but when it is invoked I get:
    ORA-04098: trigger 'POSTAL_CITY_INSERT' is invalid and failed re-
    validation
    How can I debug this?
    When I alter/compile it I get:
    MGR-00072: Warning: TRIGGER POSTAL_CITY_INSERT created with
    compilation errors.
    How can I easily find out what the compile errors are?
    null

    Hi,
    Just say SHOW ERRORS on the sql prompt and it will do the
    needful and it will show the errors along with the line
    and column numbers. Also you can have a look at the table
    user_errors and give the trigger name for the name field and
    trigger for the type field in the where clause.
    Hope this helps.
    Rashmi
    Richard Schultz (guest) wrote:
    : I've created a trigger but when it is invoked I get:
    : ORA-04098: trigger 'POSTAL_CITY_INSERT' is invalid and failed
    re-
    : validation
    : How can I debug this?
    : When I alter/compile it I get:
    : MGR-00072: Warning: TRIGGER POSTAL_CITY_INSERT created with
    : compilation errors.
    : How can I easily find out what the compile errors are?
    null

  • Using System Profiler to help debug network setup issues

    I was surprised to discover that if you fire up System Profiler (e.g., About This Mac from the Apple menu, and then click on More Info) and go to the "Locations" section under Network in the left hand column, you will get a detailed list of network settings for all network interfaces for each of your locations.
    This could be helpful to folks trying to figure out why some network settings don't seem to be taking proper effect.
    --Bob

    привет,
    Three thoughts on that... see if you can make a New User in Safe Mode, to test.
    Better yet, get Applejack...
    http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    After installing, reboot holding down CMD+s, then when the prompt shows, type in...
    applejack AUTO
    Then let it do all 5 of it's things.
    If that doesn't work, try trashing...
    /Users/nnnn/Library/Preferences... the whole Prefs folder there.
    /Library/Preferences/SystemConfiguration... the whole SysConfig folder.
    /Library/Preferences/com.apple.sharing.firewall.plist
    /Library/Preferences/com.apple.networkConfig.plist
    /Library/Preferences/com.apple.AppleFileServer.plist
    Reboot... of course you dont have to trash them, you can just move them to the desktop to drag back if it doesn't work.
    PS. Maybe disconnect the Ethernet during these last two for testing.

  • Redirect DBMS_OUTPUT to calling application and to log file

    Hi,
    I have a procedure to insert a set of records into a table using Merge statement and capture the inserted record count.
    Currently i display the record count using DBMS_OUTPUT in Oracle SQL Developer tool using DBMS_OUTPUT.ENABLE.
    How do i redirect this output to both calling application and Log file on Unix server.
    I have more DBMS_OUTPUT statements in Exception handling to handle failed inserts. How do i redirect these statements to Calling Application and Log file on Unix.
    Can we send any email to a group from PL/SQL if at all program fails and Exception handle is triggered OR if the program complete successfully.
    I appreciate your responses.

    user10405899 wrote:
    Hi,
    I have a procedure to insert a set of records into a table using Merge statement and capture the inserted record count.
    Currently i display the record count using DBMS_OUTPUT in Oracle SQL Developer tool using DBMS_OUTPUT.ENABLE.
    How do i redirect this output to both calling application and Log file on Unix server.
    I have more DBMS_OUTPUT statements in Exception handling to handle failed inserts. How do i redirect these statements to Calling Application and Log file on Unix.
    Can we send any email to a group from PL/SQL if at all program fails and Exception handle is triggered OR if the program complete successfully.
    I appreciate your responses.DBMS_OUTPUT is not the correct tool to be using for outputting information. It writes data to a buffer on the server, and then it's up to the client tool to read the data out of that buffer using the DBMS_OUTPUT.GET_LINE call.
    You could try implementing something like that in your own application if you wanted, but in truth, if you're wanting to capture some trace of what's happening in your application then you are better logging those things to a table using an autonomous transaction procedure, and then have whataver application you want just query that table.

Maybe you are looking for

  • Itunes will not open and I get the following error window

    the folder itunes is on a locked disc or you do not have write permissions for this folder powermac running Lion OS uninstalled itunes, verifyed premissions. repaired disc macbook the same thing happens

  • There was a problem connecting to the server message

    I have started to get the following message when I run Final Cut Pro X There was a problem connecting to the server "soundmedia" The "sound media" server is a PC running windows XP and is switched off. I closed all libraries & set up a new library -

  • Please put back Design view in Dreamweaver v2014.1!

    I am always open for new features that said design view is a critical feature I use when I develop website. The live view has delays and switching between code and live view is not smooth. Adobe programmers please put back my design view because this

  • Lost In The Time Machine - Help!

    Hello, I sincerely apologize, in advance, if I am repeating old history here and for all the questions. Time Machine has got me confused… I’ve read the FAQ’s/Threads but still not sure about how to proceed. I’m a ex Microsoft Windows guy and Mac newb

  • Transfering from one g5 to another

    i bought a used powermac g5 and i want to transfer everything from my old g5 to the new g5 how do i do this they both have the exact same operating system