Reading  xml data from url and insert into table

CREATE TABLE url_tab2
URL_NAME VARCHAR2(100),
URL SYS.URIType
INSERT INTO url_tab2 VALUES
(’This is a test URL’,
sys.UriFactory.getUri(’http://www.domain.com/test.xml’)
it is giving error as invalid character

Check if your single quotes are the correct single quotes.
The principle works as advertised in the XMLDB Developers Guide...
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 25 21:44:46 2008
Copyright (c) 1982, 2008, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user OTN identified by OTN account unlock;
User created.
SQL> grant dba, xdbadmin to OTN;
Grant succeeded.
SQL> conn OTN/OTN
Connected.
SQL> CREATE TABLE uri_tab (docUrl SYS.URIType, docName VARCHAR2(200));
Table created.
SQL> -- Method SYS.URIFACTORY.getURI() with absolute URIs
SQL> -- Insert an HTTPUri with absolute URL into SYS.URIType using URIFACTORY.
SQL> -- The target is Oracle home page.
SQL> INSERT INTO uri_tab VALUES
  2  (SYS.URIFACTORY.getURI('http://www.oracle.com'), 'AbsURL');
1 row created.
SQL> -- Insert an HTTPUri with relative URL using constructor SYS.HTTPURIType.
SQL> -- Note the absence of prefix http://. The target is the same.
SQL> INSERT INTO uri_tab VALUES (SYS.HTTPURIType('www.oracle.com'), 'RelURL');
1 row created.
SQL> -- Insert a DBUri that targets employee data from database table hr.employees.
SQL>
SQL> INSERT INTO uri_tab VALUES
  2  (SYS.URIFACTORY.getURI('/oradb/HR/EMPLOYEES/ROW[EMPLOYEE_ID=200]'), 'Emp200');
1 row created.
SQL> SELECT e.docUrl.getCLOB(), docName FROM uri_tab e;
E.DOCURL.GETCLOB()
DOCNAME
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
<head>
AbsURL
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
E.DOCURL.GETCLOB()
DOCNAME
<head>
RelURL
<?xml version="1.0"?>
<ROW>
  <EMPLOYEE_ID>200</EMPLOYEE_ID>
  <FIRST_NAME>Jenn
Emp200
SQL> set long 1000
SQL> select HTTPURITYPE('www.oracle.com').getCLob() from dual;
HTTPURITYPE('WWW.ORACLE.COM').GETCLOB()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
<head>
<title>Oracle 11g, Siebel, PeopleSoft |
Oracle, The World's Largest Enterprise S
oftware Company</title>
<meta name="title" content="Enterprise Applications | D
atabase | Fusion Middleware | Applicatio
ns Unlimited | Business | Oracle, The Wo
rld's Largest Enterprise Software CompanEdited by: Marco Gralike on Nov 25, 2008 10:13 PM

Similar Messages

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • Get the data  from excel and insert into the database

    I want to read the data from excel file, get the data from excel and insert into the database.

    You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
    This has nothing to do with JSP/JSTL.

  • Read XML data from URL

    Hello,
    Greetings to everybody. I am having a problem reading or capturing the XML data being send by a URL and the said URL does not send the XML data as a file, but it just send it out as data.
    I do not know how to capture the said xml data from the said given URL. Please Help. Thank You, very, very, very much.
    Cheers !
    vins
    [email protected]

    public String getXml(String strURL){
    URL url  = null;
    URLConnection conn = null;
    BufferedReader in = null;
    try{
        url = new URL(strURL);
        conn = url.openConnection();
        in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line = null;
        StringBuffer xml = new StringBuffer();
        while ((line = in.readLine()) != null){
            xml.append(line);
    catch (Exception e){ }
    finally {  // close th eresource
    return xml.toString()
    }String xml = getXml("http://www....");
    InputSource source = new InputSource(new StringReader(xml));
    // use a parse to parse the xml document in the inputsource

  • How to read XML data from URL

    Hi All,
    I have one requirement. I have one URL which gives me data in XML format. I need to read this file and store this data into my SAP tables.
    Can anybody suggest how read this XML file using URL?
    Thanks in advance,
    P.Shridhar.

    Use a Server java proxy generated from your inbound message interface which would make a URLConnection to the specified URL after it gets triggered by BPM. A code snippet to achieve the same could be
    URL url  = null;
    URLConnection conn = null;
    BufferedReader in = null;
    url = new URL("http://someurl.someserver.com");
    conn = url.openConnection();
    in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    String line = null;
    StringBuffer xml = new StringBuffer();
    while ((line = in.readLine()) != null){
            xml.append(line);
    -- amol

  • Fetching data from VO and put into table Region

    Hi All,
    I am using Jdev 9i and 11i application.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
          super.processRequest(pageContext, webBean);
    Number Variable= (Number)pageContext.getSessionValue("SessionValue");
    Number numValue = new Number (Variable);
    pageContext.writeDiagnostics(this, "In XXXXShoppingCO header "+ Variable, 1);
    pageContext.removeSessionValue("SessionValue");
    String sql ="SELECT REQUISITION_LINE_ID,REQUISITION_HEADER_ID, LINE_NUM, ITEM_DESCRIPTION, UNIT_MEAS_LOOKUP_CODE,UNIT_PRICE,QUANTITY,BASE_UNIT_PRICE FROM PO_REQUISITION_LINES_ALL  ORDER BY LINE_NUM ASC";
                  ViewObject VO;
                 //Get the AM. Here
                  OAApplicationModuleImpl AM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = AM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                  VO = (OAViewObject)AM.findViewObject("JDSUPoReqVO");
           if(VO==null){
                 VO = AM.createViewObject("JDSUPoReqVO",viewDef);
                 VO.setWhereClause(null);
                 VO.setWhereClause("REQUISITION_HEADER_ID = :1");
                 VO.setWhereClauseParams(null);
                 VO.setWhereClauseParam(0,numValue);
                 //AM.getOADBTransaction().putDialogMessage(new OAException("param value is "+VO.getWhereClauseParams()));
                 Object[] temp =VO.getWhereClauseParams();
      pageContext.putDialogMessage(new OAException("temp value"+ temp.length));
      for(int i=0; i<temp.length;i++)
        pageContext.putDialogMessage(new OAException("parameters are "+ temp[i].toString()));
    AM.getOADBTransaction().putDialogMessage(new OAException( " query is "+VO.getQuery()));
    AM.getOADBTransaction().putDialogMessage(new OAException( "Where Clause of the VO is "+ VO.getWhereClause()));  
    //ItemTableRN
                  //OATableBean localOATableBean =(OATableBean)webBean.findChildRecursive("ItemTableRN");
    OAMessageStyledTextBean LineNum = (OAMessageStyledTextBean)webBean.findChildRecursive("LineNum");  
                          LineNum.setViewUsageName("JDSUPoReqVO");
                          LineNum.setViewAttributeName("LINE_NUM"); 
                          //LineNum.setReadOnly(true); 
              OAMessageTextInputBean  itemDesc = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("ItemDescInput");
                           itemDesc.setViewUsageName("JDSUPoReqVO");
                           itemDesc.setViewAttributeName("ITEM_DESCRIPTION"); 
                         //itemDesc.setReadOnly(true); 
               OAMessageStyledTextBean SpecialInfo = (OAMessageStyledTextBean)webBean.findChildRecursive("InfoTemplateText");
                            SpecialInfo.setViewUsageName("JDSUPoReqVO");
                            SpecialInfo.setViewAttributeName("REQUISITION_HEADER_ID"); 
                          //SpecialInfo.setReadOnly(true);
               OAMessageLovInputBean Unit = (OAMessageLovInputBean)webBean.findChildRecursive("TranslatedUom");
                            Unit.setViewUsageName("JDSUPoReqVO");
                            Unit.setViewAttributeName("UNIT_MEAS_LOOKUP_CODE"); 
                          //Unit.setReadOnly(true); 
               OAMessageTextInputBean  Quantity = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("Quantity");
                            Quantity.setViewUsageName("JDSUPoReqVO");
                            Quantity.setViewAttributeName("QUANTITY"); 
                          //Quantity.setReadOnly(true);
               OAMessageTextInputBean  Price = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnPrice");
                            Price.setViewUsageName("JDSUPoReqVO");
                            Price.setViewAttributeName("BASE_UNIT_PRICE"); 
                          //Price.setReadOnly(true);
               OAMessageTextInputBean  Amount = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnAmount");
                             Amount.setViewUsageName("JDSUPoReqVO");
                             Amount.setViewAttributeName("UNIT_PRICE"); 
    when I use print values of VO into table's field then I am getting error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)

    Hi All,
    I am using Jdev 9i and 11i application.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
          super.processRequest(pageContext, webBean);
    Number Variable= (Number)pageContext.getSessionValue("SessionValue");
    Number numValue = new Number (Variable);
    pageContext.writeDiagnostics(this, "In XXXXShoppingCO header "+ Variable, 1);
    pageContext.removeSessionValue("SessionValue");
    String sql ="SELECT REQUISITION_LINE_ID,REQUISITION_HEADER_ID, LINE_NUM, ITEM_DESCRIPTION, UNIT_MEAS_LOOKUP_CODE,UNIT_PRICE,QUANTITY,BASE_UNIT_PRICE FROM PO_REQUISITION_LINES_ALL  ORDER BY LINE_NUM ASC";
                  ViewObject VO;
                 //Get the AM. Here
                  OAApplicationModuleImpl AM= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
                 //Create the View Definition
                 OAViewDef viewDef  = AM.getOADBTransaction().createViewDef();
                 viewDef.setSql(sql);
                 viewDef.setExpertMode(true);
                 viewDef.setViewObjectClass("oracle.apps.fnd.framework.server.OAViewObjectImpl");
                 viewDef.setViewRowClass("oracle.apps.fnd.framework.server.OAViewRowImpl");
                 //Now since the View Definition is ready, we create the View Object
                  VO = (OAViewObject)AM.findViewObject("JDSUPoReqVO");
           if(VO==null){
                 VO = AM.createViewObject("JDSUPoReqVO",viewDef);
                 VO.setWhereClause(null);
                 VO.setWhereClause("REQUISITION_HEADER_ID = :1");
                 VO.setWhereClauseParams(null);
                 VO.setWhereClauseParam(0,numValue);
                 //AM.getOADBTransaction().putDialogMessage(new OAException("param value is "+VO.getWhereClauseParams()));
                 Object[] temp =VO.getWhereClauseParams();
      pageContext.putDialogMessage(new OAException("temp value"+ temp.length));
      for(int i=0; i<temp.length;i++)
        pageContext.putDialogMessage(new OAException("parameters are "+ temp[i].toString()));
    AM.getOADBTransaction().putDialogMessage(new OAException( " query is "+VO.getQuery()));
    AM.getOADBTransaction().putDialogMessage(new OAException( "Where Clause of the VO is "+ VO.getWhereClause()));  
    //ItemTableRN
                  //OATableBean localOATableBean =(OATableBean)webBean.findChildRecursive("ItemTableRN");
    OAMessageStyledTextBean LineNum = (OAMessageStyledTextBean)webBean.findChildRecursive("LineNum");  
                          LineNum.setViewUsageName("JDSUPoReqVO");
                          LineNum.setViewAttributeName("LINE_NUM"); 
                          //LineNum.setReadOnly(true); 
              OAMessageTextInputBean  itemDesc = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("ItemDescInput");
                           itemDesc.setViewUsageName("JDSUPoReqVO");
                           itemDesc.setViewAttributeName("ITEM_DESCRIPTION"); 
                         //itemDesc.setReadOnly(true); 
               OAMessageStyledTextBean SpecialInfo = (OAMessageStyledTextBean)webBean.findChildRecursive("InfoTemplateText");
                            SpecialInfo.setViewUsageName("JDSUPoReqVO");
                            SpecialInfo.setViewAttributeName("REQUISITION_HEADER_ID"); 
                          //SpecialInfo.setReadOnly(true);
               OAMessageLovInputBean Unit = (OAMessageLovInputBean)webBean.findChildRecursive("TranslatedUom");
                            Unit.setViewUsageName("JDSUPoReqVO");
                            Unit.setViewAttributeName("UNIT_MEAS_LOOKUP_CODE"); 
                          //Unit.setReadOnly(true); 
               OAMessageTextInputBean  Quantity = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("Quantity");
                            Quantity.setViewUsageName("JDSUPoReqVO");
                            Quantity.setViewAttributeName("QUANTITY"); 
                          //Quantity.setReadOnly(true);
               OAMessageTextInputBean  Price = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnPrice");
                            Price.setViewUsageName("JDSUPoReqVO");
                            Price.setViewAttributeName("BASE_UNIT_PRICE"); 
                          //Price.setReadOnly(true);
               OAMessageTextInputBean  Amount = (OAMessageTextInputBean )webBean.findIndexedChildRecursive("TxnAmount");
                             Amount.setViewUsageName("JDSUPoReqVO");
                             Amount.setViewAttributeName("UNIT_PRICE"); 
    when I use print values of VO into table's field then I am getting error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1223)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    ## Detail 0 ##
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)
    oracle.apps.fnd.framework.OAException: oracle.jbo.NoDefException: JBO-25002: Definition ITEM_DESCRIPTION of type Attribute not found
      at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
      at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2958)
      at oracle.apps.fnd.framework.webui.OAPageBean.renderDocument(OAPageBean.java:2755)
      at _oa__html._OA._jspService(_OA.java:101)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at oracle.jsp.provider.Jsp20RequestDispatcher.forward(Jsp20RequestDispatcher.java:162)
      at oracle.jsp.runtime.OraclePageContext.forward(OraclePageContext.java:187)
      at _oa__html._OA._jspService(_OA.java:94)
      at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
      at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
      at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
      at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
      at oracle.jsp.JspServlet.service(JspServlet.java:156)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
      at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
      at org.apache.jserv.JServConnection.run(JServConnection.java:294)
      at java.lang.Thread.run(Thread.java:736)

  • How to read data from flatfile and insert into other relevant tables ? Please suggest me the query ?

    Hi to all,
    I have flat files in different location through FTP i need to fetch those files and load in the relavant table of the database.
    Please share me the query to do it ..

    You would need a ForEach Loop to iterate though the files. Initially the FTP task will pull the files from locations to a landing folder. Once thats done the ForEachLoop will iterate through files in the folder and will have a data flow task inside to transfer
    file data to tables.
    If you want a more secure option you can also use SFTP (Secured FTP) and can implement it using free WinSCP clinet. I've explained a method of doing it fo dynamic files here
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    for iterating through files see this example
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    you may not need the validation step inside the loop in your case
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Reg: read excel column and insert into table.

    hi Friends,
          i wanted to read the data from Excel and insert into in my oracle tables.
          can you provide the link or example script.
        how to read the column value from excel and insert into table.
      please help.

    < unnecessary reference to personal blog removed by moderator >
    Here are the steps:
    1) First create a directory and grant read , write , execute to the user from where you want to access the flat files and load it.
    2) Write a generic function to load PIPE delimited flat files:
    CREATE OR REPLACE FUNCTION TABLE_LOAD ( p_table in varchar2,
    p_dir in varchar2 DEFAULT ‘YOUR_DIRECTORY_NAME’,
    P_FILENAME in varchar2,
    p_ignore_headerlines IN INTEGER DEFAULT 1,
    p_delimiter in varchar2 default ‘|’,
    p_optional_enclosed in varchar2 default ‘”‘ )
    return number
    is
    – FUNCTION TABLE_LOAD
    – PURPOSE: Load the flat files i.e. only text files to Oracle
    – tables.
    – This is a generic function which can be used for
    – importing any text flat files to oracle database.
    – PARAMETERS:
    – P_TABLE
    – Pass name of the table for which import has to be done.
    – P_DIR
    – Name of the directory where the file is been placed.
    – Note: The grant has to be given for the user to the directory
    – before executing the function
    – P_FILENAME
    – The name of the flat file(a text file)
    – P_IGNORE_HEADERLINES
    – By default we are passing 1 to skip the first line of the file
    – which are headers on the Flat files.
    – P_DELIMITER
    – Dafault “|” pipe is been passed.
    – P_OPTIONAL_ENCLOSED
    – Optionally enclosed by ‘ ” ‘ are been ignored.
    – AUTHOR:
    – Slobaray
    l_input utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_lastLine varchar2(4000);
    l_cnames varchar2(4000);
    l_bindvars varchar2(4000);
    l_status integer;
    l_cnt number default 0;
    l_rowCount number default 0;
    l_sep char(1) default NULL;
    L_ERRMSG varchar2(4000);
    V_EOF BOOLEAN := false;
    begin
    l_cnt := 1;
    for TAB_COLUMNS in (
    select column_name, data_type from user_tab_columns where table_name=p_table order by column_id
    ) loop
    l_cnames := l_cnames || tab_columns.column_name || ‘,’;
    l_bindvars := l_bindvars || case when tab_columns.data_type in (‘DATE’, ‘TIMESTAMP(6)’) then ‘to_date(:b’ || l_cnt || ‘,”YYYY-MM-DD HH24:MI:SS”),’ else ‘:b’|| l_cnt || ‘,’ end;
    l_cnt := l_cnt + 1;
    end loop;
    l_cnames := rtrim(l_cnames,’,');
    L_BINDVARS := RTRIM(L_BINDVARS,’,');
    L_INPUT := UTL_FILE.FOPEN( P_DIR, P_FILENAME, ‘r’ );
    IF p_ignore_headerlines > 0
    THEN
    BEGIN
    FOR i IN 1 .. p_ignore_headerlines
    LOOP
    UTL_FILE.get_line(l_input, l_lastLine);
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    v_eof := TRUE;
    end;
    END IF;
    if not v_eof then
    dbms_sql.parse( l_theCursor, ‘insert into ‘ || p_table || ‘(‘ || l_cnames || ‘) values (‘ || l_bindvars || ‘)’, dbms_sql.native );
    loop
    begin
    utl_file.get_line( l_input, l_lastLine );
    exception
    when NO_DATA_FOUND then
    exit;
    end;
    if length(l_lastLine) > 0 then
    for i in 1 .. l_cnt-1
    LOOP
    dbms_sql.bind_variable( l_theCursor, ‘:b’||i,
    ltrim(rtrim(rtrim(
    regexp_substr(l_lastLine,’([^|]*)(\||$)’,1,i),p_delimiter),p_optional_enclosed),p_optional_enclosed));
    end loop;
    begin
    l_status := dbms_sql.execute(l_theCursor);
    l_rowCount := l_rowCount + 1;
    exception
    when OTHERS then
    L_ERRMSG := SQLERRM;
    insert into BADLOG ( TABLE_NAME, ERRM, data, ERROR_DATE )
    values ( P_TABLE,l_errmsg, l_lastLine ,systimestamp );
    end;
    end if;
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_input );
    commit;
    end if;
    insert into IMPORT_HIST (FILENAME,TABLE_NAME,NUM_OF_REC,IMPORT_DATE)
    values ( P_FILENAME, P_TABLE,l_rowCount,sysdate );
    UTL_FILE.FRENAME(
    P_DIR,
    P_FILENAME,
    P_DIR,
    REPLACE(P_FILENAME,
    ‘.txt’,
    ‘_’ || TO_CHAR(SYSDATE, ‘DD_MON_RRRR_HH24_MI_SS_AM’) || ‘.txt’
    commit;
    RETURN L_ROWCOUNT;
    end TABLE_LOAD;
    Note: when you run the function then it will also modify the source flat file with timestamp , so that we can have the track like which file was loaded .
    3) Check if the user is having UTL_FILE privileges or not :
    SQL> SELECT OWNER,
    OBJECT_TYPE
    FROM ALL_OBJECTS
    WHERE OBJECT_NAME = ‘UTL_FILE’
    AND OWNER =<>;
    If the user is not having the privileges then grant “UTL_FILE” to user from SYS user:
    SQL> GRANT EXECUTE ON UTL_FILE TO <>;
    4) In the function I have used two tables like:
    import_hist table and badlog table to track the history of the load and another to check the bad log if it occurs while doing the load .
    Under the same user create an error log table to log the error out records while doing the import:
    SQL> CREATE TABLE badlog
    errm VARCHAR2(4000),
    data VARCHAR2(4000) ,
    error_date TIMESTAMP
    Under the same user create Load history table to log the details of the file and tables that are imported with a track of records loaded:
    SQL> create table IMPORT_HIST
    FILENAME varchar2(200),
    TABLE_NAME varchar2(200),
    NUM_OF_REC number,
    IMPORT_DATE DATE
    5) Finally run the PLSQL block and check if it is loading properly or not if not then check the badlog:
    Execute the PLSQL block to import the data from the USER:
    SQL> declare
    P_TABLE varchar2(200):=<>;
    P_DIR varchar2(200):=<>;
    P_FILENAME VARCHAR2(200):=<>;
    v_Return NUMBER;
    BEGIN
    v_Return := TABLE_LOAD(
    P_TABLE => P_TABLE,
    P_DIR => P_DIR,
    P_FILENAME => P_FILENAME,
    P_IGNORE_HEADERLINES => P_IGNORE_HEADERLINES,
    P_DELIMITER => P_DELIMITER,
    P_OPTIONAL_ENCLOSED => P_OPTIONAL_ENCLOSED
    DBMS_OUTPUT.PUT_LINE(‘v_Return = ‘ || v_Return);
    end;
    6) Once the PLSQL block is been executed then check for any error log table and also the target table if the records are been successfully imported or not.

  • Read data from Excel and write into oracle database

    Hi
    I want  to know how can i read data from excel and write into oracle database using java.Kindly help me out to find a solution.
    Thanks and Regards
    Neeta

    Hai,
    I am suggesting the solution.
    I will try out and let u know soon.
    Make a coma separated file from your excel file.
    Assuming that your requirement allows to make a csv file.
    This file may be passed as an file object to be read by java.Using JDBC you must be able to populate the data base.You can also use String Tokenizer if needed.
    You do not want to  go via sql Loader?
    For reading the excel file itself do you want java?

  • Reading XML Data from ABAP Program?

    Hi,
    How do I read XML Data from an ABAP Program? For example if I have the below basic XML Code-
    <xml>
    <Name> Thiru </Name>
    <Age> 24 </Age>
    <City> chennai </Chennai>
    </xml>
    How do i read the data within the Name,Age, and City tags into variables in the ABAP Program?
    Regards,
    Thiru

    if you decide to do in XSLT, I have a sample list here:
    XML file like this:
    <?xml version="1.0" encoding="UTF-16"?>
    <F>
    <P1>
    <t_1>value1</t_1>
    <t_2>testvalue</t_2>
    </P1>
    <P2>
    </P2>
    </F>
    XSLT file like this:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sapxsl="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="F">
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <<b>DOCUMENT</b>>
    <xsl:apply-templates/>
    </<b>DOCUMENT</b>>
    </asx:values>
    </asx:abap>
    </xsl:template>
    <xsl:template match="P1">
    <ENTRY>
    <<b>T_1</b>><xsl:value-of select="t_1"/></T_1>
    <<b>T_2</b>><xsl:value-of select="t_2"/></T_2>
    </ENTRY>
    </xsl:template>
    </xsl:transform>
    ABAP program like this:
    DATA: BEGIN OF wa_upload,
    text(255) TYPE c,
    END OF wa_upload,
    itab_upload LIKE TABLE OF wa_upload,
    BEGIN OF wa_document,
    t_1 TYPE string,
    t_2 TYPE string,
    END OF wa_document,
    itab_document LIKE TABLE OF wa_document.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = 'XXXXX'
    filetype = 'ASC'
    TABLES
    data_tab = itab_upload.
    CALL TRANSFORMATION zrappel_xml_test
    SOURCE XML itab_upload
    RESULT <b>document</b> = itab_document.
    You should pay attention to the bold words.
    hope it will be helpful
    thanks

  • Reading XML data from .pages file

    Hi All!
    I've been trying to get a script up and running, but frankly I'm lost. The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    What I'm having a problem with is reading the data from the .pages file and I don't know what the best way to do it is because I'm still a novice at this.
    So there are two ways I can think of:
    1. Read directly from the Pages document when it is open. The problem with this is that it's a Pages template and it contains tables. Perhaps the easiest thing would be just to select certain cells directly from pages, but I have no idea how they're labeled or how to access them so I came up with a second idea. If you happen to know how to do this, I would greatly appreciate it.
    2. Pages documents can be unzipped and one of the files is an xml file with a lot of tags and the data I need. I found the following post that talks about how to parse XML via an XSL stylesheet. After going through some tutorials, I got stuck because the xml itself in the Pages file is just a mess to me and I'm confused about which node to choose. In other xml docs you can see a clear, nicely laid out tabbed structure so you can at least figure out the path to the node you want. I stumbled across a nice script for TextWrangler which cleans up XML, but it just barks at the Pages file.
    3. On top of that, I will need to use the name field and match that with an Address Book e-mail address. Should I change the template and make it into an address book field?
    Thanks in advance,
    Paul

    The script should read the date, lesson no, and name fields from a .pages file and then use that information to send an e-mail.
    Maybe you might want to try the following script:
    tell application "Pages"
        activate
        tell foreground layer of page 1 of front document
            select (text box 1 whose vertical position < 0.5)
            tell application "System Events"
                keystroke "c" using {command down} -- ⌘C
                keystroke "a" using {shift down, command down} -- ⇧⌘A
            end tell
            set theText to the clipboard
        end tell
    end tell
    set TID to AppleScript's text item delimiters
    set AppleScript's text item delimiters to tab
    set theTextFields to text items of theText
    set AppleScript's text item delimiters to TID
    set {theDate, theLessonNo, theStudent} to {item 2, item 4, item 6} of theTextFields

  • Reading the data from one component view into another component view

    Hi All,
    I have requirement to read the data from one component into another component while creating the service order. Here are the details.
    Main View for Service order: BT116H_SRVO in that we have two assignment blocks like Organizational data(BTORGSET) and amount allocation(BTAMNTALL).This two blocks are two different component which are associated with main component(BT116H_SRVO).
    I need to read the sales org data from component/View(BTORGSET/Orgsetdata) into Component/View(BTAMNTALL(HdrBillPlanDet) method DO_VALIDATE_INPUT.
    I searched in SDN but all the posts are related to the data exchange between two views in same component. But My scenario is different as explained above.
    Refer the attachments for the component link..
    Please let me know how we can achieve this one..
    Thanks,
    Sapsar.

    Finally I was able to fix my code...My Mistakes were need to read the parent node above three levels and need to use the relation entity name while reading the data..
    Below is the correction code
    IF iv_index IS NOT INITIAL.
         lr_iterator ?= collection_wrapper->get_iterator( ).
         lr_current ?= lr_iterator->get_by_index( iv_index ).
         lr_entity ?= lr_iterator->get_by_index( iv_index ).
       ELSE.
         lr_current = collection_wrapper->get_current( ).
       ENDIF.
    *loop back to root entity
             WHILE lr_entity->get_name( ) NE 'BTAdminH'.
               lr_entity = lr_entity->get_parent( ).
             ENDWHILE.
    *Get the related entity
             IF lr_entity IS BOUND.
               lr_collection ?= lr_entity->get_related_entities( iv_relation_name = 'BTHeaderOrgmanSet' ) .
               IF lr_collection IS BOUND.
                 lr_orgset_m = lr_collection->get_current( ).
    *            lr_orgset = lr_orgset_m->get_related_entity( iv_relation_name = 'BTOrgSet' ).
                 lr_orgset = lr_orgset_m->get_property_as_string( 'SALES_ORG' ).
               ENDIF.
             ENDIF.
    Thanks,
    Sapsar.

  • How to extract data from CLOB and insert them into DB?

    Hi PL/SQL Gurus,
    I have no experience in PL/SQL, but I have a requirement now where I have to use it.
    We have a table with 10 columns, one of them is a CLOB and it holds XML data. The XMLs are very huge in size.
    Two new columns are added to the table and the data has to be filled for the existing records from the corresponding XML. The XML has all the data as attributes. I started searching on the internet and tried if I could extract the data out of XML.
    SELECT extractValue(value(x), '/Order/Package/@Code',
    'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"' )
    FROM ORDER_TABLE A
    , TABLE(
    XMLSequence(
    extract(
    xmltype(A.XML_DATA)
    , '/ns0:Root'
    , 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"'
    ) x;
    But this isn't working. Could anyone please provide some ideas.
    I just want to confirm that I am able to extract data. Once this is done I would like to create a procedure so that all the existing records can be updated.
    Thanks in advance.
    Regards,
    Fazzy

    Can this be acheived using a SQL statement.Yes, you can do it with the DML error logging clause.
    Here's a quick example I've just set up :
    Base table
    SQL> create table order_table (
      2   order_id number,
      3   package_code varchar2(30),
      4   package_desc varchar2(100),
      5   xml_data clob
      6  );
    Table created
    SQL> alter table order_table add constraint order_table_pk primary key (order_id);
    Table altered
    Adding data...
    SQL> insert into order_table (order_id, xml_data)
      2  values (1, '<?xml version="1.0" encoding="UTF-8"?>
      3  <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
      4  <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
      5  <ns0:Package Code="0001" Desc="ProductName1"/>
      6  <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
      7  <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
      8  <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
      9  <ns0:SellingCurrency Code="EUR" Name="Euro"/>
    10  <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
    11  <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
    12  </ns0:Root>');
    1 row inserted
    SQL> insert into order_table (order_id, xml_data)
      2  values (2, '<?xml version="1.0" encoding="UTF-8"?>
      3  <ns0:Root xmlns:ns0="http://mycompany.com/Order/OrderType.xsd" BookingDate="2009-06-07">
      4  <ns1:OrderKey xmlns:ns1="http://mycompany.com/Order/OrderKeyTypes.xsd" SystemCode="THOMAS" Id="458402-TM1" Version="1"/>
      5  <ns0:Package Code="0002" Desc="ProductName2/>
      6  <ns0:PromotionGroup Code="DSP" Name="OrderThomasPortal"/>
      7  <ns0:Promotion Code="TH902" Name="OrderThomasPortal" SellingName="OrderThomasPortal" BackOfficeName="OrderThomasPortal"/>
      8  <ns0:FinancialSupplier Code="HHT" Name="NYOrdSupp"/>
      9  <ns0:SellingCurrency Code="EUR" Name="Euro"/>
    10  <ns0:Owner ClientId="02654144" ClientMandator="T" ClientSystem="ROSY"/>
    11  <ns0:Agent PersonInAgency="5254" AgentCode="000009" CommissionAmount="2.8" CommissionDueDate="2009-07-01+02:00" VatOnCommission="0"/>
    12  </ns0:Root>');
    1 row inserted
    SQL> commit;
    Commit complete
    {code}
    Note that the second row inserted contains a not well-formed XML (no closing quote for the /Root/Package/@Desc attribute).
    *Creating the error logging table...*
    {code}
    SQL> create table error_log_table (
      2   ora_err_number$ number,
      3   ora_err_mesg$   varchar2(2000),
      4   ora_err_rowid$  rowid,
      5   ora_err_optyp$  varchar2(2),
      6   ora_err_tag$    varchar2(2000)
      7  );
    Table created
    {code}
    *Updating...*
    {code}
    SQL> update (
      2    select extractvalue(doc, '/ns0:Root/ns0:Package/@Code', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_code
      3         , extractvalue(doc, '/ns0:Root/ns0:Package/@Desc', 'xmlns:ns0="http://mycompany.com/Order/OrderType.xsd"') as new_package_desc
      4         , package_code
      5         , package_desc
      6    from (
      7      select package_code
      8           , package_desc
      9           , xmltype(xml_data) doc
    10      from order_table t
    11    )
    12  )
    13  set package_code = new_package_code
    14    , package_desc = new_package_desc
    15  log errors into error_log_table ('My update process')
    16  reject limit unlimited
    17  ;
    1 row updated
    SQL> select order_id, package_code, package_desc from order_table;
      ORDER_ID PACKAGE_CODE                   PACKAGE_DESC
             1 0001                           ProductName1
             2                               
    {code}
    One row has been updated as expected, the other has been rejected and logged into the error table :
    {code}
    SQL> select * from error_log_table;
    ORA_ERR_NUMBER$ ORA_ERR_MESG$                                                                    ORA_ERR_ROWID$     ORA_ERR_OPTYP$ ORA_ERR_TAG$
              31011 ORA-31011: XML parsing failed                                                    AAAF6PAAEAAAASnAAB U              My update process
                    ORA-19202: Error occurred in XML processing                                                                       
                    LPX-00244: invalid use of less-than ('<') character (use &lt;)                                                    
                    Error at line 5                                                                                                   
                    ORA-06512: at "SYS.XMLTYPE", line 272                                                                             
                    ORA-06512: at line 1                                                                                              
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Error in fetching the data from textfield and inserting to the database..

    I'm using Java Swing as front end and MySQL as backend using the netbeans ide..I am trying to fetch the data from the textfiled in the form and insert to the database table.i've skipped the generated code..In the following code i get the erro cannot find symbol "stmt" in the actionPerformed method..
    mport java.awt.event.*;
    import java.sql.*;
    public class BarcodeReader extends JFrame implements ActionListener {
    public BarcodeReader() {
    initComponents();
    nb.addActionListener(this);
    public void jdbcConnect(){
    Connection con=null;
    String url = "jdbc:mysql://localhost:3306/";
    String db = "mynewdatabase";
    String driver = "com.mysql.jdbc.Driver";
    String user = "usrname";
    String pass = "pwd";
    try{
    String s=newtxt.getText();
    con=DriverManager.getConnection(url + db, user, pass);
    Statement stmt=con.createStatement();
    Class.forName(driver);
    public void actionPerformed(ActionEvent e){
    try{
    jdbcConnect();
    stmt.executeUpdate("INSERT into machine(mname) values '"+jTextField1.getText()+"'");
    }}catch (Exception ex) {
    System.out.println(ex);
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new BarcodeReader().setVisible(true);
    }

    There are far too many errors to try and clear.
    For one, the exception references the actionPerformed method (according to your text), so why is that not shown here?
    For another you are performing, possible time-consuming, actions, and even worse IO actions, on the event thread, which is a huge no-no.
    You are not closeing your resources properly, if at all, which is another huge no-no.
    You are completely mixing your "view" (the gui), and your "model" (the data related classes), which is another huge no-no.
    etc, etc, etc.

  • Workflow for exporting xml from Excel and importing into table in InDesign

    Hello,
    I have worked out how to get data from a .xlsx into a table in InDesign. However, the workflow is still a little clunky and I am looking for way to automate the process further. My current workflow is as follows (files can be download here: http://visual360.co.uk/xml.zip)
    xml is exported from .xlsx by mapping the schema (see what_I_get.xml)
    assign tags to table and individual cells in InDesign
    This is the clunky bit: edit the what_I_get.xml to:
    remove the indentation (this seems necessary as otherwise when I get to stage 4, all the imported text is also indented)
    add tag for table in InDesign (p10_table)
    add tags for individual cells (p10_c11 etc.)
    import the produced what_I_want.xml in the structure panel of InDesign.
    Can anyone point me in the direction of how to automate step 3 above?
    Thanks in advance,
    Nick

    Hi Mike,
    Thanks very much for the reply. I am not at all familiar with XSL/XSLT. I have given it a quick google and it seems like it could be quite a steep learning curve to master. Maybe if I explain the whole context here, it may allow you to point me in the direction of a tutorial that provides a step by step approach to achieve my final goal. Alternatively, you may be able to suggest a whole new workflow.
    I am in the process of updating this document: http://www.ncl.ac.uk/students/insessional/assets/documents/IS_Brochure_2014-15.pdf
    The tables on pages 10-21 contain lots and lots of repeated information. We want the layout to in this format so that each group of students has all the information relevant to them on a single double spread. However, the challenge of using this approach is that it is very high maintenance to ensure the duplicated information is kept in sync - even using a copy / paste approach.
    I was hoping to overcome this by using a single source of data (eg. a spreadsheet) which would then feed into the InDesign. This workflow seems to be overcomplicated by the apparent need to use xml as the "middle-man".
    Ideally, I would like to press the export button in Excel and get this information into the the correct cells in the tables on pages 10-21 without a significant amount of manual labour - after all, my reasons for investigating an automated approach in the first place was to avoid the manual entering of data ie. the scope for error...
    An alternative approach maybe to skip Excel altogether and just use .xml. However, I am not sure that this is possible as Indesign only seems to allow you to import each element once. Maybe you could correct me here...
    I am happy to invest a certain amount of time in developing this approach as once it is in place, it will save a huge of proof-reading time year after year, especially as inconsistencies still persist despite our best efforts to weed them out.
    If you could let me know your thoughts on this and maybe identify a tutorial that would help me, I would be extremely grateful.
    Thanks again!
    Nick

Maybe you are looking for

  • BPEL Server classpath has priority over a BPEL Process classpath

    Hi all I developed a BPEL process which uses org.apache.commons.io.FileUtils class (latest version 1.3.1) through a <bpel exec> activity. However, when I deploy it to a BPEL 10.1.3 server it throws an exception warning me that the method doens´t exis

  • Size of image is getting increased

    Hi I have cross compiled BDB using m68k-elf toolchain. I'm using motorola coldfire processor with uClinux for our development purpose. Now I need to include BDB into uClinux and flash it into our processor. The flash we are using is 4mb. The image I

  • E recruitment Internal error( Rabax_state) in webdynpro abap services

    Hi all, We are facing an error as shown below in our webdynpro services for E recruitment release 604 level 0006 and Ecc 6.0 , all customizations has been done , trex already installed and running properly but many of services throwing this error as

  • Export and import oracle xe application users

    How can i import a user'sexport script using sqlplus? i make a export with application->export->users to a file exportuser.sql but when i'm try to import with sqlplus i get ORA-20001: Unauthorized access (wwv_flow_api.set_credentials). I need to make

  • Location of reserve copy of Pages

    I was wondering or it is posible to save all the reserve copy which Pages can create automatically, save in just one location. In that way the folders stay organized. can someone tel me or this is posible