How to set the root path of XML document when calling Inserting procedure

Hi,
I was create a procedure to insert XML Document in to DBMS Tables, but i am not able to set the Start root element in calling procedure.
My calling procedure is
exec insXmldoc('pmc_sample.xml', 'pmc')
When i am calling this procedure i got this error
11:23:54 Error: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
ORA-06512: at "SCOTT.INSPROC", line 8
ORA-06512: at line 2
I am checking my XML file using XML Validator. My XML file was parsed with out errors.
Please give the solution,and tell me where i did wrong in my calling procedure.
suppose i have this XML file in local E drive ,how to set the path for that XML file in my calling procedure.

Hi, I am doing the code likthis,please give the solution.
SQL> create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
2 insCtx DBMS_XMLSave.ctxType;
3 l_ctx dbms_xmlsave.ctxtype;
4 rows number;
5 begin
6 insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
7 rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
8 DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
9 end;
10 /
Procedure created.
SQL> begin
2 insProc('/usr/tmp/ROWSET.xml', 'emp');
3 end;
4 /
begin
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException:
Start of root element expected.
ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
ORA-06512: at "SCOTT.INSPROC", line 7
ORA-06512: at line 2
Kishore B

Similar Messages

  • How to set the encoding of an XML-document

    I need to change the encoding of an xml-document.
    When I convert the document into a string, UTF-8
    is used, I want to use ISO-8859-1.

    use this in your identity transform:
    transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");

  • How to setting the root user profile?

    It seems that I can't fine any complet manual to introduce how to setting the root user profile file which locate at /etc/profile? Who can help me find out or figure it out

    first /etc/profile is a global profile for the system
    its not only specific to root
    from here you can configure the system wide paths
    Regardless of the shell you are using, when you first log in your system generally runs the system profile file, /etc/profile. This file is generally owned by the system administrator and is readable (but not writable) by all users.
    After your system executes the system profile, it runs the user profile. The user profile is one (or more) initialization files that define your working environment. For example, if you're in the CDE environment your system checks this file (or set of files) each time you start a new terminal or window.
    refer this::
    http://www.shrubbery.net/solaris9ab/SUNWabe/ADVOSUG/p33.html
    man page here
    http://www.unix.com/man-page/OpenSolaris/4/profile/

  • How to set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • How to set the file path dynamically based on sytem, username, and date

    Hi All,
    My requirement is upload the data into one  structure like xyz that is related to t.code MCSZ.
    file will be in  UNIx SERVER .
    PATH IS: /sapif
    file name is xy789 load .txt
    I have  to write code in one user-exit
    how can i set the file path for this.
    shall i put hard code file path?
    because i have to writecode in user-exit.
    plz tell me how to set the file path based ons syetem, username, date
    Thanks in advance
    Ram.A

    Concatenate the field SY-SYSID, SY-UNAME and SY-DATUM for the file path

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • How to set the default path of the tag while working with xtype "tags"

    Hi,
    I am working with xtype tag, where i have to select tags in the dialog box. Everything is fine, but my requirement is set the tags path.
    Currently it is defaulted to /etc/tags and showing all the tags. Instead i have show only the single tag path that is required for me.
    Is there any way where i can set the root path and set to my custom tag path like: /ets/tags/mycustomtags/
    Thanks for the support in advance
    Riyaz

    Hi,
    Use namespaces property to set the path. But it only works with namespaces that you directly creates under /etc/tags
    so for example if you want to use or show two namesapces /ets/tags/mycustomtags & /ets/tags/mycustomtags1
    then set this property as
    namespaces       string[]             mycustomtags  
                                                       mycustomtags1
    and if you have only want to show one then
    namespaces       string[]             mycustomtags
    I hope it will help you.
    Also refer http://dev.day.com/docs/en/cq/current/widgets-api/output/CQ.tagging.TagInputField.html
    Let me know if you need more information.
    THanks,
    Pawan

  • How to set the File Path to run a javascript using Plugin Code?

    Hi All,
    Im new to Indesign Plugin Development.Can any one help me out with my problem.
    What i want to do is to run a javascript using Plugin Code.When i went through this forum i was able to find out that i should use the IscriptRunner Class to automate this.I could also figure out that the Member Function to use is "CanHandleFile" &"RunFile".
    The first parameter in CanHandleFile & RunFile Member Function is to specify the path of the JavaScript File i suppose!I could also find out that IDFile has to used to set the file path Information.
    But im clueless how to set the Javascript FilePath using IDFile.Can any one help me how to do this?Any Code Snippets Please?
    Waiting for reply.
    Thanks
    myRiaz

    Hi,  Andreas<br /><br />  Can you explain this in detail? I found it in your post before.<br /><br />  The content of elements are returned through the Characters callback function:<br /><br />From ISaxContentHandler.h:<br /><br />/**<br />        Receives character data<br /><br />The parser will call this method to report each chunk of<br />        character data. SAX parsers may return all contiguous<br />        character data in a single chunk, or they may split it into<br />        several chunks. But all characters in any single<br />        event must come from the same external entity so the<br />        Locator provides useful information.<br /><br />Note some parsers will report whitespace using the<br />        IgnorableWhitespace() method rather than this one (validating<br />        parsers must do so).<br /><br />@param Chars The characters from the XML document.<br />        */<br />virtual void Characters(const PMString& chars) = 0; <br /><br />  What i have done is implement my own SAXContentHandlerServiceBoss, and in my file XXXSAXContentHandler.cpp, I override the fonctions StartElement, EndElement, and Characters() like below: I add the PMString xmlData to collect the file content:<br /><br />class XXXSAXContentHandler : public CSAXContentHandler<br />{<br />void XXXSAXContentHandler::Characters(const WideString& chars)<br />{<br />xmlData.Append(chars);<br />}<br /><br />void XXXSAXContentHandler::StartElement(const WideString& uri, const WideString& localname, const WideString& qname, ISAXAttributes* attrs)<br />{<br />xmlData.Append("<"); xmlData.Append(localname); xmlData.Append(">");<br />}<br />void XXXSAXContentHandler::EndElement(const WideString& uri, const WideString& localname, const WideString& qname)<br />{<br />xmlData.Append("</"); xmlData.Append(localname); xmlData.Append(">");<br />}<br /><br />}<br /><br />and in my program, I use the code below to call the fonction I overrided, but I dont know how I can get the String xmlData I defined in the XXXSAXContentHandler.cpp<br /><br />InterfacePtr<IK2ServiceRegistry> serviceRegistry(gSession, UseDefaultIID());<br /><br />InterfacePtr<IK2ServiceProvider> xmlProvider(serviceRegistry->QueryServiceProviderByClassID(kXMLParserService, kXMLParserServiceBoss));<br /><br />InterfacePtr<ISAXServices> saxServices(xmlProvider, UseDefaultIID());<br />InterfacePtr<ISAXContentHandler> saxHandler(::CreateObject2<ISAXContentHandler>(kXXXSAXContentHandlerServiceBoss));<br />saxHandler->Register(saxServices);<br />bool16 parseFailed = saxServices->ParseStream(readStream, saxHandler);<br /><br />Can you give me any help?<br /><br />Thanks and regards!

  • How to List the Root Path?

    Hi all,
    How can I list the root path? (windows: "My Computer", UNIX: / )
    I tried
    File f = new File("/");
    String s = f.list();
    It didn't work....
    Thanks for your help.

    What do you mean doesn't work, works just fine.
    String s = f.list();should be String[]

  • How to give the root path in flash for linux os?

    hi all,
        This is santhosh, I have a problem with xml path in flash. Iam trying to load some swf files into another swf file, it's woking fine in windows os but when I check this file in linux it is not taking the path which I gave for loading external swf files.So, any help on the same will be grate for me.
    thanks in advance.....
    Thanks and regards
    Santhosh Kumar.M

    duplicate {thread:id=2418158} ?
    I guess the path you are using is wrong. It works on your mashiene as the src path is available. When you run the app on a server (jspx file) there is no src path as long as you don't include it in your WAR wich you should not do anyway.
    If you need to access such data you can create a folder in your webroot folder and the the resources from there as /xml_folder_name or if the xml files shouldn't be visible from the outside put the folder under hte web-inf folder.
    Timo
    Edited by: Timo Hahn on 23.07.2012 16:20

  • How to compare the contents of two XML documents

    Hi all,
    I was trying to compare the contents of two xml documents, they are both validate for the same XML Schema. i was using the xmlunit to do this. but some how it doesn't work like what i have expected. for example:
    1.xml : <test><item>2</item><item>1</item></test>
    2.xml: <test><item>3</item><item>2</item><item>1</item></test>
    the result from XMLUnit is this two xmls are different, but it compares <item>2</item> with <item>3</item>, which i cannot find out where the real diiffs are.
    does anybody know how i can do this correct?
    best regards,
    tina

    I faced a similar problem in one of my projects and hence wrote my own comparator. Most comparators like ExamXML etc show XML as different if the nodes under a parent node occur in different seqeunce or a set of repeated nodes occur in different sequence. The comparator that I wrote gives you the flexibility to configure how to identify a node from a set of repeated nodes and is able to compare them successfully if they occur in any order. You can view the sample output at http://geocities.com/dheerendra_itbhu/TipsFromDheeru.html
    and contact me in case you need the source code.

  • How to set the lifetime properties of a document

    Hi Experts,
    Do somebody know how to set the lifetime attributes "valid from" and "valid to" via java of the lifetime properties?
    Which java class should I use?
    Do somebody have an example for this issue maybe?
    Thanks in advanced!
    Best Regards,
    Markus

    Hi Markus,
    Below is a sample method which i am using for setting expiry date for a KM Doc...
    public void setTimeBasedPublish(IResource resource) throws WcmException {
              IRepositoryServiceFactory repServiceFactory =
                   ResourceFactory.getInstance().getServiceFactory();
              IRepositoryService repositoryService =
                   repServiceFactory.getRepositoryService(
                        resource,
                        IWcmConst.TIMEBASED_PUBLISH_SERVICE);
              ITimebasedPublishServiceManager tpbService =
                   (ITimebasedPublishServiceManager) repositoryService;
              java.util.Date startDate = new java.util.Date();
              java.util.Date endDate = new java.util.Date();
              endDate.setMinutes(
                   startDate.getMinutes()
                        + Integer
                             .valueOf(getproperty("LIFETIME_MINUTES_FOR_LATEST_REPORTS"))
                             .intValue());
              endDate.setDate(
                   startDate.getDate()
                        + Integer
                             .valueOf(getproperty("LIFETIME_DAYS_FOR_LATEST_REPORTS"))
                             .intValue());
              tpbService.saveValidDate(resource, startDate);
              tpbService.saveInvalidDate(resource, endDate);
    Regards
    BP

  • How to set the Context path to AAA/BBB in Weblogic 5.1?

    Hi folks,
              I want to deploy a web application and set the servlet context as:
              AAA/BBB. Put more simply, my application should be accessible via the
              following:
              http:localhost:7001/AAA/BBB/main.jsp
              where http://localhost:7001/AAA/BBB maps to my document root.
              One work around is to set the context to AAA:
              weblogic.httpd.webApp.AAA=WebAppLocation
              And in the deployment descriptor (web.xml) to register all servlets
              with a BBB/ prepended to the desired alias:
              <servlet-mapping>
              <servlet-name>main</servlet-name>
              <url-pattern>BBB/main.jsp</url-pattern>
              </servlet-mapping>
              But this solution does not work for me. Parts of the application refer
              the context root (AAA) and create URLs relative to that. These URLs
              will not have the BBB part. Searching for it in the code and replacing
              it is not desirable (we do not own the code). Does anyone have any
              suggestions?
              Thanks in advance,
              Musafir
              

    What you have done for changing the context root to "/" is all fine but it is important to know that there is a ROOT.war in the deploy folder of JBoss which by default gets bound to "/" context. You must be getting the error message like "Web mapping already exists for deployment" when you would be starting your JBoss server after changing your context root to "/". So either you can completely remove the ROOT.war from the deploy folder or change the context-root of ROOT.war by updating its web.xml like:
    <web-app>
    <display-name>Welcome to JBoss</display-name>
    <description>
    Welcome to JBoss
    </description>
    *<context-param>*
    *<param-name>context-root</param-name>*
    *<param-value>/jboss-root</param-value>*
    *</context-param>*
    <servlet>
    <servlet-name>Status Servlet</servlet-name>
    <servlet-class>org.jboss.web.tomcat.service.StatusServlet</servlet-class>
    </servlet>
    </web-app>
    and also update the jboss-web.xml of ROOT.war:
    <jboss-web>
    <security-domain>java:/jaas/jmx-console</security-domain>
    *<context-root>/jboss-root</context-root>*
    </jboss-web>
    I hope this serves your purpose.
    There can be a workaround also by modifying the index.html of ROOT.war in the deploy folder of your server and redirect request to your web application using meta refresh like:
    <meta http-equiv="refresh" content="0;URL='/store'">

  • How to detect the root cause of  XML encoding problem ?

    Hi,
    I need to identify the exactly root cause of error when parssing a XML ( ISO-8859-1 encoding) problem.
    How can I do this using JAVA ?
    regards
    ICP

    Hi dekassegui,
    Thanks for your response
    The error is an error from Oracle HTTP adapter servlet. The message error is : "oracle.xml.parser.v2.XMLParseException"
    My intention is to verify the data before thats receieved by the adapter and the servlet.
    I did my own servlet extending the orgirinal servlet to show and log the entire received content. The content looks "OK".
    Now I would like to check a possible special character or symbol unsupported by enconding.
    The Input data is aware of my control. But if the error could be detected, message senders will correct this.
    My major problem is to ensure what is the root cause of the error.
    regards,
    ICP

  • How to set the class path?-

    my forlder is :C:\Documents and Settings\india
    jdk is in:C:\Program Files\Java\jdk1.5.0_11\bin
    can any body can help me to create a classpath for my folder?

    An alternative - as stated in reply 2 in your other thread on this topic: http://forum.java.sun.com/thread.jspa?threadID=5170470 - is not to set the CLASSPATH environment variable at all. Use the -classpath switch instead.
    As the documentation linked to in that reply points out: "The class search path (more commonly known by the shorter name, "class path") can be set using either the -classpath option when calling a JDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value."
    As always, the documentation is worth reading; the available command line options worth using.

Maybe you are looking for

  • Closing error message when external program is called?

    Hello, I am developing a test for a c++ program i have made. My test program will be called a few thousand times with different input files. As I know it will crash in several cases I want to automatically close the error dialog. The error dialog is

  • HP Scanjet G4050 in Windows 7 (64 bit) Error specification 4,[(2,0,8004154),(0,0,0),(3,56,0)]

    HP Scanjet G4050 does not get well installed in Windows 7 (64 bit). Running the programme "HP Print and Scan Doctor". Result: Errors translated for you from Dutch, so I do not have the original error formulation: Device control: correct Warning in Co

  • More Compressor 3.5 H.264 Issues

    Following on from this thread http://discussions.apple.com/thread.jspa?threadID=2109359&tstart=15 I also have compressor issues. All fine until the upgrade. I have seen the interlace issues mentioned in the thread, and concur that the quality of the

  • Encore CS5 Hangs/Crashes on Import

    I'm using a desktop (dual Xeon quad core processors) with 12 gigs of ram and Windows7.  I have a Radeon video card and use a Matrox RTX2 for capture.  Regardless what or how I import, I get the import and preparing transcode settings windows alternat

  • Abldxml giving error after R12 upgrade

    Hi, As a part of R12 upgrade, I'm running adbldxml.pls and it's giving following error. $ perl adbldxml.pl Starting context file generation for db tier.. JRE_TOP not found at its desired location /db01/opt/oracle/product/11.1.0_egebc2d/appsutil/jre R