OSB - XQuery - line 7, col 2: {err}FORG0005: expected exactly 1 item, got 0

Hi,
I am trying to execute the below sample XQuery. Eclipse designer does not show any error. However on executing the XQuery, I get the following error "+Error executing the XQuery transformation: line 7, column 2: {err}FORG0005: expected exactly one item, got 0 items+". Appreciate your help.
xquery version "1.0" encoding "UTF-8";
declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
declare function xf:Ids()
as element() {*
*     let $abc := <catalog><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>*
*     for $product in $abc/catalog/product*
*     let $name := $product/name*
*     where $product/@dept = "ACC"*
*     order by $name*
*     return $name*
xf:Ids()

Thanks, for the answer.
I just tweeked my XQuery:Var = $abc a little and ended up with same issue. Request your help again.
xquery version "1.0" encoding "UTF-8";
declare namespace xf = "http://tempuri.org/OSB%20Project%201/Ids/";
declare function xf:Ids() as element(*)? {
let $abc := +<catalog><product dept="MEN" xmlns="http://datypic.com/prod"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="ACC"><number>563</number><name language="en">Floppy Sun Hat</name></product><product dept="ACC"><number>443</number><name language="en">Deluxe Travel Bag</name></product><product dept="MEN"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Ou<i>favorite</i> shirt! </desc></product><product dept="WMN"><number>557</number><name language="en">Fleece Pullover</name><colorChoices>navy black</colorChoices></product></catalog>+
--(:<catalog><product dept="ACC"><number>784</number><name language="en">Cotton Dress Shirt</name><colorChoices>white gray</colorChoices><desc>Our favorite shirt!</desc></product></catalog>:)--
for $product in $abc/product
let $name := $product/name
where $product/@dept = "ACC"
order by $name
return $name
xf:Ids()

Similar Messages

  • OSB - XQuery - line 24, col 1 {err}FORG0005: expected 1 item, got 2 or mor

    In the below XQ, I am trying to learn making calls to local functions. I have tweaked my earlier XQ, which had a local variable defined [in xf:getCost() function] as XPath to Quantity. Now, I have modified the XQ to make a call to xf:getQty() from xf:getCost(), to get the desired Quantity.
    On executing the below code I get Error occurred while executing XQuery: line 24, column 1: {err}FORG0005: expected exactly one time, got 2+ items. Either the XQuery is invalid or .... Request Help
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma type="xs:anyType" ::)
    declare namespace xf = "http://tempuri.org/purchaseOrder/";
    declare function xf:getCost()
    as xs:double {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    let $s1 := $po/order-item/@price
    let $s2 := $po/order-item/@quantity
    let $s3 := sum(for $el at $i in $s1 return $s1[$i] * xf:getQty($i))
    return $s3
    declare function xf:getQty($index as xs:decimal)
    as xs:decimal {
    let $po := <purchase-order>
    <red-tape/>
    <order-item product="p010" price="10.50" quantity="3"/>
    <order-item product="p020" price="18.10" quantity="8"/>
    <order-item product="p020" price="11.10" quantity="8"/>
    </purchase-order>
    return ($po/order-item/@quantity[$index])
    xf:getCost()

    return ($po/order-item[$index]/@quantity)
    not
    return ($po/order-item/@quantity[$index])

  • Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items

    Hi ,
    Good Morning to all
    in osb replace action am using xquery transformation resource.
    source code of xquery is :
    ====================================================================================
    (:: pragma bea:global-element-parameter parameter="$addition1" element="ns0:Addition" location="../wsdl/NewWSDLFile.wsdl" ::)
    (:: pragma bea:global-element-return element="ns1:process" location="../bpelprocess1_client_ep.wsdl" ::)
    declare namespace ns1 = "http://xmlns.oracle.com/POProcessing/AdditionOSB/BPELProcess1";
    declare namespace ns0 = "http://www.example.org/NewWSDLFile/";
    declare namespace xf = "http://tempuri.org/ServiceCallout/trans/route/";
    declare function xf:route($addition1 as element(ns0:Addition))
    as element(ns1:process) {
    <ns1:process>
    <ns1:value1>{ data($addition1/value1) }</ns1:value1>
    <ns1:value2>{ data($addition1/value2) }</ns1:value2>
    </ns1:process>
    declare variable $addition1 as element(ns0:Addition) external;
    xf:route($addition1)
    =====================================================
    at the time of running "error is Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items " in replace action.
    how to resolve this problem...
    Thanks & Regards
    venky

    The reason for the error is the xquery is not able to find the values in the input... Check the input and namespaces...
    Try...
    <ns1:value1>{ data($addition1/ns0:value1) }</ns1:value1>
    <ns1:value2>{ data($addition1/ns0:value2) }</ns1:value2>Cheers,
    Vlad

  • OSB download 250 MG file results in error Error parsing XML: {err}FORG0005

    Hi,
    Using OSB 11.1.1.5. I have service to download files from Oracle ECM. Running into an issue where the file size is over 250 MB service is failing. Giving me an error
    OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    I have service callout to get the binary content of the file and it's taking over 5 minutes and then this error. I also set Read Timeout and Connection Timeout to 20 seconds at the business service level
    but looks like it's not taking that timeout values and still waiting over 5 minutes before it dies. My JTA Timeout is set to 12 minutes. After service callout I have a log to write the output but it's not even getting there and throwing that error above
    How can I trap that kind of errors. How can I set timeout at service level i.e. if after 1 minute if the file is still downloading close the connection etc.
    I don't want to have some many open threads in the back ground as this service is being called in a loop to download files. Smaller files like 30 MG downloads fine but the larger ones are not.
    I have a error hndler at the root level but the error is not trapped there either. Looks like system errors are not getting trapped.
    So Just wondering if OSB is suitable to download that huge files.
    Thanks

    The reason for the error is the xquery is not able to find the values in the input... Check the input and namespaces...
    Try...
    <ns1:value1>{ data($addition1/ns0:value1) }</ns1:value1>
    <ns1:value2>{ data($addition1/ns0:value2) }</ns1:value2>Cheers,
    Vlad

  • FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col

    I have an ODSI Physical Service that is based on a Java Function. The Java Function builds a SQL statement and uses JDBC to query for a ResultSet. One of the columns that is queried is a Clob. Sometimes, the data in this column causes an XMLBeans validation exception in ODSI: {err}XQ0027: Validation failed: error: decimal: Invalid decimal value: unexpected char '114'
    The issue is not consistently replicable with particular database record, the database records that present this issue at one point in time will be resolved after a restart of ODSI and replaced by another list of records that present the same error.
    As can be seen from the stack trace, it looks like the issue is happening after the database query has returned and while the process is assembling the SOAP response.
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:510)
    at weblogic.xml.babel.baseparser.EndElement.parse(EndElement.java:34)
    at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:457)
    at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:326)
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    at weblogic.xml.query.parsers.BufferedParser.fetchNext(BufferedParser.java:79)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:308)
    at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
    at weblogic.xml.query.schema.BestEffortValidatingIterator$OpenedIterator.hasNext(BestEffortValidatingIterator.java:224)
    at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:82)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.schema.BestEffortValidatingIterator.fetchNext(BestEffortValidatingIterator.java:85)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.fetchNext(SeqTypeMatching.java:137)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at com.bea.dsp.wrappers.jf.JavaFunctionIterator.fetchNext(JavaFunctionIterator.java:273)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
    at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
    at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:247)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
    at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:251)
    at com.bea.ld.server.ResultPusher$DSP25CompatibilityPusher.next(ResultPusher.java:236)
    at com.bea.ld.server.ResultPusher.pushResults(ResultPusher.java:112)
    at com.bea.ld.server.XQueryInvocation.execute(XQueryInvocation.java:770)
    at com.bea.ld.EJBRequestHandler.invokeQueryInternal(EJBRequestHandler.java:624)
    at com.bea.ld.EJBRequestHandler.invokeOperationInternal(EJBRequestHandler.java:478)
    at com.bea.ld.EJBRequestHandler.invokeOperation(EJBRequestHandler.java:323)
    at com.bea.ld.ServerWrapperBean.invoke(ServerWrapperBean.java:153)
    at com.bea.ld.ServerWrapperBean.invokeOperation(ServerWrapperBean.java:80)
    at com.bea.ld.ServerWrapper_s9smk0_ELOImpl.invokeOperation(ServerWrapper_s9smk0_ELOImpl.java:63)
    at com.bea.dsp.ws.RoutingHandler$PriviledgedRunner.run(RoutingHandler.java:96)
    at com.bea.dsp.ws.RoutingHandler.handleResponse(RoutingHandler.java:217)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:176)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <Apr 29, 2011 12:47:01 PM EDT> <Notice> <ODSI> <BEA-000000> <LabOrderDataServices> <Error occurred performing ODSI operation: {ld:LabOrder/logical/LabOrderReport}getLabOrderDetails:1
    weblogic.xml.query.exceptions.XQueryDynamicException: ld:LabOrder/logical/LabOrderReport.ds, line 34, column 6: {err}FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:95)
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:147)
    at weblogic.xml.query.parsers.Parser.reportParseError(Parser.java:157)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:225)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    Truncated. see log file for complete stacktrace
    javax.xml.stream.XMLStreamException: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    Truncated. see log file for complete stacktrace
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    Truncated. see log file for complete stacktrace
    >
    Can somebody shed some light on this issue?
    Thanks
    Edited by: user738507 on May 6, 2011 7:21 AM

    Here is the java function:
         * Iterate through the search results and build out the XmlBean response
         * @param helper A helper class used to simplify common JDBC commands
         * @param doc The XmlBean document to populate
         * @param isCollectionsIncluded True if Collection info should be included in results, False otherwise
         * @param isFullDetailsIncluded True if Result data should be included in results, False otherwise
         * @throws Exception
         private static void addOrders(XmlBeansJDBCHelper helper, LabOrderReportDocument doc,
                   boolean isCollectionsIncluded, boolean isFullDetailsIncluded) throws Exception {
              int rows = 0;
              ResultSet rs = helper.getResultSet();
              LabOrders labOrders = doc.getLabOrderReport().addNewLabOrders();
              LabOrder record = null;
              HashMap<Long, Collection> parentCollectionMap = null;
              // initialize variable used to track when child elements of the XML should be created
              long previousRowOrderId = 0;
              long previousRowParentOrderCollectionId = 0;
              long previousRowOrderCollectionId = 0;
              long previousRowResultId = 0;
              boolean isRootCollectionNode = false;
              LabOrder.Collections lastParentOuterCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection.Collections lastParentInnerCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection lastCollectionAdded = null;
              Result lastResultAdded = null;
              // Loop through the results and build XmlBean nodes for each row
              // Since the SQL is joining Orders to Collections (one-to-many) to Results (one-to-many),
              // and returning a flat structure, there will be duplicate Order data on each row when
              // multiple collections exist on the Order, and duplicate Collection data when multiple
              // Results exist. We can use this fact to determine when to create a new Collection, or
              // Result node.
              while (helper.getResultSet().next())
                   rows++;
                   long currentRowParentOrderCollectionId = 0;
                   long currentRowOrderCollectionId = 0;
                   long currentRowResultId = 0;
                   long currentRowResultRemarkId = 0;
                   //int rowno = helper.getResultSet().getRow();
                   // Get the Order ID
                   logDebug("Getting the OrderId.....");
                   BigInteger dbOrderId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_ID);
                   logDebug("DONE getting the OrderId.");
                   long currentRowOrderId = dbOrderId.longValue();
                   // Determine the Order ID, Order Collection ID, and Result ID currently being processed.
                   // These will be used to determine whether to start a new LabOrder Bean, Collections Bean, or Results Bean
                   if (isCollectionsIncluded || isFullDetailsIncluded) {
                        // Get the ParentOrderCollectionID
                        logDebug("Getting the Parent Collection Order ID.....");
                        BigInteger dbParentOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.PARENT_ORDER_COLLECTION_ID);
                        if ( dbParentOrderCollectionId != null )
                             currentRowParentOrderCollectionId = dbParentOrderCollectionId.longValue();
                        else
                             currentRowParentOrderCollectionId = 0;
                        // Get the OrderCollectionID
                        logDebug("Getting the Order Collection ID.....");
                        BigInteger dbOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_COLLECTION_ID);
                        if ( dbOrderCollectionId != null )
                             currentRowOrderCollectionId = dbOrderCollectionId.longValue();
                        else
                             currentRowOrderCollectionId = 0;
                        if ( isFullDetailsIncluded ) {
                             // Get the ResultID
                             logDebug("Getting the Result Id.....");
                             BigInteger dbResultId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_ID);
                             if ( dbResultId != null )
                                  currentRowResultId = dbResultId.longValue();
                             else
                                  currentRowResultId = 0;
                             // Get the ResultRemarkID
                             BigInteger dbResultRemarkId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_REMARK_ID);
                             if ( dbResultRemarkId != null )
                                  currentRowResultRemarkId = dbResultRemarkId.longValue();
                             else
                                  currentRowResultRemarkId = 0;
                   isRootCollectionNode = (currentRowParentOrderCollectionId == 0);
                   logDebug("currentRowOrderId: " + currentRowOrderId);
                   logDebug("previousRowOrderId: " + previousRowOrderId);
                   logDebug("currentRowResultId: " + currentRowResultId);
                   logDebug("previousRowResultId: " + previousRowResultId);
                   logDebug("currentRowResultRemarkId: " + currentRowResultRemarkId);
                   logDebug("previousRowResultRemarkId: N/A");
                   logDebug("currentRowParentOrderCollectionId: " + currentRowParentOrderCollectionId);
                   logDebug("previousRowParentOrderCollectionId: " + previousRowParentOrderCollectionId);
                   logDebug("currentRowOrderCollectionId: " + currentRowOrderCollectionId);
                   logDebug("previousRowOrderCollectionId: " + previousRowOrderCollectionId);
                   if ( currentRowOrderId != previousRowOrderId ) {
                        parentCollectionMap = new HashMap<Long, Collection>();
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        // This is a new Order, generate a new Lab Order bean
                        record = addOrder(labOrders, helper, dbOrderId, isFullDetailsIncluded);
                        logDebug("Order Added!");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             lastParentOuterCollectionsAdded = record.addNewCollections();
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, true);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             if ( isRootCollectionNode ) {
                                  lastParentOuterCollectionsAdded = record.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                                  logDebug("parent collection added to map: " + currentRowOrderCollectionId);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  logDebug("Adding result....");
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  logDebug("Result Added!");
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                        logDebug("DONE getting first Collection and Result.");
                   else if ( currentRowParentOrderCollectionId != previousRowParentOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new, top level, Order Collection to be included
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        logDebug("Getting next Order Collection...");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode ) {
                             lastCollectionAdded = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             logDebug("A Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 ) {
                             if ( isRootCollectionNode ) {
                                  //LabOrder.Collections collections = record.addNewCollections();
                                  lastParentOuterCollectionsAdded = record.getCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("B Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowOrderCollectionId != previousRowOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new Order Collection to be included inside of a parent collection
                        logDebug("Getting next CHILD Order Collection...");
                        logDebug("isRootCollectionNode: " + isRootCollectionNode);
                        logDebug("Order ID: " + helper.getBigInteger(DataConstants.ORDER_ID));
                        logDebug("Order Collection ID: " + helper.getBigInteger(DataConstants.ORDER_COLLECTION_ID));
                        logDebug("Collection ID: " + helper.getBigInteger(DataConstants.COLLECTION_ID));
                        if ( isRootCollectionNode ) {
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                             parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                        else {
                             com.idexx.services.lde.laborder.Collection parentCollection = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             if(parentCollection == null) {
                                  log(LOG_LEVEL.WARN, "Parent Collection with id: " + currentRowParentOrderCollectionId + " is null for collection id: " + currentRowOrderCollectionId + " but isRootCollectionNode is " + isRootCollectionNode);
                             } else {
                                  lastParentInnerCollectionsAdded = parentCollection.getCollections();
                                  logDebug("Is lastParentInnerCollectionsAdded null? " + (lastParentInnerCollectionsAdded == null));
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                        // If there is Result data and it should be included, build a Results element,
                        // and populate the first one
                        if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                             lastResultAdded = addResult(record, helper, lastCollectionAdded);
                             // If there is Result Remark data and it should be included, build a ResultRemarks element,
                             // and populate the first one
                             if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                  addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowResultId != previousRowResultId
                             && isFullDetailsIncluded ) {
                        // There is a new Result to be included
                        logDebug("Getting next Result...");
                        // This is a new result to be included
                        lastResultAdded = addResult(record, helper, lastCollectionAdded);
                        // If there is Result Remark data and it should be included, build a ResultRemarks element,
                        // and populate the first one
                        if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                             addResultRemark(record, helper, lastResultAdded);
                   else if ( isFullDetailsIncluded ) {
                        // There is a new Result Remark to include
                        logDebug("Getting next Result Remark...");
                        // This is a new result remark to be included
                        addResultRemark(record, helper, lastResultAdded);
                   logDebug("Done building response.");
                   previousRowResultId = currentRowResultId;
                   previousRowParentOrderCollectionId = currentRowParentOrderCollectionId;
                   previousRowOrderCollectionId = currentRowOrderCollectionId;
                   previousRowOrderId = currentRowOrderId;
              logDebug("Found " + rows + " rows of data.");
         }

  • SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)

    Hi Gurus,
    I am trying to load a HANA column table using the import function and get the following error even though the mappings from the file to the table are 1:1.
    I get the following errors:
    Error 1: SAP DBTech JDBC: Result set is positioned before first row.
    Error 2: SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)
    With the following stack trace:
    com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: [259] (at 26): invalid table name:  Could not find table/view RS_POOL_CLUSTER_TABLES in schema SYSTEM: line 1 col 27 (at pos 26)
      at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.createException(SQLExceptionSapDB.java:334)
      at com.sap.db.jdbc.exceptions.SQLExceptionSapDB.generateDatabaseException(SQLExceptionSapDB.java:165)
      at com.sap.db.jdbc.packet.ReplyPacket.buildExceptionChain(ReplyPacket.java:100)
      at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:1141)
      at com.sap.db.jdbc.ConnectionSapDB.execute(ConnectionSapDB.java:888)
      at com.sap.db.jdbc.StatementSapDB.sendCommand(StatementSapDB.java:929)
      at com.sap.db.jdbc.StatementSapDB.sendSQL(StatementSapDB.java:978)
      at com.sap.db.jdbc.StatementSapDB.execute(StatementSapDB.java:256)
      at com.sap.db.jdbc.StatementSapDB.executeQuery(StatementSapDB.java:401)
      at com.sap.db.jdbc.trace.Statement.executeQuery(Statement.java:131)
      at com.sap.ndb.studio.bi.dataprovisioning.util.DBUtil.getPoolTables(DBUtil.java:200)
      at com.sap.ndb.studio.bi.dataprovisioning.util.DBUtil.getTablesToHide(DBUtil.java:188)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.SelectTableDialog.createDialogArea(SelectTableDialog.java:108)
      at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:775)
      at org.eclipse.jface.window.Window.create(Window.java:432)
      at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1104)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.SelectTableDialog.create(SelectTableDialog.java:186)
      at com.sap.ndb.studio.bi.filedataupload.ui.wizards.pages.ImportFileSelectionWizardPage$14.widgetSelected(ImportFileSelectionWizardPage.java:779)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
      at org.eclipse.jface.window.Window.open(Window.java:802)
      at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:152)
      at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:279)
      at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
      at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
      at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
      at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
      at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
      at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
      at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
      at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
      at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
      at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
      at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:420)
      at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
      at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
    I'm sure many of you have come across this before. Any help will be much appreciated.
    Thanks in advance

    Hello Akhtar,
    Have you tryed to delete the heador row from your file?
    I received the same error when loading a csv file, but when I delete the heador row it worked.
    Best Regards,
    Juliana Genova

  • [wsgen] Error at line:9 col:12  ':' Already got a ':' in name

    Getting the following error trying to generate a web service.
    Any ideas? Thanks
    WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
    WebLogic XML Module 6.1 SP1 09/18/2001 14:43:02 #138716
    <taskdef name="wsgen" classname="weblogic.ant.taskdefs.ejb.WSGen" classpath="${prj.classpath.javac};${wls.home.dir}/lib/xmlx.jar;"
    />
    <target name="create_ws" depends="create_ear">
    <wsgen basepath="${build.home.dir}/${Name}.ear" destpath="${build.home.dir}/${Name}WS.ear"
    port="80" context="/websrv" protocol="http"
    classpath="${build.app.dir}/Test.jar" >
    <rpcservices module="${Name}Ejb.jar">
    <rpcservice bean="ejb/TestHome" uri="/Test"/>
    </rpcservices>
    </wsgen>
    </target>
    create_ws:
    [wsgen] Error at line:9 col:12 ':' Already got a ':' in name
    [wsgen] at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    [wsgen] at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    [wsgen] at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
    [wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    [wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    [wsgen] at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    [wsgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [wsgen] at org.apache.tools.ant.Target.execute(Target.java:184)
    [wsgen] at org.apache.tools.ant.Target.performTasks(Target.java:202)
    [wsgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [wsgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [wsgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [wsgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [wsgen] at org.apache.tools.ant.Main.main(Main.java:176)

    Getting the following error trying to generate a web service.
    Any ideas? Thanks
    WebLogic Server 6.1 SP1 09/18/2001 14:28:44 #138716
    WebLogic XML Module 6.1 SP1 09/18/2001 14:43:02 #138716
    <taskdef name="wsgen" classname="weblogic.ant.taskdefs.ejb.WSGen" classpath="${prj.classpath.javac};${wls.home.dir}/lib/xmlx.jar;"
    />
    <target name="create_ws" depends="create_ear">
    <wsgen basepath="${build.home.dir}/${Name}.ear" destpath="${build.home.dir}/${Name}WS.ear"
    port="80" context="/websrv" protocol="http"
    classpath="${build.app.dir}/Test.jar" >
    <rpcservices module="${Name}Ejb.jar">
    <rpcservice bean="ejb/TestHome" uri="/Test"/>
    </rpcservices>
    </wsgen>
    </target>
    create_ws:
    [wsgen] Error at line:9 col:12 ':' Already got a ':' in name
    [wsgen] at weblogic.xml.babel.baseparser.SAXElementFactory.createSAXParseException(SAXElementFactory.java:60)
    [wsgen] at weblogic.xml.babel.parsers.StreamParser.<init>(StreamParser.java:45)
    [wsgen] at weblogic.xml.babel.parsers.BabelXMLEventStream.startDocument(BabelXMLEventStream.java:28)
    [wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:600)
    [wsgen] at weblogic.soap.WebServiceProxy.getXMLStream(WebServiceProxy.java:577)
    [wsgen] at weblogic.soap.WebServiceProxy.getServiceFrom(WebServiceProxy.java:225)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeClientJar(WSGenHelper.java:1125)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.writeWSDL(WSGenHelper.java:1285)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.saveDescriptors(WSGenHelper.java:1418)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.output(WSGenHelper.java:1486)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGenHelper.doit(WSGenHelper.java:1520)
    [wsgen] at weblogic.ant.taskdefs.ejb.WSGen.execute(WSGen.java:93)
    [wsgen] at org.apache.tools.ant.Task.perform(Task.java:217)
    [wsgen] at org.apache.tools.ant.Target.execute(Target.java:184)
    [wsgen] at org.apache.tools.ant.Target.performTasks(Target.java:202)
    [wsgen] at org.apache.tools.ant.Project.executeTarget(Project.java:601)
    [wsgen] at org.apache.tools.ant.Project.executeTargets(Project.java:560)
    [wsgen] at org.apache.tools.ant.Main.runBuild(Main.java:454)
    [wsgen] at org.apache.tools.ant.Main.start(Main.java:153)
    [wsgen] at org.apache.tools.ant.Main.main(Main.java:176)

  • ERROR line 39, col 10, ending_line 39, ending_col 18, Found 'immediate', Ex

    Hi,
    Does anyone has an idea for this problem?
    exec immediate 'select * from sch.jb_'||TRIM(p_type)
    ||'my_vs where Z'||trim(p_type)||'no=:1'
    using p_my_id;
    ERROR line 39, col 10, ending_line 39, ending_col 18, Found 'immediate', Expecting: ; -or- := -or- . -or- ( -or- @ -or- ROW
    Regards,
    huamin

    user12233770 wrote:
    Hi,
    This is the part in the function. I will detect if there is any row returned or not. What's the problem with 'exec ...'?
    exec immediate 'select * from sch.jb_'||TRIM(p_type)
    ||'my_vs where Z'||trim(p_type)||'no=:1'
    using p_my_id;
         if sql%rowcount=0 then
    Many thanks & Regards,
    huaminAn example of how to use dynamic sql.
    TUBBY_TUBBZ?declare
      2  l_count number;
      3  begin
      4  execute immediate 'select count(*) from all_objects where owner = :x' into l_count using user;
      5  dbms_output.put_line(user || ' owns ' || l_count || ' objects');
      6  end;
      7  /
    TUBBY owns 138 objects
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.47
    TUBBY_TUBBZ?

  • Join attribute must be available in projection list: Customer_Id: line 28 col 45 (at pos 897)

    Hi folks ,
    I am getting the "Join attribute must be available in projection list: Customer_Id: line 28 col 45 (at pos 897) " though i put the Customer_Id in both the tables.  See the below which i am executing.
    p_cc_det =  CE_COLUMN_TABLE("Retail_Schema"."Retail_Package1.Data::Customer_Details",["Customer_Id",
    "Customer_Code",
    "First_Name",
    "Middle_Name",
    "Last_Name",
    "Email",
    "Mobile"]);
    p_cc_det = CE_PROJECTION(:p_cc_det,["Customer_Id",
    "Customer_Code",
    "First_Name",
    "Middle_Name",
    "Last_Name",
    "Email",
    "Mobile"],'"Customer_Id" = :p_ccode');
    p_cust_code = CE_COLUMN_TABLE("Retail_Schema"."Retail_Package1.Data::Header_Fact_table",["Customer_Id",
    "Event_ID",
    "Time_ID",
    "Total_Discount",
    "Gross_Amount"]);
    p_tt_out1 = CE_JOIN(:p_cc_det,:p_cust_code,["Customer_Id"],
    ["Customer_Code",
    "First_Name",
    "Middle_Name",
    "Last_Name",
    "Gender",
    "Email",
    "Mobile",
    "Total_Discount",
    "Gross_Amount"]);
    Please tell me where exactly my code is wrong.
    Thanks & Regards
    Karuna

    p_tt_out1 = CE_JOIN(:p_cc_det,:p_cust_code,["Customer_Id"],
    ["Customer_Id",   -- This is missing in your projection list
    "Customer_Code",
    "First_Name",

  • How can I fix a xquery resulting error ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence  - got multi-item sequence

    Hello,
    How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
    ERROR:
    ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
    - got multi-item sequence
    XQUERY for $book in  fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy  where  $cont   [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
    /*ERROR:
    ORA-01706: user function result value was too large
    Regards,
    Daiane

    below query works for 1 iteration . but for multiple sets i am getting following error .
    When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
    Each item is then passed to the COLUMNS clause to be further shredded into columns.
    This should work as expected :
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x ;

  • ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence

    Hi ,
    I executed the below query in database version 11.2.0.3.0, it throws the error like "ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
    with PAYMENT_XML as (
          select XMLTYPE(
            '<Document>
            <pain.002.001.02>
                <GrpHdr>
                      <MsgId>CITIBANK/20091204-PSR/4274</MsgId>
                      <CreDtTm>2009-12-04T09:36:00</CreDtTm>
               </GrpHdr>
                <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10002</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>20</OrgnlNbOfTxs>
                <OrgnlCtrlSum>7000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
              <OrgnlGrpInfAndSts>
                <OrgnlMsgId>10001</OrgnlMsgId>
                <OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
                <OrgnlNbOfTxs>202</OrgnlNbOfTxs>
                <OrgnlCtrlSum>9000</OrgnlCtrlSum>
                <GrpSts>PART</GrpSts>
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
              </OrgnlGrpInfAndSts>
          </pain.002.001.02>
      </Document>') as OBJECT_VALUE1
       from dual
      select R.*
      from PAYMENT_XML,
           XMLTABLE(
           'for $COMP in $COMPANY/Document/pain.002.001.02
              for $DEPT at $DEPTIDX in $COMP/OrgnlGrpInfAndSts
               return <RESULT>
                        <NAME>{fn:data($COMP/GrpHdr/MsgId)}</NAME>
                          $DEPT/OrgnlMsgId,
                          $DEPT/OrgnlNbOfTxs,
                          $DEPT/OrgnlCtrlSum,
                          $DEPT/GrpSts,
                          $DEPT/StsRsnInf/AddtlStsRsnInf
                      </RESULT>'
           passing OBJECT_VALUE1 as "COMPANY"
           columns
             NAME            VARCHAR(10)  path 'NAME',
             OrgnlMsgId      VARCHAR2(24) path 'OrgnlMsgId',
             ORGNLNBOFTXS    VARCHAR2(24) path 'OrgnlNbOfTxs',
             ORGNLCTRLSUM    NUMBER       path 'OrgnlCtrlSum',
             GRPSTS          VARCHAR2(24) path 'GrpSts',
             ADDTLSTSRSNINF  VARCHAR2(40) path 'AddtlStsRsnInf'
         ) r
    Errors comes this part :
                <StsRsnInf>
                  <AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
                  <AddtlStsRsnInf>Formated</AddtlStsRsnInf>
                </StsRsnInf>
    if i put the single statement for this xml element <AddtlStsRsnInf> it works fine if more than one element comes it raised the error.
    i want the output like the below format : want to merge the element value with (, comma)  delimiter with single coloumn value
    NAME
    ORGNLMSGID
    ORGNLNBOFTXS
    ORGNLCTRLSUM
    GRPSTS
    ADDTLSTSRSNINF
    CITIBANK/2
    10002
    20
    7,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL
    CITIBANK/2
    10001
    202
    9,000
    PART
    ACK - FILE PARTIALLY SUCCESSFUL, Formated
    Thanks is advance for reply
    Thanks,
    Chidam

    Try with XQuery string-join() function :
    ADDTLSTSRSNINF  VARCHAR2(40) path 'string-join(AddtlStsRsnInf, ", ")'

  • I only purchase item 100 Line Coins $1.99 but it's double items ($3.98) in order

    I only purchase item 100 Line Coins $1.99 but it's double items ($3.98) in order

    You can contact iTunes support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • I would like to create a wavy line (the zig zag feature is not exactly what I need here) to outline

    I would like to create a wavy line (the zig zag feature is not exactly what I need here) to outline a shape and then fill it with a solid color. Any ideas?
    This is approx what I want; however the undulation needs to be more round and less peaked

    Barbara,
    If you wish to create a gap between the wavy line and the underlying object, you may:
    1) Select the wavy line and Object>Expand Appearance;
    2) In the Appearance palette flyout tick New Stroke, drag it beneath the original stroke and increase the Stroke Weight as desired and change the colour to white.
    If you wish to make the gap transparent, you may:
    3) Select the wavy line and Object>Expand Appearance and Ungroup;
    4) Select the white path and the underlying object and in the Transparency palette flyout tick Make Opacity Mask with Clip unticked and Invert Mask ticked.
    It may be done in other ways, too.

  • OSB XQuery Maps

    Greetings!
    1]. I use OSB 10.3 with Eclipse (OSB Workshop that comes with OSB 10.3 installabe) IDE for doing mapping.
    I draw lines from Source to Target structure in XQuery Transformation. I see the source code getting build. When I close the XQuery and open it again in the IDE, I see all the source to target lines in the design view disappear. However the source code is still there. Any ideas what might be wrong here?
    2] In my XQuery transformation target structure for elements when I mounse over I see the Nodename, Namespace prefix and Namespace URI. However for some elements I see the namespace URI but no namespace prefix. This is causing problem because in the source code and in the output it produces there are elements without namespace prefix rendering the output invalid. I cant think of why for some elements there are no namespace prefixes. Any advise?
    Only think I can think of is that the target structure seem to have a cyclic reference in the schema.. pls see below example. Is this a problem?
    <a:element1>
    <b:element2>
    <a:element3>
    </b:element>
    </a:element1>
    3] I generated XQuery using mapforce for a map and when I tried to use it in OSB, it errored stating Recursive XQueryies are not supported in OSB. Any thots?
    Thanks in advance

    +2] In my XQuery transformation target structure for elements when I mounse over I see the Nodename, Namespace prefix and Namespace URI. However for some elements I see the namespace URI but no namespace prefix. This is causing problem because in the source code and in the output it produces there are elements without namespace prefix rendering the output invalid. I cant think of why for some elements there are no namespace prefixes. Any advise?+
    Only think I can think of is that the target structure seem to have a cyclic reference in the schema.. pls see below example. Is this a problem?
    +<a:element1>+
    +<b:element2>+
    +<a:element3>+
    +</b:element>+
    +</a:element1>+
    Schema cyclic reference was causing the problem with empty namespace. I had to go in to the XQuery and manually add the namespace and prefic and qualify the elements. After this data gets mapped

  • In OSB , xquery issue with large volume data

    Hi ,
    I am facing one problem in xquery transformation in OSB.
    There is one xquery transformation where I am comparing all the records and if there are similar records i am clubbing them under same first node.
    Here i am reading the input file from the ftp process. This is perfectly working for the small size input data. When there is large input data then also its working , but its taking huge amount of time and the file is moving to error directory and i see the duplicate records created for the same input data. I am not seeing anything in the error log or normal log related to this file.
    How to check what is exactly causing the issue here,  why it is moving to error directory and why i am getting duplicate data for large input( approx 1GB).
    My Xquery is something like below.
    <InputParameters>
                    for $choice in $inputParameters1/choice              
                     let $withSamePrimaryID := ($inputParameters1/choice[PRIMARYID eq $choice/PRIMARYID])                
                     let $withSamePrimaryID8 := ($inputParameters1/choice[FIRSTNAME eq $choice/FIRSTNAME])
                     return
                      <choice>
                     if(data($withSamePrimaryID[1]/ClaimID) = data($withSamePrimaryID8[1]/ClaimID)) then
                     let $claimID:= $withSamePrimaryID[1]/ClaimID
                     return
                     <ClaimID>{$claimID}</ClaimID>                
                     else
                     <ClaimID>{ data($choice/ClaimID) }</ClaimID>

    HI ,
    I understand your use case is
    a) read the file ( from ftp location.. txt file hopefully)
    b) process the file ( your x query .. although will not get into details)
    c) what to do with the file ( send it backend system via Business Service?)
    Also noted the files with large size take long time to be processed . This depends on the memory/heap assigned to your JVM.
    Can say that is expected behaviour.
    the other point of file being moved to error dir etc - this could be the error handler doing the job ( if you one)
    if no error handlers - look at the timeout and error condition scenarios on your service.
    HTH

Maybe you are looking for

  • Using FINDER - Organise photos in ascending chronological order

    In windows you can put your photos in filename order, date created, modified etc the same as Finder, however I cannot find how to choose to put photos in ascending chronological date order. When you choose Date created it organises them backwards fro

  • Buttons Not Working - 10g

    Hi! I created a new form - in dev suite 10g - added push buttons - trigger - WHEN-BUTTON-PRESSED Ex. one button just has Clear_Form; The bottons work in dev suite 10g - Run Form, but when deployed to the application server - Linux - the buttons do no

  • I have a lot of questions on the ipod ...

    Ok well.. i have a ipod video 30gb. Well idk how, but water got into the screens and the part were you connected the usb port in. The ipod [when not connected] keeps charging and not charging. Now, my ipod had just lost about 20 gb worth of stuff. Ho

  • How long does Reuse recycle take

    I posted my iphone to the Reuse Recycle service almost 4 weeks ago and have had to email them for updates, does anyone know how long this service takes before we get our money? I must say its a service I wouldn't use again because of the delay.

  • How to answer n97 when locked

    when the phone is locked and someone calls you two screen icons apear unlock and answer. when you selectd them they turn green but neither seems to work anyone else have this problem or any ideas.. thanks also anyone figure out a way to remove the st