Xml parser procedur which worked in oracle 8.1.7 not working in oracle 9ir2

hi all,
THE BELOW PROCEDURE TO PARSE A XML WEB PAGE AND RETRIEVE THE DATA INTO TABLE IS WORKING WELL IN ORACLE 8.1.7 , BUT WHEN WE UPGRADED TO oRACLE 9I RELEASE 2 ,,ITS NOT WORKING AND GIVING THESE ERRORS,,
13:44:56 Error: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
ORA-06512: at "SYS.XMLNODECOVER", line 0
ORA-06512: at "SYS.XSLPROCESSOR", line 500
ORA-06512: at "XXCNA.XRATESDLOAD", line 37
ORA-06512: at line 2
CAN ANYONE GIVE A TIP?
REGARDS,
VIJAY
CREATE OR REPLACE PACKAGE BODY XRATESDLOAD AS
PROCEDURE XRATESDLOADP
IS
--DECLARE THE REQUIRED XML PARSER, DOM DOCUMENT,NODES AND NODELLISTS
v_parser xmlparser.Parser;
v_doc xmldom.DOMDocument;
v_nl xmldom.DOMNodeList;
v_n xmldom.DOMNode;
--CREATE A PL/SQL TYPE TABLE
TYPE tab_type IS TABLE OF CNA_XRATES_TEXT%ROWTYPE;
     t_tab tab_type := tab_type();
BEGIN
-- Create a parser.
v_parser := xmlparser.newParser;
-- Parse the document and create a new DOM document.
xmlparser.parse(v_parser, 'http://www.xe.com/dfs/datafeed2.cgi?cnaeuropeholdingsltd');
v_doc := xmlparser.getDocument(v_parser);
-- Free resources associated with the Parser now it is no longer needed.
xmlparser.freeParser(v_parser);
-- Get a list of all the CURRENCY nodes in the document using the XPATH syntax.
v_nl := xslprocessor.selectNodes(xmldom.makeNode(v_doc),'/xe-datafeed/currency');
dbms_output.put_line( 'Currency rates processed on '||to_char(sysdate));
--DELETE THE RECORDS IN THE CNA_XRATES_TEXT
delete from CNA_XRATES_TEXT;
dbms_output.put_line( 'Previous records of CNA_XRATES_TEXT table deleted '||to_char(sysdate));
-- Loop through the list and create a new record in a tble collection
-- for each CURRENCY record.
FOR cur_emp IN 0 .. xmldom.getLength(v_nl) - 1 LOOP
v_n := xmldom.item(v_nl, cur_emp);
t_tab.extend;
-- Use XPATH syntax to assign values to he elements of the collection.
t_tab(t_tab.last).CURRENCY_SYMBOL := xslprocessor.valueOf(v_n,'csymbol');
--t_tab(t_tab.last).CURRENCY_NAME     := xslprocessor.valueOf(v_n,'cname');
t_tab(t_tab.last).CURRENCY_RATE := xslprocessor.valueOf(v_n,'crate');
     --t_tab(t_tab.last).CURRENCY_DATE       := xslprocessor.valueOf(v_n, sysdate);
END LOOP;
-- Insert data into the real CNA_XRATES_TEXT table from the table collection.
-- Form better performance multiple collections should be used to allow
-- bulk binding using the FORALL construct but this would make the code
-- too long-winded for this example.
FOR cur_emp IN t_tab.first .. t_tab.last LOOP
INSERT INTO CNA_XRATES_TEXT
(CURRENCY_SYMBOL,
CURRENCY_RATE,
     CURRENCY_DATE)
VALUES
(t_tab(cur_emp).CURRENCY_SYMBOL,
t_tab(cur_emp).CURRENCY_RATE,
     to_char(sysdate));
END LOOP;
dbms_output.put_line( 'Currency rates inserted into CNA_XRATES_TEXT table on '||to_char(sysdate));
COMMIT;
-- Free any resources associated with the document now it
-- is no longer needed.
xmldom.freeDocument(v_doc);
END XRATESDLOADP;
END XRATESDLOAD;
/

