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])

Similar Messages

  • 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()

  • 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

  • Error: expected exactly one item, got 0 items

    Dear all,
    I've been facing the problem for long time. Please let me know the solution.
    Problem is as follows:
    BEA-382510: ALSB Assign action failed updating variable "stateResponse": com.bea.wli.common.xquery.XQueryException: Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items
    This is happening between proxy service and business service. Business service is giving response and when it gets transformed to proxy service i'm getting this error.
    This is my XQuery:
    declare namespace xf = "http://tempuri.org/XQueryProject/xquery/Reference/GetStateProvinceResponse/";
    declare namespace ns0 = "http://www.cit.com/";
    declare namespace ns1 = "http://www.cit.com/ecommerce/stateprovincelistresponse";
    declare namespace ns3 = "http://tempuri.org/GetStateProvinceListResponse.xsd";
    declare namespace ns2 = "http://com/cit/ecommerce/reference/services";
    declare function xf:GetStateProvinceResponse($getStateListRequestTypeResponse1 as element(ns0:GetStateListRequestTypeResponse))
    as element(ns2:getStateProvinceListResponse) {
    <ns2:getStateProvinceListResponse>
    let $GetStateListRequestTypeResult := $getStateListRequestTypeResponse1/ns3:GetStateListRequestTypeResult
    return
    <ns1:StateProvinceListType>
    for $state in $GetStateListRequestTypeResult/ns3:state
    return
    <ns1:state>
    <ns1:code>{ data($state/ns3:code) }</ns1:code>
    <ns1:name>{ data($state/ns3:name) }</ns1:name>
    <ns1:fullName>{ data($state/ns3:fullName) }</ns1:fullName>
    </ns1:state>
    </ns1:StateProvinceListType>
    </ns2:getStateProvinceListResponse>
    declare variable $getStateListRequestTypeResponse1 as element(ns0:GetStateListRequestTypeResponse) external;
    xf:GetStateProvinceResponse($getStateListRequestTypeResponse1)
    Thanks in abvance,
    Ganesh

    I just found your post as i was searching for solution for the same error. The variable you are assigning has null value.. that solved my problem.
    Edited by jkinbox at 02/11/2008 4:17 PM

  • 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.");
         }

  • 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?

  • 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)

  • Line 26 1084:  Syntax Error:  expecting rightbrace before end of program

    Im trying to do an animation, how do I solve Line 26 1084:  Syntax Error:  expecting rightbrace before end of program?
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var enemy:Enemy;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    enemy = new Enemy();
                    addChild( enemy );
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, moveEnemy );
                    gameTimer.start();
            public function moveEnemy( timerEvent:TimerEvent ):void
               enemy.moveDownABit();

    I have taken your advice but now 2 errors have popped up. Line 16 1137: Incorrect number of arguments . Expected no more than 0. Line 18 1120 : Access of undefined property enemy.
    package
        import flash.display.MovieClip;
        import flash.utils.Timer;
        import flash.events.TimerEvent;
        public class AvoiderGame extends MovieClip
            public var army:Array;
            public var avatar:Avatar;
            public var gameTimer:Timer;
            public function AvoiderGame()
                    army = new Array();
                    var newEnemy = new Enemy( 100, -15 );
                    army.push( newEnemy );
                    addChild( enemy );
                    avatar = new Avatar();
                    addChild( avatar );
                    avatar.x = mouseX;
                    avatar.y = mouseY;
                    gameTimer = new Timer( 25 );
                    gameTimer.addEventListener( TimerEvent.TIMER, onTick );
                    gameTimer.start();
            public function onTick( timerEvent:TimerEvent ):void
                avatar.x = mouseX;
                avatar.y = mouseY;
                for each ( var enemy:Enemy in army )
                         enemy.moveDownABit();
                         if ( avatar.hitTestObject( enemy ) )
                                    gameTimer.stop();

  • 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",

  • PL/SQL: ORA-00932: inconsistent datatypes: expected REF got CHAR

    SQL> desc o.rel_module;
    Name Null? Type
    ID NOT NULL NUMBER(6)
    TYPE NOT NULL CHAR(7)
    BUILDDATE NOT NULL NUMBER(4)
    DESIGNROOT NOT NULL NUMBER(6)
    SQL> desc rel_module
    Name Null? Type
    ID NOT NULL NUMBER(6)
    DESIGNROOT NOT NULL NUMBER(6)
    REL_COMPOSITEPARTS REL_COMPOSITEPART_TAB
    SQL> desc REL_COMPOSITEPART_TAB
    REL_COMPOSITEPART_TAB TABLE OF REL_COMPOSITEPART
    SQL> desc REL_COMPOSITEPART
    Name Null? Type
    TYPE CHAR(7)
    BUILDDATE NUMBER(4)
    SQL> create or replace procedure rel_module_p
    2 as
    3 cursor c is select ID, TYPE, BUILDDATE, DESIGNROOT from o.rel_module;
    4 begin
    5 FOR i in c
    6 LOOP
    7 INSERT into rel_module(id,REL_CompositeParts,DESIGNROOT)
    Values (i.ID,REL_CompositePart_TAB(i.type,i.builddate), i.designroot);
    8 END LOOP;
    9 END;
    10 /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE REL_MODULE_P:
    LINE/COL ERROR
    7/1 PL/SQL: SQL Statement ignored
    7/93 PL/SQL: ORA-00932: inconsistent datatypes: expected REF got CHAR
    Can you please tell me where needs correction.

    801556 wrote:
    Can you please tell me where needs correction.Just a fix would be:
    create or replace procedure rel_module_p
    as
    cursor c is select ID, TYPE, BUILDDATE, DESIGNROOT from o.rel_module;
    begin
    FOR i in c
    LOOP
    INSERT into rel_module(id,REL_CompositeParts,DESIGNROOT)
    values (i.ID,REL_CompositePart_TAB(REL_COMPOSITEPART(i.type,i.builddate)), i.designroot);
    END LOOP;
    END;
    /However, I'd assume what you want is:
    create or replace procedure rel_module_p
    as
    cursor c is select ID,CAST(COLLECT(REL_COMPOSITEPART(TYPE,BUILDDATE)) AS REL_CompositePart_TAB) REL_COMPOSITEPARTS, DESIGNROOT
    from rel_module
    group by id,DESIGNROOT;
    begin
    FOR i in c
    LOOP
    INSERT into rel_moduleX(id,REL_CompositeParts,DESIGNROOT)
    values (i.ID,i.REL_COMPOSITEPARTS, i.designroot);
    END LOOP;
    END;
    /SY.

  • PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got NUMBER

    Hi all,
    Wondering if you could assist? I'm exploring User Types and having a small problem. I'm getting the above error for a user type I have created which I'm calling in a function. Here's what my code looks like which I'm running the 'scott' schema for testing purposes
    SQL> CREATE OR REPLACE TYPE NBR_COLL AS TABLE OF NUMBER;
    2 /
    Type created.
    SQL> create or replace FUNCTION first_rec_only
    2 (
    3 NUM_ID IN NUMBER
    4 ) RETURN NUMBER IS
    5 v_num NBR_COLL;
    6 BEGIN
    7 select deptno into v_num from dept;
    8 RETURN v_num(v_num.FIRST);
    9 END first_rec_only;
    10 /
    Warning: Function created with compilation errors.
    SQL> show errors
    Errors for FUNCTION FIRST_REC_ONLY:
    LINE/COL ERROR
    7/4 PL/SQL: SQL Statement ignored
    7/11 PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got
    NUMBER
    SQL>
    Any clues to what I'm doing wrong? Cheers.

    The deptno column is a number, you cannot directly select a number into your type, you need to use your type's constructor.
    Something like:
    CREATE OR REPLACE FUNCTION first_rec_only (NUM_ID IN NUMBER) RETURN NUMBER IS
       v_num NBR_COLL;
    BEGIN
       SELECT nbr_coll(deptno) INTO v_num from dept;
       RETURN v_num(v_num.FIRST);
    END first_rec_only;Note that although this will compile, it will throw ORA-01422: exact fetch returns more than requested number of rows when you run it. you need to either use the input parameter as a predicate on your query against dept, use rownum = 1 in the query or use bulk BULK COLLECT INTO, depending on what exactly you want to accomplish.
    John

  • Ora-00932 "expected number got -"... error comes and goes

    We have several procedures in a package which get called by an asp.net application. The procedures return a sys_refcursor as an out param, by going OPEN param FOR big complicated query. There are about seven procedures which encapsulate different queries. Sometimes, this package seems to just get into a bad mood.
    The symptom is, every time the application calls one of the procedures, it gets back the error "ORA-00932: inconsistent datatypes: expected NUMBER got -", with the line number being the beginning of the "OPEN param FOR" statement. But then, if I open SQL Developer and fiddle around with the package, the error goes away... like, sometimes if I manually invoke one of the procedures in script form from the SQL Developer window, it returns successfully there, and then for the rest of the day the application works fine. Then on some other day the app starts getting the error again. Recompiling the package also sometimes changes the state between erroring and working.
    I don't see how the error message can be a real error if these changing circumstances allow the procedure to work sometimes but not other times with the same data. I also don't understand what "got -" is supposed to mean. I'm scared about what will happen if we ship something behaving this way. Any clues out there as to what is going on?

    I have identified a possible workaround. There's an inner subquery that goes something like this:
    SELECT fields FROM ( subquery_a UNION ALL subquery_b ) LEFT OUTER JOIN table_c ON (condition)
    This in turn gets outer-joined to another subquery. Anyway, when I rewrite this subquery so there's no inside UNION ALL, the error goes away.
    At least in a simplified case.
    [edit] It looks like I have to avoid outer Union Alls as well.
    [edit] And CONNECT_BY_ROOT.
    [edit] And if I don't join one less-essential table. These three conditions actually each lead to three separate errors, any one of which will stop ODP.Net in its tracks though the query runs fine in sql plus or sqldeveloper. Using CONNECT_BY_ROOT causes the "expected NUMBER got -" error (even though the field I'm using it on is varchar2), the UNION ALL causes the internal error, and the harmful join causes a "end-of-file on communication channel". I can cause each of these independently of the other two, and I need three separate workarounds to get my product running!
    I am starting to conclude that ODP.Net, which I was ordered to use because it's so much better than the Microsoft driver, is a sack o sewage.
    Message was edited by:
    pointy
    Message was edited by:
    pointy

  • Inconsistent datatypes: expected DATE got NUMBERORA-06512

    Hi,
    Sporadically getting this exception.I am using .Net 2.0 with ODP .net 2.112.1.0 . Oracle version is 11g . I have used BindByName = true.
    declare
    bv_EFFECTIVEFROM date := to_date('2008/05/30 02:04:21', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c141 date := to_date('2008/05/30 02:04:32', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c22 date := to_date('2008/05/30 02:04:20', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c33 date := to_date('2008/05/30 02:04:28', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c36 date := to_date('2008/05/30 02:04:29', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c48 date := to_date('2008/05/30 02:04:30', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c50 date := to_date('2008/05/30 02:04:31', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVEFROM_c56 date := to_date('2008/05/30 02:04:22', 'YYYY/MM/DD HH:MI:SS');
    bv_EFFECTIVETO date := null;
    bv_ENTITYTYPE number := 1;
    bv_FileNameID number := 153;
    bv_MarketDateDeleted date := null;
    bv_MarketDateModified date := to_date('2012/07/27 12:00:00', 'YYYY/MM/DD HH:MI:SS');
    bv_MarketDateVerified date := to_date('2012/07/27 12:00:00', 'YYYY/MM/DD HH:MI:SS');
    bv_MASTERFILESETFILEID number := 1;
    bv_MASTERFILESETFILEID_c187 number := 0;
    bv_RELATEDFROMENTITYID number := 4295903973;
    bv_RELATEDFROMENTITYTYPE varchar2(12) := 'Organization';
    bv_RELATEDTOENTITYID number := 8590944794;
    bv_RELATEDTOENTITYID_c100 number := 8590945304;
    bv_RELATEDTOENTITYID_c101 number := 8590945305;
    bv_RELATEDTOENTITYID_c102 number := 8590945312;
    bv_RELATEDTOENTITYID_c103 number := 8590945316;
    bv_RELATEDTOENTITYID_c104 number := 8590945318;
    bv_RELATEDTOENTITYID_c105 number := 8590945320;
    bv_RELATEDTOENTITYID_c106 number := 8590945337;
    bv_RELATEDTOENTITYID_c107 number := 8590945347;
    bv_RELATEDTOENTITYID_c108 number := 8590945350;
    bv_RELATEDTOENTITYID_c109 number := 8590945357;
    bv_RELATEDTOENTITYID_c110 number := 8590945359;
    bv_RELATEDTOENTITYID_c23 number := 8590944822;
    bv_RELATEDTOENTITYID_c24 number := 8590944824;
    bv_RELATEDTOENTITYID_c25 number := 8590944876;
    bv_RELATEDTOENTITYID_c26 number := 8590944881;
    bv_RELATEDTOENTITYID_c27 number := 8590944954;
    bv_RELATEDTOENTITYID_c28 number := 8590944956;
    bv_RELATEDTOENTITYID_c29 number := 8590944960;
    bv_RELATEDTOENTITYID_c30 number := 8590944964;
    bv_RELATEDTOENTITYID_c31 number := 8590944968;
    bv_RELATEDTOENTITYID_c32 number := 8590944973;
    bv_RELATEDTOENTITYTYPE varchar2(10) := 'Instrument';
    bv_RELATIONSHIPTYPECODE varchar2(10) := 'IsIssuerOf';
    bv_SOURCE number := 3;
    bv_SOURCEENTITYID nvarchar2(10) := '4295903973';
    bv_StatusCode number := 96;
    bv_StatusLockKey nvarchar2(1) := null;
    begin
    begin
    begin
    begin
    begin
    insert into oa.organization_isissuerof (effectivefrom, effectiveto, entitytype, masterfilesetfileid, relatedfromentityid, relatedfromentitytype, relatedtoentityid, relatedtoentitytype, relationshiptypecode, source, sourceentityid) values (bv_effectivefrom, bv_effectiveto, bv_entitytype, bv_masterfilesetfileid, bv_relatedfromentityid, bv_relatedfromentitytype, bv_relatedtoentityid, bv_relatedtoentitytype, bv_relationshiptypecode, bv_source, bv_sourceentityid) ;
    end;
    end;
    begin
    update fpf.ascollectedsourceentityids set filenameid = bv_filenameid , marketdatedeleted = bv_marketdatedeleted , marketdatemodified = bv_marketdatemodified , marketdateverified = bv_marketdateverified , statuscode = bv_statuscode , statusdate = sysdate , statuslockkey = bv_statuslockkey where source = bv_source and entitytype = bv_entitytype and masterfilesetfileid = bv_masterfilesetfileid_c187 and sourceentityid = bv_sourceentityid;
    end;
    commit work;
    exception when others then begin
    rollback;
    raise;
    end;
    end;
    end;
    end;
    Regards,
    Rakesh

    Hi,
    please find the exception.
    Exception: Exception: ORA-00932: inconsistent datatypes: expected DATE got NUMBERORA-06512: at line 1StackTrace: at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery() at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DbCommand command) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command) at ThomsonReuters.Database.Access.CommandManager.ExecuteNonQuery(DbCommand dbCommand) in D:\ICW\Sprint6\Src\ICW ESP Source Code\Database\Access\CommandManager.cs:
    This exception is getting sporadically only. I have loaded a file containing 300000 records. The data loading is buffer by buffer. But very few buffers got failed with this kind of exception.The earlier code snapshot is from a failing buffer. It seems alright from the dynamic sql.
    I have seen some other helps related to this and reconfirmed that BindByName = true is set.
    Kindly let me know if I need to share any more information.
    Code snippet.
    CommandManager cmdMgr = new CommandManager(_dbMgr);
    // we can use LastKeyInDataBuffer because there is only 1 entity per buffer
    DbCommand dbCmd = GenerateDML(entityDataBuffer.EntityData
    , entityDataBuffer.EntityStatus
    , ThreadItem.DataBufferKey.ToString()
    , entityDataBuffer.AsCollectedMetaData
    , entityDataBuffer.TransMetaData
    , entityDataBuffer.AsCollectedSourceEntityIDMapping
    , entityDataBuffer.CurrentEntityType);
    cmdMgr.AddDbCommand(dbCmd);
    DateTime start = DateTime.Now;
    _eventMgr.Trace(start
    , string.Format("ThreadPool: {0} ExecDML", _threadPool.PoolName)
    , TraceLevelEnum.High);
    // do not process empty transactions
    if (!cmdMgr.IsNullDbCommand)
    cmdMgr.ExecuteNonQuery();
    //_eventMgr.Trace(string.Format("DEBUG Info [DML] EntityID: {0}, {1} {2}", ThreadItem.DataBufferKey.ToString(), Environment.NewLine, cmdMgr.CompoundCommandTextAsDebugScript), TraceLevelEnum.Low);
    Thanks,
    Rakesh

Maybe you are looking for