DispatchEvent - bug in my code

I cant find bug in my code.
In main document class I have created new instance of a AI class and and an listener for a custom event as fallows:
_ai = new AI(_param1, _param2);
_ai.addEventListener("decisionMade", bestOptionFound, false, 0, false);
private function bestOptionFound(evt:Event):void{
     trace("hello");
Then in AI class I do all my logic and after its finished I run a function that dispach event for a main class:
Inside AI class:
private function bestOptionSet():void{
     var boole:Boolean = hasEventListener("decisionMade");
     var boole2:Boolean = willTrigger("decisionMade");
     dispatchEvent(new Event("decisionMade", false, false));
     trace(boole);
     trace(boole2);
     trace("function works");     
So my trace statements give me information that my function working fine, but  there is no listener attached to my AI class (boole and boole2 =  false). thats why my handler cant be triggered.
So Instance of my class AI is working fine and all function inside it working fine as well. But there is no listeners attached to that class as my trace statements tell me. But I add "_ai.addEventListener("decisionMade", bestOptionFound, false, 0, false);".
Any ideas?

you're dispatching your event BEFORE you're adding your listener.

Similar Messages

  • Bug in my code or strange memory behavior ?

    Hi, Guys !
    It's been a while since I post something in this forum - trying to use your help when it's really needed.
    So, here we go ...
    (we use Oracle 8.1.7 on Unix box and SQL * Plus 8.1.6)
    While back I wrote "core" PL/SQL package that resides in let's say DB1 database. It has RECORD_EXISTS_FNC function designed to dynamically check If the record exists in certain table/view. Assumptions are that you pass in :
    Table/View name, Column name, and unique numeric value (because by DBA rules all of our Tables have SEQUENCE as a Primary Key. And I plan soon to put in overloaded function to accept unique character value)
    Also every Table has SYS_TIME_STAMP and SYS_UPDATE_SEQuence columns that populated by Trigger before Insert/Update representing Last Update time_stamp
    and how many times record was updated within same second.
    (in case more than one User updates same record in same time - that was written before Oracle had more granular date/time). So function has SYS_TIME_STAMP and SYS_UPDATE_SEQUENCE parameters (optional) accordingly.
    And It looks something like :
    FUNCTION RECORD_EXISTS_FNC
    (iBV_NAME IN USER_VIEWS.VIEW_NAME%TYPE,
    iPK_FIELD IN USER_TAB_COLUMNS.COLUMN_NAME%TYPE,
    iPK_VALUE IN NUMBER,
    iSYS_TIME_STAMP IN DATE DEFAULT NULL,
    iSYS_UPDATE_SEQ IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS
    TYPE REF_CUR IS REF CURSOR;
    CR REF_CUR;
    i PLS_INTEGER DEFAULT 0;
    vRESULT BOOLEAN DEFAULT FALSE;
    vQUERY USER_SOURCE.TEXT%TYPE;
    BEGIN
    vQUERY := 'SELECT 1 FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''')
    AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    IF iBV_NAME IS NOT NULL AND
    iPK_FIELD IS NOT NULL AND
    iPK_VALUE IS NOT NULL THEN
    OPEN CR FOR vQUERY;
    FETCH CR INTO i;
    vRESULT := CR%FOUND;
    CLOSE CR;
    END IF;
    RETURN vRESULT;
    EXCEPTION
    WHEN OTHERS THEN
    IF CR%ISOPEN THEN
    CLOSE CR;
    END IF;
    INSERT_ERROR_LOG_PRC ('CORE_PKG', 'ORACLE', SQLCODE, SQLERRM, 'RECORD_EXISTS_FNC');
    RETURN vRESULT;
    END RECORD_EXISTS_FNC;
    So the problem is when I call this function from let's say
    database DB2 (via db remote link and synonym) and I know exactly that record does exists (because I am selecting those SYS fields before pass them in) - I get the correct result TRUE. The other programmer (Patrick) calls this function within same DB2 database, within same UserID/password (obviously different session), running exactly the same testing code and gets result FALSE (record doesn't exist, but it does !) He tried to Logoff/Login again several times within several days and try to run it and still was getting FALSE !
    I tried to Logoff/Login again and I was getting mostly TRUE and sometimes FALSE too !!!
    I thought may be It has something to do with REF CURSOR that I use to build SQL on the fly, so I changed to NDS
    using EXECUTE IMMEDIATE statement - nothing changed.
    vQUERY := 'SELECT COUNT (1) FROM ' || iBV_NAME || ' WHERE ' || iPK_FIELD || ' = ' || iPK_VALUE;
    IF iSYS_TIME_STAMP IS NOT NULL AND iSYS_UPDATE_SEQ IS NOT NULL THEN
    vQUERY := vQUERY || ' AND SYS_TIME_STAMP = TO_DATE (''' || iSYS_TIME_STAMP || ''') AND SYS_UPDATE_SEQ = ' || iSYS_UPDATE_SEQ;
    END IF;
    EXECUTE IMMEDIATE vQUERY INTO i;
    vRESULT := NOT (i = 0);
    RETURN vRESULT;
    Interesting note : when Patrick doesn't pass SYS parameters (Time_stamp, Update_sequence), or passes NULLs - function always finds the record ! (Statement 2 below)
    May be it has to do with the way TO_DATE () function gets parsed in that dynamic SQL - I don't know ...
    Here's the test code :
    SET SERVEROUTPUT ON;
    DECLARE
    SYS_TIME DATE;
    SYS_SEQ NUMBER;
    bEXISTS BOOLEAN DEFAULT FALSE;
    BEGIN
    SELECT SYS_TIME_STAMP, SYS_UPDATE_SEQ INTO SYS_TIME, SYS_SEQ FROM LOCATION_BV WHERE PK = 1;
    bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, SYS_TIME, SYS_SEQ); -- STATEMENT 1
    --bEXISTS := CORE_PKG.RECORD_EXISTS_FNC ('LOCATION_BV','PK',1, NULL, NULL);        -- STATEMENT 2
    IF bEXISTS THEN
    DBMS_OUTPUT.PUT_LINE ('TRUE');
    ELSE
    DBMS_OUTPUT.PUT_LINE ('FALSE');
    END IF;
    END;
    I asked our DBA, he has no clue about this strange inconsistent results.
    I debugged line by line, extracted that generated SQL and ran it in same account - works fine !
    Does anyone knows or have clues or can help what's going on ???
    I don't know If this is bug in my code or strange memory behavior ?
    (Please let me know If anything unclear)
    Thanx a lot for your help and time !
    Steve K.

    see your other thread
    Bug in my code or strange memory behavior ?

  • Cannont update E70 nad bug with phone code after b...

    launch NokiaSoftwareUpdate v1.4.39pl
    accept and start update to software 3.0633.09.04 ( using USB cable)
    time remaning 15 mintes ... nokia have white screen , during proceed to 9 minutes , and e70 is reset after reset , on e70 screen show :
    AFE_TEST_SERVER ,w19_06,(c) NMP
    test mode
    nokia
    update show information with 2 steps about put out a battery ,
    after hard reset phone is run but its a problem with PHONE CODE
    after i configure a phone i change default code to my code xxxxxx
    but after bad update code is reset to unknown code
    other bug i found my personal code enter when i change a phone code and enter twice new code show me msg error [-6]
    but old code enter correctly becouse if i use another code then after put twice new code show me message a invalid code .

    Can you please try generating and re-inserting the FB code on your page. The FB Likebox at the above link doesn't load for me from any of the mobile devices nor through a desktop. You can get the code here.
    https://developers.facebook.com/docs/reference/plugins/like-box/
    I was referring to the following Facebook Page URL that you are currently pulling the Streams and Likes for - http://www.facebook.com/phillyweddingdj which appears to be invalid. If you generate the code for it at the above mentioned plugin page, the preview doesn't generate. Visiting this link takes you to FB homepage instead.
    This is how the Likebox code should look like with minimum customization that you need to insert through Object -> Insert HTML option, notice the highlighted part that needs to be modified with a valid FB Page URL:
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0];
    if (d.getElementById(id)) return;
    js = d.createElement(s); js.id = id;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    <div class="fb-like-box" data-href="http://www.facebook.com/myfbpage" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
    </div>
    Thanks,
    Vinayak

  • Nasty Bug: Windows exit code 128

    Hi.
    I'm having weird exit code 128 bugs. It's apparently caused by my printing engine. Sometimes the problem occurs sometimes it doesn't. There isn't any exceptions thrown also. I'm using the java.awt.print API with a MediaTracker for tracking PNG images generated from my application.
    Does anyone know what's happening to my program?

    Found the problem. It doesn't occur anywhere in the JVM -- it occurs because I printed using Virtual PDF Printer and somehow it doesn't emulate a physical printer well.

  • Some bugs encountered. Code attached.

    Dear Sirs,
    I would like to report some bugs encountered in recent days. For more precision, the code of examples is attached in post.
    Problem: ContentHeight totally crazy
    ContentHeight is crazy, at the moment that adds new container.
    Reproduce:
    1. Run the code
    2. Set focus to end of text
    3. Click in button "Add Image"
    Look the containerHeight's label, is totally crazy (for me, is displayed 266798px).
    Problem: Inline Graphic with float, disappears?
    When insert graphic with float (left or right), just disappears.
    Reproduce:
    1. Run the code
    2. Click in button "Add Image (Float left)"
    Where is the graphic?
    Problem: ContentHeight is limited, when verticalScrollPolicy = ScrollPolicy.OFF
    Even if you put a higher content, the containerHeight is limited to container height.
    Reproduce:
    1. Run de code
    2. s tSet focuo in container
    2. Click in button "Scroll OFF"
    Verify that the containerHeight's label, displays the maximus height of the container, but its content is bigger than it.
    Thanks in advance.
    - Marcos

    I will look into the value you are getting back for contentHeight. One thing to note is that contentHeight is an estimated value. TLF will compose as much text as fits in the container, but if it is a scrollable container, and there is more text outside the container, then what is returned is an estimation based on text size of the text that fits. I'm not sure that explains what you're seeing, but it's something to be aware of. To get a fully accurate contentHeight or contentWidth, you have to call compose prior to getting contentHeight/contentWidth.
    Unfortunately floats are not yet fully implemented, so I would suggest not depending on them. Right now we are consolidating -- cleaning up APIs, fixing bugs, etc., and won't look at new features such as floats until that's completed.
    Your third point was about contentHeight being limited by compositionHeight when scrolling is OFF. This is by design. The idea is that the remaining text can flow into the next container. If you want the container to size itself to fit the text, set the compositionHeight to NaN.
    I hope this helps. Thanks for reporting these problems!
    - robin

  • CS4 - How to woraround bug of character code replacing?

    Hi,
    It seems that Adobe and earlier Macromedia are nursing
    serious bug well
    known from version MX. It lies in keyboard characer
    conversion to strange
    codes when right ALT is pressed and <PARAM> "wmode" is
    used (most likely it
    happens in mode transparent and opaque only). In consequence
    it is not
    possible to enter Polish character to input fields. It works
    fine in
    standalone Flash player.
    There is no place to count Adobe on fixing it and I have to
    do something by
    myself. Is it possible to build eg. component or class which
    will convert in
    the fly key codes of pressed button for TextField. and
    components such as
    TextArea and TextInput? How to get down to do that? Any
    suggestions?
    Pozdrawiam,
    Marek

    Hi,
    It seems that Adobe and earlier Macromedia are nursing
    serious bug well
    known from version MX. It lies in keyboard characer
    conversion to strange
    codes when right ALT is pressed and <PARAM> "wmode" is
    used (most likely it
    happens in mode transparent and opaque only). In consequence
    it is not
    possible to enter Polish character to input fields. It works
    fine in
    standalone Flash player.
    There is no place to count Adobe on fixing it and I have to
    do something by
    myself. Is it possible to build eg. component or class which
    will convert in
    the fly key codes of pressed button for TextField. and
    components such as
    TextArea and TextInput? How to get down to do that? Any
    suggestions?
    Pozdrawiam,
    Marek

  • Where i can find lc workspace bug free source code?

    Hi,
    I have adobe livecycle es2 pack installed alongwith workbench 9.0. i need bug free workspace source code for customization. as souce code availabe in live cycle es2 sdk is not what has been described in "customize workspace ui". I don't want to downlaod full live cycle server again or workbench?
    i just need patched livecycle workspace source code?
    where i can find the zip file or is there any other way to update the same?

    It is not clear what version you have (es2 pack?) but there were definite problems with the workspace source code and customization in the ES2 GM release.  These were fixed in SP1 and are also in SP2.
    Note that the workspace source is distributed in both the LC and Workbench installs but the Workbench install may contain the original GM release source, depending on the Workbench version you have.  Workbench 9.5 was released with LC ES 2.5 (aka SP2), but i'm not sure if that even has the updated source.
    To avoid any confusion, you should only use the source from the LC ES2 install.  And to get the latest workspace source you should apply the latest service pack (this would be SP2 at this time) and get the latest ProcessManagement Patch for SP2.  The workspace source is in the zip file at the location indicated in Jasmine's reply.

  • Potential Bug in WRT600N Code

    Recently discovered that the initial release of the WRT600N code may contain a bug.
    When a static IP is used for Internet, and the MTU is set to Manual (1500 in my case); when you look under the Status tab, it will report that the MTU is set to Auto.  Not certain if this is the cause of the freezes I have been experiencing, but should be looked into.

    I am not sure that is there is any bug in the Initial version of the router ....
    Still if yuo are facing the issue ......... disable all firewall & antivirus software .... reset the router & reconfigure it ....see if it is showing still the same problem let me know ....

  • Bug in sample code of Exchange Activ Sync cause birthday shift

    Dear Apple Development Team,
    Continuing the archived discussion 'Exchange Birthday Shifted by 1 day' I just want to inform you that Microsoft identified the reason for shifted birthdays using Exchange Active Sync. According to Microsoft the mentioned problem is not caused by a server-related problem, but due to an error in a Microsoft sample code which was used in Windows Mobile 6.5, Windows Phone 7, Hotmail Outlook Connector and even in iOS. That means that the client side connection was developed incorrectly. Microsoft and Apple copied the incorrect code from time to time using the mentioned Exchange code in their software (iOS, etc).
    However, Microsoft already fixed the birthday bug within the latest update of the Outlook Hotmail Connector (please check changelog) as well as in the current update of Windows Phone 7.5 (Mango). For more information please check the following sites:
    German: http://answers.microsoft.com/de-de/winphone/forum/wp7-sync/geburtstags-bug/15075 df5-27f3-4518-8e27-b228d4eaab06?page=1
    English: http://answers.microsoft.com/en-us/winphone/forum/wp7-sync/birthdays-are-always- set-one-day-earlier-when/b3d16871-ca24-4a26-a0fc-5b0437904a22
    Due to the fact, that the mentioned problem isn't fixed in iOS until now, I would be glad if Apple could fix it as soon as possible, too. This bug is really annoying.
    Best regards,
    Hannes

    Hi,
    as far as I know the bug is fixed in Hotmail Outlook Connector now. But in the Windows Phone Mango release the bug is still active in "some" cases (for birthdays in the winter time everything is fine and for birthdays in summer time the bug is still there - or vice versa ).
    Does Apple plan to fix that bug somehow? As the bug can be fixed with a new release of Outlook connector and partly fixed in the new Windows Phone release it should be a failure in the code of the mobile devices and not with the Hotmail servers - so Apple developers have to work on that.
    Does anybody know when this annoying bug will be fixed?
    Cheers,
    Marcel

  • Firefox 14.0.1 has a spell checking error./ bug in the code

    I just had all my machines update to 14.0.1 (WIN XP SP3)
    I had a clean boot right before the update occurred.
    This is the first time I had used this version on this machine.
    When the program came up, I had no access to the spell checker at all. Nothing I did could change this (checking and un-checking the feature in the right click menu.
    So, I selected the option of restarting the browser in "SAFE MODE" with no add-ons. There was no change at all (still no spell checking)
    So, I went to this site, made an account, activated the count (this entire time FIREFOX had no spell checking) and I created a report.
    I was most of the way done writing the report when suddenly the spell checking started to work. I made no changes to the settings, when suddenly I had spell checking working.
    This means there is an intermittent error;p often the hardest to find from my 20+ years of programming experience (Senior IT contractor)..
    So, have find finding this one. Intermittent bugs are the hardest to track, and tend to come from issues like scope issues, settings stored in files/registry, overly convoluted code (like a rush job that isn't fully understood & was just hammered on until it seemed to work). From my experience it often happens in the last steps of finishing a release - accidentally introducing a bug into what was a working section of code (unexpected ramification are a suspect) into a previously working program piece of a program.

    Hi BarleySinger and thanks for reporting us this issue.
    Yes. Intermitent bugs are really difficult to track and solve, so please try to do this things:
    * Try to reset Firefox so all settings that may be creating this problems will be removed.
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    * Try to perform a antivirus scan on your computer so you check you have no malware.
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try some of the following programs to scan for malware:
    * [http://www.malwarebytes.org/mbam.php MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
    * [http://windows.microsoft.com/MSE Microsoft Security Essentials] (A good permanent anti-virus if you don't already have one)
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!
    * Send us troubleshooting information.
    In order to be able to find the correct solution to your problem, we require some more non-personal information from you. Please do the following:
    *Click the Firefox button at the top left, then click the ''Help'' menu and select ''Troubleshooting information'' from the submenu. If you don't have a Firefox button, click the Help menu at the top and select ''Troubleshooting information'' from the menu.
    Now, a new tab containing your troubleshooting information should open.
    *At the top of the page, you should see a button that says "Copy all to clipboard''. Click it.
    *Now, go back to your forum post and click inside the reply box. Press Ctrl+V to paste all the information you copied into the forum post.
    If you need further information about the Troubleshooting information page, please read the article [[Using the Troubleshooting Information page]].
    Thanks in advance for your help!
    * Check the issue is still reproducing intermitently, and it was not an isolated problem (Maybe Firefox was still preparing the spell checker).

  • Bug on native code of OJVM java.util.zip.CRC32.updateBytes(CRC32.java)

    I want to unzip OpenOffice 1.0 files inside the OJVM but it fails into the native method java.util.zip.CRC32.updateBytes(CRC32.java).
    The first execution of the code runs OK, but the second not.
    After a long wait it shutdown the connection and the oracle trace file shows an stack trace like this:
    *** 2003-04-18 11:31:31.926
    *** SESSION ID:(17.97) 2003-04-18 11:31:31.926
    java.lang.IllegalArgumentException
    at java.util.zip.CRC32.updateBytes(CRC32.java)
    at java.util.zip.CRC32.update(CRC32.java)
    at java.util.zip.ZipInputStream.read(ZipInputStream.java)
    at oracle.xml.parser.v2.XMLByteReader.fillByteBuffer(XMLByteReader.java:354)
    at oracle.xml.parser.v2.XMLUTF8Reader.fillBuffer(XMLUTF8Reader.java:142)
    at oracle.xml.parser.v2.XMLByteReader.saveBuffer(XMLByteReader.java:448)
    at oracle.xml.parser.v2.XMLReader.fillBuffer(XMLReader.java:2012)
    at oracle.xml.parser.v2.XMLReader.skipWhiteSpace(XMLReader.java:1800)
    at oracle.xml.parser.v2.NonValidatingParser.parseMisc(NonValidatingParser.java:305)
    at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:274)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:254)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
    at com.prism.cms.frontend.EditPropertiesActions.processUpload(EditPropertiesActions.java:1901)
    Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x6d3a74a0, PC: [0x40263600, eomake_reference_to_eobjec
    t()+80]
    Registers:
    %eax: 0x54a54000 %ebx: 0x40429c20 %ecx: 0x54a546bf
    %edx: 0x6d3a7478 %edi: 0x402b27d0 %esi: 0x45c718ac
    %esp: 0xbfffbf20 %ebp: 0xbfffbf48 %eip: 0x40263600
    %efl: 0x00010206
    The code of the java method is:
    public static void processUpload(String id_page, String longname,
    String filename, String filetype,
    String s00)
    throws SQLException {
    Integer p_id = new Integer(id_page);
    String toSource;
    XMLDocument doc = null;
    DOMParser theParser = null;
    InputStream XSLStream = null;
    BufferedWriter out = null;
    #sql { select path||name||'.html' into :toSource from pages where id_page=:p_id };
    if ("Cancel".equalsIgnoreCase(s00)) {
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    return;
    if ("no-file".equals(filename) && "no-contenttpye".equals(filetype)) {
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    return;
    if ("xml".equalsIgnoreCase(filetype))
    #sql { call CMSj.moveFromUpload(:filename,:p_id) };
    else if ("sxw".equalsIgnoreCase(filetype)) {
    XSLProcessor processor = new XSLProcessor();
    XSLStylesheet theXSLStylesheet = null;
    BLOB locator = null;
    // open sxw file, it will be in zip format with a file named content.xml
    // then convert content.xml to document-v10.dtd with an stylesheet
    #sql { select blob_content into :locator from wpg_document where name = :filename for update };
    ZipInputStream zin = new ZipInputStream(locator.binaryStreamValue());
    ZipEntry entry;
    try {
    while((entry=zin.getNextEntry())!=null)
    if ("content.xml".equalsIgnoreCase(entry.getName())) {
    Integer newVersion;
    CLOB dstDoc;
    CMSDocURLStreamHandlerFactory.enableCMSDocURLs();
    try {
    URL inUrl = new URL("cms:/stylesheets/sxw2document-v10.xsl");
    XSLStream = inUrl.openStream();
    // Create the Stylesheet from the stream
    theXSLStylesheet = processor.newXSLStylesheet(XSLStream);
    // Stores the document processing it with the given stylesheet
    theParser = new DOMParser();
    theParser.setValidationMode(theParser.NONVALIDATING);
    theParser.setBaseURL(new URL("cms:/dtd/"));
    theParser.parse(zin);
    doc = theParser.getDocument();
    #sql { SELECT NVL(MAX(version),0)+1 INTO :newVersion FROM content
    WHERE cn_id_page = :p_id };
    #sql { INSERT INTO content( cn_id_page, version, owner, status, source_file,
    file_size, content, created, modified, created_by,
    modified_by)
    VALUES ( :p_id, :newVersion, sys_context('cms_context','user_id'),
    'Uploaded', :filename, 0 , EMPTY_CLOB(), SYSDATE, SYSDATE,
    sys_context('cms_context','user_id'),
    sys_context('cms_context','user_id')) };
    #sql { SELECT content INTO :dstDoc FROM content
    WHERE cn_id_page = :p_id AND version = :newVersion for update };
    #sql { call DBMS_LOB.trim(:inout dstDoc,0) };
    out = new BufferedWriter(dstDoc.getCharacterOutputStream(),dstDoc.getChunkSize());
    processor.processXSL(theXSLStylesheet, doc, new PrintWriter(out));
    #sql { delete from wpg_document where name=:filename };
    } catch (SAXParseException spe) {
    throw new SQLException("processUpload SAXParseException: "+xmlError(spe));
    } catch (SAXException se) {
    throw new SQLException("processUpload SAXException: "+se.getLocalizedMessage());
    } catch (XSLException xsle) {
    throw new SQLException("processUpload XSLException: "+xsle.getLocalizedMessage());
    } finally {
    if (XSLStream!=null)
    XSLStream.close();
    if (theParser!=null)
    theParser = null;
    if (out!=null) {
    out.flush();
    out.close();
    zin.close();
    } catch (IOException ioe) {
    throw new SQLException("processUpload IOException: "+ioe.getLocalizedMessage());
    } finally {
    if (XSLStream!=null)
    XSLStream = null;
    if (out!=null)
    out = null;
    if (zin!=null)
    zin = null;
    Jxtp.redirecUrl("/dbprism/ldoc/live/edit.html?p_source="+toSource);
    Basically it takes the content from a BLOB column of the wpg_document table, unzip it using java.util.zip package, look for the file content.xml and parse it using Oracle XML toolkit.
    Using an open source utility which replace java.util.package (http://jazzlib.sourceforge.net/) it works perfect because is a pure java application.
    Best regards, Marcelo.
    PD: I am using Oracle 9.2.0.2 on Linux.

    The cause of errors was a dying Westen Digital drive, specially the 48G partition reserved only for $ORACLE_BASE (/dev/sdb3 mounted on /opt/oracle).
    A simple quick scan of unmounted partition (badblocks -v /dev/sdb3) reported more than thousand new bad blocks (compared to the last scan six months ago). Although I strongly believe, specially in the case of WDC drives, that the best utility to "repair" bad blocks is the one that opens a window and prints the message: "Go to the nearest shop and buy a new drive", I was very curious to prove my suspicion just on this drive. After zero-filling the partition with dd, then formatting it (mke2fs -cc) and mounting again, the 11g installation and database creation (on the same partition) successfully completed, performing fast and smoothly. To make sure it was not a casual event, I repeated the installation once again with full success. The database itself is working fine (by now). Well, the whole procedure took me more than four hours, but I'm pretty satisfied. I learned once again - stay away from Western Digital. As Oracle cannot rely on dying drive, my friend is going tomorrow to spend a 150+ euro on two 250G Seagate Barracudas and replace both WDC drives, even though the first drive seems to be healthy.
    In general there is no difference between loading correct data from good disk into bad memory and loading the incorrect data from dying disk into good memory. In both cases the pattern is damaged. For everyone who runs into the problem similar to this, and the cause cannot be easily determined, the rule of thumb must be:
    1. test memory and, if it shows any error, check sockets and test memory modules individually
    2. check disks for bad blocks regardless of the result of memory testing
    Therefore I consider your answer being generally correct.
    Regards
    NJ

  • Can it be a bug in SAP code?

    Hi Guys,
    I am running a report in which there are hierarchies. The top level node is the sum of its child node. When the report runs first, I see the top node is having value, whereas its child nodes are blank.
    When I collapse the hierarchy, the value for the child node doesnt come up, but when I expand the hierarchy again, I see the values in the child node as well as the top node.
    I have checked following things.
    1) There is no table interface
    2) The hierarchy nodes are working fine in other reports
    3) There is only one structure, so no problem of formula collision.
    Do you think of any other root cause?
    Rgds,
    Shailesh

    Hello,
    As I understand your question, All the thing which are releted to costing are done only at the controlling area level not at company code.
    As your req diffrent cost componenet for diffrent company code is depend up on how you define the controlling area.
    Hope it will clear you
    Regards
    Ravi

  • Potential bug in recovery code

    We have observed that during a normal recovery the first_lsn is set the to first version of the log file that is available. This happens even if the files have check point records (not the last but the other available files). This changes the recovery mode to "catastrophic recovery" like i.e. the recovery does a undo/redo till the last available file instead of stopping at a checkpoit lsn.
    I looked at the code in
    txn_region.c - procedure int__txn_findlastckp(env, lsnp, max_lsn)
              if ((ret = __logc_get(logc, &lsn, &dbt, DB_LAST)) != 0)
                   goto err;
              * Twiddle the last LSN so it points to the beginning of the
              * last file; we know there's no checkpoint after that, since
              * the log system already looked there.
              lsn.offset = 0;
         /* Read backwards, looking for checkpoints. */
         while ((ret = __logc_get(logc, &lsn, &dbt, DB_PREV)) == 0) {
              if (dbt.size < sizeof(u_int32_t))
                   continue;
              memcpy(&rectype, dbt.data, sizeof(u_int32_t));
              if (rectype == DB___txn_ckp) {
                   *lsnp = lsn;
                   break;
    what happes is during the reverse traversal no DB___txn_ckp record is found. It looks loke the __log_get call returns junk.
    I think setting lsn.offset to 0 creates a problem because the " logc->prev" does not correspond to this modified lsn.
    Appreciate if some one can confirm this for me.

    Thanks Sandra for reply,
    As described in this thread, my application needs to perform recovery for almost every startup.
    db recovery in a multiprocess environment
    I will patch the berkeley db. In the meantime, can i deal with this problem in following manner:
    1. Run db_checkpoint.
    2. Copy db files and MOVE unused log files along with the db files to another location.
    3. further normal recovery scenarios should not start with the first log file hence should not take as long as with all log files. Is that correct?
    In case normal recovery doesn't work, I will need to bring back copied db files alongwith moved log files and with new log files, i should be able to run catastrophic recovery.
    Can you please comment on that.
    Best Regards,
    Shishir

  • Bug in JavaScript code parsing a large XML document returns truncated values

    I believe I am seeing this old bug (https://bugzilla.mozilla.org/show_bug.cgi?id=449219) in Firefox ESR v10.0.3. Could this be a regression or new version of the same bug? Or is the ESR build separate from the normal trunk releases and could this bug not have been patched onto the ESR branch?

    Firefox ESR is based upon the Firefox 10 version with some security patches applied from later Firefox versions, so you shouldn't see bug that were fixed in Firefox 3 versions.
    Please update to the latest Firefox 10.0.11 ESR version.
    *http://www.mozilla.org/en-US/firefox/organizations/all.html
    *http://www.mozilla.org/en-US/firefox/10.0.11/releasenotes/

  • Bug in the code

    hi i have the following code inserting row programticaly my problem is when i insert the row,it take 5 rows and insert tham instead on only one selected row,am in jdeveloper 11.1.1.6.0
    Edited by: adf009 on 2013/03/08 5:02 PM

    adf009 ,
    is this your code? Whoever wrote this code wrote something quite complex for something pretty simple. To programmatically insert a row you can use the iterator binding directly and create a new row on the RowSetIterator, provide the attribute values and then add it to the iterator.
    Have you checked how often
    <code>
    while(selectedEmpIter.hasNext()){
    Key key = (Key)((List)selectedEmpIter.next()).get(0);
    Row currentRow = empRSIter.getRow(key);
    onRowCreate(currentRow);
    <code>
    iterates?
    Code lines like
    rsi.first();
      //get handle to the last row
      Row lastRow = rsi.last();rsi.first() is a not needed call. I suggest you dump the existing code and start with a simpler and cleaner approach
    Frank

Maybe you are looking for