Unlike Oracle 7.x, versions 8 and above now internalize the trigger you are looking for within the database itself. So you can no longer have the kind of control over this process as you would have done previously, however the performance has increased according to Oracle.
It is possible to remove these triggers in an emergency as follows:
-- if tab$.trigflag != 0 - then Oracle internal replication triggers are enabled
select * from tab$ where trigflag != 0;
-- to remove Oracle internal replication triggers if replication is not working
-- and needs to be removed in an emergency to allow writing to the tables
-- also do this as sys user
run catrepr
-- also do this as sys user
update tab$ set trigflag=0 where trigflag !=0;
commit;
shutdown immediate;
startup
However this removes all of the triggers - which is not what you want to do in your situation.
You may find some additional helpful commands in the repdoc.txt file on my website:
http://www.dotcomsolutionsinc.net/products/repgen/repgen_example_repdoc1.html
And here is a list of replication setup scripts which could be helpful as well:
http://www.dotcomsolutionsinc.net/products/repgen/repgen_files.html
What is expecially important (as I am sure you know) is the setup of conflict resolution, which I do a little bit differently than I have seen documented elsewhere in order to avoid ORA-1403 errors.
David Simpson
www.dotcomsolutionsinc.net
(Oracle Replication Consulting & Tools)

Similar Messages

  • Oracle dbms.set_role does not work in APEX application

    Hi, in our j2ee applications, we use secure application role. Basically, the data source use the app user schema to connect to the database. the app user only has create session privileges. the database logon trigger will copy a set of attribute to the local secure context. (ip address, session user, client id, application name). The applications explicitly invoke the stored procedure sec_mgr.set_role before any DMLs are executed.
    the sec_mgr.set_role will check the local context attribute , authorize the ip, application name, and set an appreciated role to this session based on session user.
    we want to apply the same framework to the APEX application. First, we change the paring schema to the app schema which only has create session privilege. then we put the plsql code in which sec_mgr.set_role is called in the application builder --> shared components ---> edit security attribute ---> Virtual Private Database (VPD).
    however, we got the error ORA-06565: cannot execute SET ROLE from within stored procedure
    the sec_mgr.set_role is defined as invoker's right(AUTHID CURRENT_USER)
    do i missing something in APEX to get it work?
    Thanks

    Please explain it does not work in APEX? Is the application updating tables that have a trigger? APEX does NOT override trigger actions. Is it possible the values your trigger is looking for are NOT available in your APEX application? Can you post the trigger code here for review?
    Thank you,
    Tony Miller
    Webster, TX
    What if you really were stalking a paranoid schizophrenic... Would they know?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Oracle 10g database homepage not working?

    Oracle 10g database homepage not working?
    Hi just i installed oracle database 10g express edition but after the restart the oracle database homepage wont open http://127.0.0.1:8080/apex that link always telling cannot display...
    here i have posted lsnrctl status
    pls help
    thanks in advance
    LSNRCTL> status
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY…
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 25-SEP-2010 17:52:11
    Uptime 0 days 1 hr. 28 min. 24 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\se…
    dmin\listener.ora
    Listener Log File C:\oraclexe\app\oracle\product\10.2.0\se…
    og\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIP…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOS…
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully

    I had a problem of accessing Oracle 10g database homepage. After a couple of days of research and discussions with coworker we found a solution.
    Here is the solution:
    1. Find out your default browser.
    2. Configure your default web browser to connect to the Oracle Database XE Database Home Page as stated
    here:
    http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm#CIHHJEHF
    If this does not help de-install Oracle XE and reinstall following the instruction. During re-installation find out your default browser and configure it as instructed.
    I suspect when the default web browser changes the Oracle 10g XE Database Home Page stops working.
    Good luck

  • Oracle date parameter query not working?

    http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
    Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
    Delete
    from CONCURRENCYTESTITEMS
    where ITEMID = :xItemId
    and ROWVERSION = :xRowVersion_prev
    The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
    The same code & query works in Sql Server, but not Oracle.
    Public Function CreateConnection() As IDbConnection
    Dim sl As New SettingsLoader
    Dim cs As String = sl.ObtainConnectionString
    Dim cn As OracleConnection = New OracleConnection(cs)
    cn.Open()
    Return cn
    End Function
    Public Function CreateCommand(connection As IDbConnection) As IDbCommand
    Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
    cmd.BindByName = True
    Return cmd
    End Function
    <TestMethod()>
    <TestCategory("Oracle")> _
    Public Sub Test_POC_Delete()
    Dim connection As IDbConnection = CreateConnection()
    Dim rowver As DateTime = DateTime.Now
    Dim id As Decimal
    Using cmd As IDbCommand = CreateCommand(connection)
    cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.ReturnValue
    p.DbType = DbType.Decimal
    p.ParameterName = "myOutputParameter"
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion"
    v.Value = rowver
    cmd.Parameters.Add(v)
    cmd.ExecuteNonQuery()
    id = CType(p.Value, Decimal)
    End Using
    Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
    cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
    Dim p As OracleParameter = New OracleParameter
    p.Direction = ParameterDirection.Input
    p.DbType = DbType.Decimal
    p.ParameterName = "xItemId"
    p.Value = id
    cmd.Parameters.Add(p)
    Dim v As OracleParameter = New OracleParameter
    v.Direction = ParameterDirection.Input
    v.OracleDbType = OracleDbType.TimeStampLTZ
    v.ParameterName = "xRowVersion_prev"
    v.Value = rowver
    v.Precision = 6 '????
    cmd.Parameters.Add(v)
    Dim cnt As Integer = cmd.ExecuteNonQuery()
    If cnt = 0 Then Assert.Fail() 'should delete
    End Using
    connection.Close()
    End Sub
    Schema:
    -- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
    CREATE TABLE "CONCURRENCYTESTITEMS" (
    "ITEMID" NUMBER(19,0) NOT NULL,
    "NOTES" NCHAR(200) NOT NULL,
    "ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
    STORAGE (
    NEXT 1048576 )
    Sequence:
    -- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
    CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
    START WITH 1
    CACHE 20
    MAXVALUE 9999999999999999999999999999

    still not comming...
    i have one table each entry is having only one fromdata and one todate only
    i am running below in sql it is showing two rows. ok.
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  '830' and  '850'  and t1.U_frmdate ='20160801'  and  t1.u_todate='20160830'
    in commond promt
      select t1.U_frmdate,t1.U_todate  ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID  AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf 
       from  [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
       on t0.DocEntry = t1.DocEntry
       inner join ohem t2
       on t2.empID = t0.U_empid  where  t0.U_empid between  {?FromEmid} and  {?ToEmid} and t1.U_frmdate ={?FDate} and  t1.u_todate={?TDate}
    still not showing any results..

  • Oracle 10gr2 locally is not working after  installing Oracle 11g

    hi ,
    Does anyone has any idea after installing oracle 11g in system, Oracle 10g locally is not working. I am getting below error.
    Forms session <2> failed during startup: no response from runtime process

    Generally this is because the software you install last updates the system environment variables with its information, thereby break products that use files with similar names. Specifically, look at PATH and ORACLE_HOME. Likely you will see that entries for your 11g installation will be displayed first. In order to use v10, you would need to change this or use script files to start executibles. For Forms runtime, be sure to properly set default.env to point to the desired PATH

  • Hi i have moved from uk to india, i have changed my country in itunes store, when i am entering my payment details its not accepting it. more worse is all my applications which i have downloaded in uk are not working now. please suggest me a solution

    hi i have moved from uk to india, i have changed my country in itunes store, when i am entering my payment details its not accepting. more worse is all my applications which i have downloaded in uk are not working now. please suggest me a solution

    papillondefer wrote:
    I want to be able to keep app's, music, movies and my Cloud/Match exactly the same.  How do I do this?
    Because of different local copyright laws and licensing you cannot keep everything exactly the same except for iCloud, which is not affected. You will have to create a new Apple ID for use on the UK iTunes Store with a form of payment drawn on a local bank and an address in the UK. As long as you have downloaded all your purchases and the computer is still authorized to play all protected video content that won't change, however Apps may give you trouble when updating because once associated with an Apple ID you can only switch between stores every 90 days.
    As for iTunes Match you must contact Australian iTunes Store support to cancel the subscription and you will have to resubscribe on the UK store.

  • In outlook 2013 Add-In, Adding dynamic menu to splitButton idMso="DialMenu" is working and the same code is not working in outlook 2010 Add-In.

    In outlook 2013 Add-In, Adding dynamic menu to <splitButton idMso="DialMenu"> is working and the same code is not working in outlook
    2010 Add-In. please let me know, if i am missing something. Below is the xml and screen shot
    <contextMenu idMso="ContextMenuFlaggedContactItem">
     <splitButton idMso="DialMenu">
              <menu>
                <dynamicMenu id="CallContactwithFreedomvoice
    " label="CallContactwithFreedomvoice" 
                            getContent="OnGetContenttest"                           insertAfterMso="Call"/> 
            </menu>       </splitButton>    </contextMenu> 

    Hi Narasimha prasad2,
    Based on the description, the context menu for the flagged contact doen't work in Outlook. I am tring to rerpoduce this issue however failed.
    I suggest that you check the state of the add-in first to see wether the add-in was loaded successfully.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HT201320 I have IOS 7 5S and using mail. Receiving works great. Sending mail will not work. Using Centurylink. On my IOS 6 Iphone 4 it works great. Compared settings and they are identical. Now what?

    I have IOS 7 5S and using mail. Receiving works great. Sending mail will not work. Using Centurylink. On my IOS 6 Iphone 4 it works great. Compared settings and they are identical. Now what?

    Well, this is a recurring issue for many users...a small percentage of users but still a bug.  Report the issue here to Apple:  www.apple.com/feedback
    iOS7.0.3 will be released next week, which as of now, I know is primarily for an iMessage but hopefully it will clear up some of these email issues some are also having.

  • I have just recently installed ios6 to my iPad 3 an iPhone 4 my iPhone works fine but my iPad is not working at all I can not get a response from it, it seemed to download an then install but did not reset and turn on and will not turn on HELP!! Withdrawa

    I have just recently installed ios6 to my iPad 3 an iPhone 4 my iPhone works fine but my iPad is not working at all I can not get a response from it, it seemed to download an then install but did not reset and turn on and will not turn on HELP!! Withdrawal or what!! Lol

    Hi there,
    Firstly, try a hard reset. Hold the sleep/wake and home buttons together until the Apple logo appears.
    If this doesn't work, try restoring your device. Put it in recovery mode if iTunes doesn't recognise it, and restore it from there. I have linked to instructions below.
    Recovery Mode and Restore - Apple
    Let me know if this helps,
    Nathan

  • The lock button on my Phone 5 has stopped working completely. It just will not work anymore so I have to rely on the auto-lock . Will apple replace me phone?

    I have an Iphone 5 on contract with T-mobile/EE. The lock button on my Phone 5 has stopped working completely. It just will not work anymore so I have to rely on the auto-lock . Will apple replace my phone or do I ahve to take it back to T-mobile? It is just short of a year into a 24 month contract.

    Yes; If it's under the one year hard ware warrnety and it doesn't have any damage on the device you can get it replaced, contact Apple ASAP

  • My back and forward buttons do not work also the refreash button does not work, I have reloaded the latest version of fire fox and that did not help. HELP please.

    My back and forward buttons do not work also the refresh button does not work, I have reloaded the latest version of fire fox and that did not help. All of navigation tool bar worked until I updated Fire Fox, now if I click on a link in yahoo, for instance, I can not get back to my yahoo home page without reloading Fire Fox. HELP please.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.com/kb/Bookmarks+not+saved#w_places-database-file

  • Debug version works well, but release version does not work with simulator

    Hi,
    I use iOS 7.0.3 and Xcode 5.0.2.
    I developped one application and I tested with simulator-ipad retina. The debug version works well and release version did not work at all.
    The basic configuraton is like this:
    cocos2d: cocos2d-iphone v2.1
    cocos2d: compiled with Profiling Support: NO
    cocos2d: OS version: 7.0.3 (0x07000300)
    cocos2d: GL_VENDOR:   Apple Computer, Inc.
    cocos2d: GL_RENDERER: Apple Software Renderer
    cocos2d: GL_VERSION:  OpenGL ES 2.0 APPLE-9.2.1
    cocos2d: GL_MAX_TEXTURE_SIZE: 4096
    cocos2d: GL_MAX_TEXTURE_UNITS: 8
    cocos2d: GL_MAX_SAMPLES: 4
    cocos2d: GL supports PVRTC: YES
    cocos2d: GL supports BGRA8888 textures: YES
    cocos2d: GL supports NPOT textures: YES
    cocos2d: GL supports discard_framebuffer: YES
    cocos2d: GL supports shareable VAO: NO
    What is the reason and how to fix it?

    Well, yes...you need to upgrade to OS X Server 4.0 ($19.99)...I already did it also!

  • [svn:fx-trunk] 5019: ASDoc updates to indicate that some Halo containers do not work with the Spark equiv (ControlBar does not work with Spark Panel/ AppControlBar does not work with Spark Application), and indicate that Canvas, Box, Tile, Panel have Spa

    Revision: 5019
    Author: [email protected]
    Date: 2009-02-19 13:17:21 -0800 (Thu, 19 Feb 2009)
    Log Message:
    ASDoc updates to indicate that some Halo containers do not work with the Spark equiv (ControlBar does not work with Spark Panel/AppControlBar does not work with Spark Application), and indicate that Canvas, Box, Tile, Panel have Spark equivs
    QE Notes: None
    Doc Notes: None
    Bugs: -
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ApplicationControlBar.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Box.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Canvas.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ControlBar.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/HBox.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Tile.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/VBox.as
    flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as

    Hi DST
    This is a great effort and gesture. thank you on behalf of all the newbies.
    PJ

  • I have purchased new iphone 3gs, its usb cable and charger not working.When I plugged in usb cable to my laptop it says"usb power hub exceeded". When I use another cable I have, it works fine.But the original one not working.Any help?

    I have purchased new iphone 3gs, its usb cable and charger not working.When I plugged in usb cable to my laptop it says"usb power hub exceeded". When I use another cable I have, it works fine.But the original one not working.Any help?

    Are you connecting your iPhone directly to your PC or to a USB hub?

  • Why my wi-fi is not working, and it says bluetooth is not working too??

    Why my wi-fi is not working, and it says bluetooth is not working too??
    My bluetooth n wi-fi are both unavailable! i had already restore my device, but it still doesn't work!!
    My name is juniper, i am from Taiwan! Any know what's wrong with this piece of XXXX!!?? Help me plzzzz!!

    Hi ,
    I am a specialist in Computer and Information Systems e. I am 40 years old from Egypt
    I have Iphone 3g 8g and my SN  868391XZY7H
    Tunes update killing my Iphone software , 3 days my Iphone not working  Although I am go to download 100% update and my iphone installed all  a software update but I don’t know what happened why my Iphone not working  ?
    now some one help me and he installed software for my iphone  and it is working but  Wi-Fi and Bluetooth not working
    I need help me because    Tunes   update from killing my Iphone  ??.
    i want my old Iphone software please
    thank you somuch
    [email protected]

Maybe you are looking for