ClassCastException using bpelx:append

When attempting to model sample 126 Data Aggregator I receive a ClassCastException. The snippet of bpel code I'm using looks like this:
<assign name="Assign_1">
<copy>
          <from expression="string('one')"/>
          <to variable="outputVariable"
          part="payload"
          query="/ns1:users/ns1:user"/>
</copy>
     <bpelx:append>
          <bpelx:from expression="string('two')"/>
          <bpelx:to variable="outputVariable"
          part="payload"
          query="/ns1:users/ns1:user"/>
     </bpelx:append>
I've tried variations of the query to include "/ns1:users" and also one with no query element. They all result in the exception.
element user is unbounded within users. It's definition looks like:
<xsd:element name="users"
     type="iC.MMIS.WS.tst:usersType"/>
<xsd:complexType name="usersType">
     <xsd:sequence>
     <xsd:element name="user"
          type="iC.MMIS.WS.tst:userCnType"
          minOccurs="0"
          maxOccurs="unbounded"/>
     </xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="userCnType">
     <xsd:restriction base="xsd:string">
     </xsd:restriction>
</xsd:simpleType>
Exception follows:
05/08/14 21:36:53 java.lang.ClassCastException
05/08/14 21:36:53      at com.collaxa.cube.xml.dom.DOMUtil.addNodes(DOMUtil.java:1598)
05/08/14 21:36:53      at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.performAddNodes(BPELAssignWMP.java:840)
05/08/14 21:36:53      at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:191)
05/08/14 21:36:53      at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:179)
05/08/14 21:36:53      at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3398)
05/08/14 21:36:53      at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1905)
05/08/14 21:36:53      at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
05/08/14 21:36:53      at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:100)
05/08/14 21:36:53      at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:185)
05/08/14 21:36:53      at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5412)
05/08/14 21:36:53      at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1300)
05/08/14 21:36:53      at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:117)
05/08/14 21:36:53      at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:146)
05/08/14 21:36:53      at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.syncCreateAndInvoke(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:486)
05/08/14 21:36:53      at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:493)
05/08/14 21:36:53      at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:426)
05/08/14 21:36:53      at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:133)
05/08/14 21:36:53      at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:93)
05/08/14 21:36:53      at IDeliveryBean_StatelessSessionBeanWrapper22.request(IDeliveryBean_StatelessSessionBeanWrapper22.java:288)
05/08/14 21:36:53      at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:101)
05/08/14 21:36:53      at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:65)
05/08/14 21:36:53      at ngDoInitiate.jspService(_ngDoInitiate.java:253)
05/08/14 21:36:53      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
05/08/14 21:36:53      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
05/08/14 21:36:53      at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
05/08/14 21:36:53      at displayProcess.jspService(_displayProcess.java:660)
05/08/14 21:36:53      at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
05/08/14 21:36:53      at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
05/08/14 21:36:53      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
05/08/14 21:36:53      at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:152)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
05/08/14 21:36:53      at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
05/08/14 21:36:53      at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:798)
05/08/14 21:36:53      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:278)
05/08/14 21:36:53      at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:120)
05/08/14 21:36:53      at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
05/08/14 21:36:53      at java.lang.Thread.run(Thread.java:534)
<2005-08-14 21:36:53,575> <ERROR> <default.collaxa.cube.xml> java.lang.ClassCastException

That is a corner case that we did not handle properly.
We did not automatically convert a String object into XML text node for users. That triggers that ClassCastException. We shall add that automatic conversion logic into our code. (We have opened a bug - bug # 4554032 - to track this problem down.)
On the other hand, based on the supplied schema, your sample code may not perform your desired logic, if my guess is correct.
Instead of:
<assign name="Assign_1">
<copy>
<from expression="string('one')"/>
<to variable="outputVariable"
part="payload"
query="/ns1:users/ns1:user"/>
</copy>
<bpelx:append>
<bpelx:from expression="string('two')"/>
<bpelx:to variable="outputVariable"
part="payload"
query="/ns1:users/ns1:user"/>
</bpelx:append>
Try:
<assign>
<bpelx:append>
<bpelx:from expression
= "ora:genEmptyElem('ns1:user',2)" />
<bpelx:to variable="outputVariable" part="payload" query="/ns1:users" />
</bpelx:append>
<copy>
<from expression=" 'one' " />
<to variable="outputVariable" part="payload"
query="/tns:users/tns:user[1]" />
</copy>
<copy>
<from expression=" 'two' " />
<to variable="outputVariable" part="payload"
query="/tns:users/tns:user[2]" />
</copy>
</assign>
If you want to know about the "genEmptyElem()" xpath function,
please check it out
http://localhost:9700/BPELConsole/default/domain.jsp?mode=xpath
I hope I have answered your question.
Regards,
Alex Yiu

Similar Messages

  • Compile errors using bpelx:append

    I'm getting compile errors from one particular bpelx:append. I have others earlier in the bpel code, and they seem to be passing the check.
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    Produces:
    Error(437):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 437 of "D:\BPEL_SANITARIUM\BPELPM\integration\jdev\jdev\mywork\Workspace\identifyPanelMembers\identifyPanelMembers.bpel", XML parsing failed because Invalid content starting with element "bpelx:append".
    [Potential fix]: Fix the invalid XML.
    <assign name="appendTheRest">
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    </assign>
    Produces:
    Error(436):
    [Error ORABPEL-10900]: xml parser error
    [Description]: in line 436 of "D:\BPEL_SANITARIUM\BPELPM\integration\jdev\jdev\mywork\Workspace\identifyPanelMembers\identifyPanelMembers.bpel", XML parsing failed because Invalid content starting with element "assign".
    [Potential fix]: Fix the invalid XML.
    The code is contained within a Switch block:
    <switch name="Switch_4">
    <case condition="bpws:getVariableData('index') = 1">
    <bpelx:annotation>
    <bpelx:pattern>First time only
    </bpelx:pattern>
    </bpelx:annotation>
    <assign name="setFirstPanelMember">
    <copy>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </copy>
    </assign>
    </case>
    <otherwise>
    <empty name="append.the.rest"/>
    <assign name="appendTheRest">
    <bpelx:append>
    <from variable="set-panel-member" query="/client:set-panel-member"/>
    <to variable="setPanel_setPanel_InputVariable" part="setPanelRequest" query="/setPanelRequest/panel/panel-member"/>
    </bpelx:append>
    </assign>
    </otherwise>
    </switch>
    Any ideas?

    We are also receiving the same error. Our process was built for a client in 10.1.2.0.2 and the GUI interface never really liked the bpelx:append statement - it always showed up as an alert/error. But it worked on 10.1.2.0.2
    Now that the client is upgrading to 10.1.3, it won't actually compile.
    Anyone know of a solution?

  • Bpelx:append or ora:addChildNode?

    Can anybody provide any suggestion on wether to use bpelx:append or ora:addChildNode?
    The function ora:addChildNode is documented as being deprecated, and replaced with bpelx:append. But the graphic designer (JDeveloper tooling for BPEL 10.1.2) does not seem to directly support this, and in fact does not even display the code. Since it seems to me having 'invisible' code in a BPEL process might not be such a good thing, I am leaning toward using ora:addChildNode.

    I agree, nevertheless the xpath spec clearly states that an xpath expression should not have any side effects - which this one obviously does ..
    We have fixed this blind (aka invisible) code in the next version (10.1.3.1).. So from upgrade perspective I would strongly recommend using bpelx:append
    hth clemens

  • Using dbms_lob append to insert text how do you insert a new line inbetween

    DBMS_LOB.APPEND (P_TEXT,'* Operator Phone,');
    ---- inbetween I need to insert new I am using DBMS_LOB.APPEND (P_TEXT,CHR(10)); IS there amy better method?
    DBMS_LOB.APPEND (P_TEXT,'* Operator Email Address,');

    Sorry if the question was not clear ---
    Lets say in the folowing example every write append needs to start on a new line followed by text. How do we do that?
    Do we add another writeappend(cvar,22, chr(10)); inbetween?
    dbms_lob.writeappend(cvar, 19, '<root><book><title>');
    dbms_lob.writeappend(cvar, length(r.title), r.title);
    dbms_lob.writeappend(cvar, 14, '</title><desc>');
    dbms_lob.writeappend(cvar, length(r.description), r.description);
    dbms_lob.writeappend(cvar, 27, '</desc></book><author_name>');
    dbms_lob.writeappend(cvar, length(r.author_name), r.author_name);
    dbms_lob.writeappend(cvar, 21, '</author_name></root>');
    Edited by: user521218 on May 7, 2009 12:34 PM

  • Reading data files saved using FTP Append

    Hi All,
    The code posted will write me a data file using FTP Append, which represents the data coming from a cRIO chassis.
    However I do not seem to be able to write the code to pull the data back out of the saved files.
    I have success in retrieving an isolated value (ie setting the count to 1 on the read binary file.vi), but as soon as I try to retrieve anything any bigger I have some serious issues.  I have checked through the various different tutorials and I don't seem to be doing anything particularly wrong.
    Any help would be good ta.
    Attachments:
    FTP streaming.vi ‏29 KB

    OK thanks Dom.
    I have a few things which you may consider trying in order to troubleshoot the issue.
    In your FTP Strem File Read code, try setting the count input of the read binary file vi to -1 (read entire file) and see what the result is. It may be worth creating a new string indicator rather than an array for this.
    Also I noticed you are performing a get file size function in parallel with the read binary vi. It is good practice to keep the flow of file reference and error cluster through these vi's sequentially in order to keep data flow and be sure of the execution order. In this case issues may occur if both vi's try to perform their functions concurrently.
    Any chance you could send the file created by the FTP Stream vi so I could take a look?
    Thanks.
    Paul
    http://www.paulharris.engineering

  • Use UNION / Append in PL/SQL

    Hello,
    I am using Oracle 11g R2 SOE. I have this procedure, and I would like to *"UNION" its* Select Statement with another Select Statement:
    declare
      v_xml clob;
      v_retval clob := '<?xml version="1.0" encoding="iso-8859-1"?>';
      v_blob blob;
    begin
    select
           xmlelement(
             "LISTINGS",
             xmlagg(
               xmlelement(
                 "LISTING",
                 xmlforest(
    'RS-'||R."RES_ID" as "Property_Ref_No",
    "UNIT_TYPE_LOOKUP"."UNIT_TYPE" as "Unit_Type",
    'Sale' as "Ad_Type",
    'Dubai' as "State",
    L.LOCATION_NAME_EN AS "Community",
    "PROJECTS"."PROJECT_NAME_EN" as "Property_Name",
    "RES_SALE"."ASKING_PRICE" as "Price",
    ' ' as "Frequency",
    ST."SUB_TYPE" as "Unit_Model",
    R."RES_SIZE" as "Unit_Builtup_Area",
    R.BEDS as "Bedrooms",
    R.bath as "No_of_Bathrooms",
    "RES_SALE"."AD_TITLE" as "Property_Title",
    RES_SALE.DESCRIPTION as "Web_Remarks",
    to_char("RES_SALE"."UPDATED_ON",'YYYY-MM-DD HH:MI:SSPM') as "Last_Updated",
    R.VIDEO as "Web_Tour",
    select xmlagg(
                                 xmlforest(
                                'http://thevillaproject.com/apex/erp/IMAGES/'||IMG.ID AS "ImageUrl"
    FROM      
          IMAGES IMG     
    WHERE IMG.RES_ID = R.RES_ID ) Images )))).getclobval()
      into      v_xml
      FROM
          "RES_SALE" "RES_SALE"
    inner join
          RES R on (R."RES_ID"="RES_SALE"."RES_ID")
    inner join
              "UNIT_STATUS_LOOKUP" on (UNIT_STATUS_LOOKUP.status_id = "RES_SALE"."RES_STATUS")
    inner join
          "PROJECTS" "PROJECTS" on ("PROJECTS"."PROJECT_ID"=R."PROJECT_ID")
    inner join
          "UNIT_TYPE_LOOKUP" "UNIT_TYPE_LOOKUP" on ("UNIT_TYPE_LOOKUP"."TYPE_ID"=R."RES_TYPE")
    inner join
          "RES_SUB_TYPE_LOOKUP" ST on (ST."SUB_TYPE_ID"=R."SUB_TYPE")
    INNER JOIN
          COMPLEX_LOOKUP CL ON (CL.COMPLEX_ID = "PROJECTS".COMPLEX_ID)
    INNER JOIN
          LOCATIONS L ON (L.LOCATION_ID = CL.LOCATION_ID)
    WHERE  "RES_SALE".RES_status IN (5,8) AND "RES_SALE".LIVE = 'Y' AND "RES_SALE".DESCRIPTION IS NOT NULL
      dbms_lob.append(v_retval,v_xml);
      OWA_UTIL.Mime_Header('text/xml'); 
      htp.p('Content-length: ' || to_char(dbms_lob.getlength(v_retval)));
      htp.p('Content-Disposition:  inline; filename="Just.xml"');
      owa_util.http_header_close;
      v_blob := wwv_flow_utilities.clob_to_blob(v_retval);
      wpg_docload.download_file(v_blob);
    end; h1. Select Statement that is needed to be "UNION-ED" with the Select Statement of the previous procedure:
    select
           xmlelement(
             "LISTINGS",
             xmlagg(
               xmlelement(
                 "LISTING",
                 xmlforest(
    'RR-'||R."RES_ID" as "Property_Ref_No",
    "UNIT_TYPE_LOOKUP"."UNIT_TYPE" as "Unit_Type",
    'Rent' as "Ad_Type",
    'Dubai' as "State",
    L.LOCATION_NAME_EN AS "Community",
    "PROJECTS"."PROJECT_NAME_EN" as "Property_Name",
    "RES_RENT"."ASKING_PRICE" as "Price",
    ' ' as "Frequency",
    ST."SUB_TYPE" as "Unit_Model",
    R."RES_SIZE" as "Unit_Builtup_Area",
    R.BEDS as "Bedrooms",
    R.bath as "No_of_Bathrooms",
    "RES_RENT"."AD_TITLE" as "Property_Title",
    "RES_RENT".DESCRIPTION as "Web_Remarks",
    to_char("RES_RENT"."UPDATED_ON",'YYYY-MM-DD HH:MI:SSPM') as "Last_Updated",
    R.VIDEO as "Web_Tour",
    select xmlagg(
                                 xmlforest(
                                'http://thevillaproject.com/apex/erp/IMAGES/'||IMG.ID AS "ImageUrl"
    FROM      
          IMAGES IMG     
    WHERE IMG.RES_ID = R.RES_ID ) Images ))))
    FROM
          "RES_RENT" "RES_RENT"
    inner join
          RES R on (R."RES_ID"="RES_RENT"."RES_ID")
    inner join
              "UNIT_STATUS_LOOKUP" on (UNIT_STATUS_LOOKUP.status_id = "RES_RENT"."RES_STATUS")
    inner join
          "PROJECTS" "PROJECTS" on ("PROJECTS"."PROJECT_ID"=R."PROJECT_ID")
    inner join
          "UNIT_TYPE_LOOKUP" "UNIT_TYPE_LOOKUP" on ("UNIT_TYPE_LOOKUP"."TYPE_ID"=R."RES_TYPE")
    inner join
          "RES_SUB_TYPE_LOOKUP" ST on (ST."SUB_TYPE_ID"=R."SUB_TYPE")
    INNER JOIN
          COMPLEX_LOOKUP CL ON (CL.COMPLEX_ID = "PROJECTS".COMPLEX_ID)
    INNER JOIN
          LOCATIONS L ON (L.LOCATION_ID = CL.LOCATION_ID)
    WHERE  "RES_RENT".RES_status IN (5,8) AND "RES_RENT".LIVE = 'Y' AND "RES_RENT".DESCRIPTION IS NOT NULL

    Hello Fateh,
    you can union both selects and then get the XML from the subquery.
    SELECT  XMLELEMENT(
                 "LISTINGS"
                ,XMLAGG(
                     XMLELEMENT(
                         "LISTING"
                        ,XMLFOREST(
                             rr_and_rs.ref_no AS "Property_Ref_No"
                            ,rr_and_rs."UNIT_TYPE" AS "Unit_Type"
                            ,'Sale' AS "Ad_Type"
                            ,'Dubai' AS "State"
                            ,rr_and_rs..location_name_en AS "Community"
                            ,rr_and_rs."PROJECT_NAME_EN" AS "Property_Name"
                            ,rr_and_rs."ASKING_PRICE" AS "Price"
                            ,' ' AS "Frequency"
                            ,rr_and_rs."SUB_TYPE" AS "Unit_Model"
                            ,rr_and_rs."RES_SIZE" AS "Unit_Builtup_Area"
                            ,rr_and_rs.beds AS "Bedrooms"
                            ,rr_and_rs.bath AS "No_of_Bathrooms"
                            ,rr_and_rs."AD_TITLE" AS "Property_Title"
                            ,rr_and_rs.description AS "Web_Remarks"
                            ,TO_CHAR(rr_and_rs."UPDATED_ON",'YYYY-MM-DD HH:MI:SSPM') AS "Last_Updated"
                            ,rr_and_rs.video AS "Web_Tour"
                            ,(  SELECT  XMLAGG(
                                             XMLFOREST(
                                                 'http://thevillaproject.com/apex/erp/IMAGES/'||img.id AS "ImageUrl"
                                FROM    images img
                                WHERE   img.res_id = rr_and_rs.res_id
                                ) Images
                ).getClobVal()
    INTO    v_xml
    FROM    (
        SELECT  'RR-'||r."RES_ID" AS ref_no
               ,"UNIT_TYPE_LOOKUP"."UNIT_TYPE"
               ,"RES_RENT"."ASKING_PRICE" AS price
        FROM    "RES_RENT" "RES_RENT"
                INNER JOIN res r
                  ON (r."RES_ID"="RES_RENT"."RES_ID")
                INNER JOIN "UNIT_STATUS_LOOKUP"
                  ON (unit_status_lookup.status_id = "RES_RENT"."RES_STATUS")
                INNER JOIN "PROJECTS" "PROJECTS"
                  ON ("PROJECTS"."PROJECT_ID"=r."PROJECT_ID")
                INNER JOIN "UNIT_TYPE_LOOKUP" "UNIT_TYPE_LOOKUP"
                  ON ("UNIT_TYPE_LOOKUP"."TYPE_ID"=r."RES_TYPE")
                INNER JOIN "RES_SUB_TYPE_LOOKUP" st
                  ON (st."SUB_TYPE_ID"=r."SUB_TYPE")
                INNER JOIN complex_lookup cl
                  ON (cl.complex_id = "PROJECTS".complex_id)
                INNER JOIN locations l
                  ON (l.location_id = cl.location_id)
        WHERE   "RES_RENT".res_status    IN (5,8)
        AND     "RES_RENT".live         = 'Y'
        AND     "RES_RENT".description IS NOT NULL
        UNION ALL
        SELECT  'RS-'||r."RES_ID" AS ref_no
               ,"UNIT_TYPE_LOOKUP"."UNIT_TYPE"
               ,"RES_SALE"."ASKING_PRICE" AS price
        FROM    "RES_SALE" "RES_SALE"
                INNER JOIN res r
                  ON (r."RES_ID"="RES_SALE"."RES_ID")
                INNER JOIN "UNIT_STATUS_LOOKUP"
                  ON (unit_status_lookup.status_id = "RES_SALE"."RES_STATUS")
                INNER JOIN "PROJECTS" "PROJECTS"
                  ON ("PROJECTS"."PROJECT_ID"=r."PROJECT_ID")
                INNER JOIN "UNIT_TYPE_LOOKUP" "UNIT_TYPE_LOOKUP"
                  ON ("UNIT_TYPE_LOOKUP"."TYPE_ID"=r."RES_TYPE")
                INNER JOIN "RES_SUB_TYPE_LOOKUP" st
                  ON (st."SUB_TYPE_ID"=r."SUB_TYPE")
                INNER JOIN complex_lookup cl
                  ON (cl.complex_id = "PROJECTS".complex_id)
                INNER JOIN locations l
                  ON (l.location_id = cl.location_id)
        WHERE   "RES_SALE".res_status    IN (5,8)
        AND     "RES_SALE".live         = 'Y'
        AND     "RES_SALE".description IS NOT NULL
        ) rr_and_rsUntested.
    When you want to keep two distinct selects (e.g. for easier maintainance), then have a look at INSERTCHILDXML. There you can add elements to an existing XML. http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb04cre.htm#ADXDB4289
    Regards
    Marcus
    BTW: Your mix of cases and case sensitive vs. case insensitive notation makes the code harder to read than necessary
    R.bath
    R.BEDS
    ST."SUB_TYPE"
    "RES_SALE"."ASKING_PRICE"Edited by: Marwim on 17.12.2012 13:15

  • ClassCastException using Subant and wldeploy ant task

    Hi!
    I'm using subant to call all diffrent build.xml files located in subdirectories. The buildfile looks like this:
    <project name="extern.call" default="callall">
         <target name="callall">
              <fileset      id="buildfile.set" dir=".." includes="*2/build.xml">
                   <exclude name="Br*2/*"/>
              </fileset>
              <subant target="deploy-local" inheritall ="false" failonerror="true">
                   <fileset      refid="buildfile.set"/>
              </subant>
         </target>
    </project>
    The first called build.xml files works fine ... but the execution of the second build.xml (it's not important which file is the second one, it's crash always at the second call), stop with a "java.lang.ClassCastException".
    See Stacktrace:
    [subant] weblogic.Deployer -debug -nowait -verbose -upload -noexit -name ClarifyRead -source \build\ClarifyRead\delivery\ClarifyRead.ear -targets myserver -adminurl t3://localhost:7001 -user weblogic -password ******** -deploy
    [subant] dumping Exception stack
    [subant] java.lang.ClassCastException
    [subant] at weblogic.management.deploy.utils.DeployerHelper.uploadSource(DeployerHelper.java:586)
    [subant] at weblogic.Deployer.runBodyWithAuthenticatedSubject(Deployer.java:824)
    [subant] at weblogic.Deployer.runBody(Deployer.java:711)
    [subant] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [subant] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [subant] at weblogic.Deployer.runMain(Deployer.java:566)
    [subant] at weblogic.Deployer.mainWithExceptions(Deployer.java:576)
    [subant] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [subant] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [subant] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [subant] at java.lang.reflect.Method.invoke(Method.java:324)
    [subant] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:264)
    [subant] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:204)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:65)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:340)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.Target.execute(Target.java:301)
    [subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
    [subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [subant] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:383)
    [subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:182)
    [subant] at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:112)
    [subant] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
    [subant] at org.apache.tools.ant.Task.perform(Task.java:364)
    [subant] at org.apache.tools.ant.Target.execute(Target.java:301)
    [subant] at org.apache.tools.ant.Target.performTasks(Target.java:328)
    [subant] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
    [subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
    [subant] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
    There is no diffrent between using ant in eclipse environment or as standalone, the result it the same.
    Do someone else have the same problem?
    Kind regards
    Joseph

    Hi
    I got the same message and I couldn't resolve it too, I am wordering if you got the key to the problem?
    Thanks
    Daivd Huang

  • How to use JDBC Appender of log4j using a properties file

    Hi,
    I am trying to implement the Log4j JDBC Appender to log the messages to Database(oracle).Can anyone provide me with a sample code along with the properties file used.
    need urgent help.
    Thanks in advance

    Actually, I konw where my problem in my code is. Use functions  
    PDDocAcquirePage(), PDPageGetAnnot(),
    PDTextAnnotGetContents(),
    PDTextAnnotGetContents()
    step by step with the logic designed by ourself can finish my task.
    But also thanks for your help!
     

  • ClassCastException using EJB from a service

    Hi all,
    I developed a DeployService and currently I'm getting a ClassCastException while accessing the a EJB.
    I put the lookup within a delegate which is also be used from a webDynpro application. With the WebDynpro App everything work properly, but if I call the delegate from the service a SAPClassCastException I thrown, when I cast the object to the home interface.
    The coding is as follows:
                   Properties props = new Properties();
                   props.put(Context.PROVIDER_URL,"localhost:50004");
                   props.put(Context.INITIAL_CONTEXT_FACTORY,
                   "com.sap.engine.services.jndi.InitialContextFactoryImpl");
                   context = new InitialContext(props);
                   Object obj = context.lookup(jndiName);
                   EJBHome ejb = EJBHomeFactory.getInstance().lookup(jndiName, ComponentHome.class);
                   ComponentHome componentHome = (ComponentHome)ejb;
    Thanks a lot for the help.
    Falk

    Hi Falk,
    Hey just tell me that what is the EJBHome and ComponentHome and EJBHomeFactory in your coding.....
    You can try the following code for the same.
    Object obj =(Object) jndicontext.lookup("<Your JNDI name>");
    TestEJBHome home = (TestEJBHome) javax.rmi.PortableRemoteObject.narrow(
                   obj,
                   TestEJBHome.class);
    TestEJB hello = home.create();
    Here, TestEJBHome is your Home interface of the EJB and TestEJB is your remote interface. Now you can use hello object to call your business methods of EJB.
    Regards,
    Bhavik

  • ClassCastException using PJC in Forms 9.0.4.1.0

    I'm trying to setup a simple PJC in a Forms using Oracle Forms 9.0.4.1.0 but I get a FRM-92100 with a java.lang.ClassCastException: nl.eurotransplant.pjc
    I've create a Form with a simple Java bean and set the implementation class to "nl.eurotransplant.pjc"
    I've also created the class nl.eurotransplant.pjc implementing the IView interface. I've implemented all the abstract methods from IView but none of them are doing anything (yet) other the system.out.println to the console.
    Packaged the nl.eurotransplant.pjc in a JAR file and included that in the archive parameter for Forms.
    From the console I can see the constructor of the PJC is being called and the init method is being called and completes. No more messages after that.
    Does anyone of you have a suggestion as to what I'm doing wrong?

    I searched some more on the Forum and eventually found a whitepaper on PJC's in Forms 6i. That gave me the tip not to implement the IView interface, but just extend the VBean class.
    That's what I just tried and no more classCastException. That seems to fix my issue. No to develop the bean itself...

  • ClassCastException using Update Batching

    Oracle 9.2.0.4/Linux, JDBC driver 9.2.0.5
    I'm trying to use update batching but always get a
    ClassCastException when doing:
    ((oracle.jdbc.driver.OraclePreparedStatement) pstmt).setExecuteBatch(10);
    I've followed chapter 12 of the "Oracle9i JDBC Developer's Guide and Reference", but cannot get rid of this damn exception.
    Can anyone give me any clue about what's happening?
    BTW, JDBC standard batch works perfectly, I just wanted
    to test oracle specific batch vs standard batch.
    Thanks in advance.

    Avi,
    I forgot to say is that the code is
    inside an EJB, running under JBoss. I've tested
    it in JBoss 3.2.5, 3.2.6 and 3.2.7 with no success.
    I did not post any code because it's exactly the same
    that serves as an example in http://www.oracle.com/technology/products/oracle9i/daily/jun07.html
    except for the question that the imports are
    oracle.jdbc.driver.*, not oracle.driver.*.
                        java.sql.Connection connection = null;
                   java.sql.PreparedStatement pstmt = null;
    try {
                                  connection = DAOUtils.getDBConnection(JNDIConstants.DATASOURCE);
    // disable autocommit
    connection.setAutoCommit(false);
    String query =
    "INSERT INTO TABLE (ID, DATO)" +
    " VALUES (TABLE_SEQ.NextVal, ?)";
    pstmt = connection.prepareStatement(query);
    log.debug(pstmt.getClass().getName()); // org.jboss.resource.adapter.jdbc.WrappedPreparedStatement
    // set batch size
    ((OraclePreparedStatement) pstmt).setExecuteBatch(10); // ClassCastException
                                  pstmt.setInt(1, object.getId());
                                  pstmt.executeUpdate();
                                  ((OraclePreparedStatement) pstmt).sendBatch();
                                  connection.commit();
                        } catch (SQLException sqlex) {
                                  connection.rollback();
    sqlex.printStackTrace();
    throw new CustomException(CustomException.DB_ERROR, sqlex);
    } finally {
    DAOUtils.closePreparedStatement(pstmt);
    DAOUtils.closeConnection(connection);
    I'm going to post it also in JBoss forums.
    I'll keep on trying.

  • Why do I get a ClassCastException using JNDI between ears?

    This is an issue that has bothered me for almost a year. It comes up every once in a while and usually I can find a workaround, but I need to understand what is causing the failure.
    Here is the problem description as an abstract example:
    I have two WAR files deployed on WL (8.1 sp3), WarA and WarB.
    In a servlet in WarA, I execute the following:
      Context context = new InitialContext();
      MyObject myObj = new MyObject();
      context.bind("myObject", myObj);Then, in a servlet in WarB, I execute the following, receiving a ClassCaseException on the last line of code:
      Context context = new InitialContext();
      Object obj = context.lookup("myObject");
      MyObject myObj = (MyObject)obj;  //ClassCastException!!Of course I have deployed MyObject.class in a jar file inside the WEB-INF/lib of each WAR.
    I understand that each WAR file uses a seperate ClassLoader, but I do not understand why the object's class is not recognized when it is retrieved. I have tried several debugging methods (obj.getClass().getName() or halting execution using a debugger and looking at the object's class signature). In every instance the classname looks correct, exactly as I would expect it to, but the ClassCastException is thrown anyways.
    In the past I have "copped out" by creating an EAR, putting both WARs in the EAR, and adding the jar containing MyObject to the APP-INF/lib.
    Unfortunately the most recent occurrence of this problem is more complex and I do not have the luxury of my standard workaround. Can someone please fill in the blanks of what elementary concept I am overlooking?
    Thanks
    JB

    I don't think the classloader-structure tag is exactly what I am looking for. Based on the documentation I reviewed on the edocs site, that solution appears to make sense if you are manipulating numerous classloaders within a specific ear.
    I suppose you could try to use the classloader-structure to reference a classloader from a seperate application, but the docs do not indicate that this is a possibility. Moreover, it seems dangerous and potentially very confusing.
    Ultimately, I think this boils down to a lesson for me about classloaders. Unless someone can tell me otherwise, I am ready to concede that you cannot access/cast an object that you have bound to the JNDI tree in one application from within any other application. The notable exception to this rule is the scenario where the class type to which you are casting is a class that is loaded by the system classloader.
    This makes some sense to me - each standalone war or ear is independent of other wars/ears deployed on the app server. But, it is also somewhat frustrating because you cannot share global services across a suite of applications via JNDI unless you bundle them all as a single ear.

  • ClassCastException using Dataobjects

    Hello,
    at first, I am not sure if I am in the right forum.
    We have developed an application which is using a Stateless SessionBean for getting data (countries) out of the database (using eclipselink).
    On filling a list of select items we are getting a ClassCastException although the classes are identical (same package, same class name)
    My first Taskflow just checks some conditions and if everything is right it calles Tasklow A or Taskflow B.
    Taskflow A now shows some screens and on one screen, the controller (my managed bean) reads the countries out of the database using the Stateless SessionBean.
    The interface of this SessionBean method is java.util.List<ICountry) bean.getListOfCountries().
    The managed bean now tries to convert this list of Country objects into a list of SelectItems for displaying a selectOneChoice component.
    List<SelectItem> countries = new ArrayList<SelectItem>();
    List<ICountry> listOfCountries = statelessSessionBean.getListOfCountries();
    for (int i=0;i<listOfCountries.size();i++) {
    ICountry country = listOfCountries.get(i); <----- the ClassCastException occurs
    SelectItem item = new SelectItem();
    item.setLabel(country.getIsoCode());
    item.setValue(country.getIsoCode());
    item.setDescription(resourceBundle.getString("country." + country.getIsoCode()));
    countries.add(item);
    The data is read from the database and passed to the managed bean correctly. I have a List of ICountry objects in my managed bean.
    When I now try to cast one of these objects to the Interface ICountry, the system throws a ClassCastException my.data.ICountry cannot be cast to my.data.ICountry
    As far as I found out, the classes are loaded by different classloaders.
    GenericClassLoader
    ChangeAwareClassLoader
    I have no idea, how to change the project settings to overcome this problem.
    My Application is divided into several projects
    Application: TestApp (ear)
    Project: TestApp (contains a single JSF with a region for the outer Taskflow) (war)
    Controller1 (contains the outer Taskflow) (ADF Shared Library)
    Controller2 (contains the inner Taskflows which does the work) (ADF Shared Library)
    DataObjects(contains my interfaces and data objects ICountry, Country) (jar)
    SB_Environment (contains the stateless session bean) (ejb-jar)
    Can anyone give me a hint?
    Environment: Standard JDeveloper 11.1.1.4.0
    Regards
    Edmund

    This release notes for XSQL Servlet 1.0.1 contain the following NOTE:
    At this time, the <xsql:insert-param> and <xsql:insert-request> action elements depend on the Oracle JDBC Driver because they depend on the Oracle XML SQL Utility for Java which at present exhibits this restriction. A future release of Oracle XML SQL will remove this current restriction.
    The same holds for the <xsql:update-request> and <xsql:delete-request>. The underlying problem is with the XML SQL Utility which currently works fine with any driver for reading data, but fails to insert, update, or delete with drivers other than Oracle. This restriction has already been fixed in-house and will be available as part of the next release of the XML SQL Utility put onto OTN. If the XSQL Servlet is used with that upcoming fixed version of the xsu12.jar for the XML SQL Utility, you will no longer hit this problem.

  • ClassCastException using HttpsURLConnection with Tomcat 4.1.27

    Hi,
    I try to open an SSL connection using HttpsURLConnection that works fine with a standalone application (see code fragment):
    import javax.net.ssl.HttpsURLConnection;
    import java.net.*;
    import java.io.*;
    URL website = new URL( "https://aSampleSSLSite" );
    HttpsURLConnection connection = ( HttpsURLConnection ) website.openConnection();
    Using the same code in Tomcat 4.1.27 and Struts 1.1 throws a java.lang.ClassCastException while trying to use website.openConnection().
    What is the difference?

    Hi,
    I'm using JDK 1.4.2 and haven't installed JSSE separately at all. Actually I really use javax.net.ssl.HttpsURLConnection. However, I tried com.sun.net.ssl.HttpsURLConnection as well and got a 'java.net.SocketException: Default SSL context init failed' instead of.
    Oddly enough the code works fine in a standalone application.

  • How do you set the line spacing when using the Append Text Table to Report VI?

    I have a table of numbers which I wish to print using the report generation VI's. Since each column has a different numerical format, I first convert the number for each cell to a string with the appropriate format and then build a string array to pass to the Append Text Table to Report VI. The table is printed with double line spacing. How do I reset this for single spacing?
    Attachments:
    print_array.vi ‏112 KB

    Dave,
    The issue is not with the NI-Reports functionality, but the Array to Spreadsheet String funvtion in the for loop. Here is the context help for this function:
    "Converts an array of any dimension to a table in string form, containing tabs separating column elements, a platform-dependent EOL character separating rows, and, for arrays of three or more dimensions, headers separating pages."
    The thing to note here is that it says it adds an EOL (end of line) character at the end of every row. This is what is happening. Your first column of data has a \r\n in it and adds the second row to each data item. This in turn makes the rest of the columns have a larege blank space at the bottom so that all of the cell heights are equal. I w
    ould re-write that little bit of code so that you just do one large string concatenation of number, spaces, number, spaces, number and this should solve your issue.
    Thank you for using the Developer Zone Discussion Forums.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

Maybe you are looking for

  • Fix for iPhoto after upgrading to Yosemite

    After upgrading to Yosemite I was unable to open iPhoto. I moved it to Trash (do NOT empty trash after moving it here!!!) - then go to App Store and download iPhoto. You'll want to make sure you then go to your Finder and click on the iPhoto download

  • Can zdm7 take/restore an image of a Windows 7 machine?

    I know ZDM doesn't support 7, and you need ZCM for the agent running in windows, however I am wondering if you can make an image of a win 7 computer using ZDM?

  • How to get the full path name of a file

    Hey everybody, I'm new here and in Java. so I will explain my question by giving an example: I want to send file from the Desktop by the "Send to" on the popup menu to my program. I want to know how can I read the full path name and the file name, an

  • How to implement the Seibel response in the ADF ?

    Hi All, JDev ver : 11.1.1.5 I have integrated the Fusion middle ware with Seibel using the 'REST' services(The URI based service). I followed this link to integrate : http://siebel-essentials.blogspot.com/2011/02/first-encounter-with-sai-ofm.html I w

  • ALE IDOC's VS XI

    Hi, I have a scenario where I have to convince a client to move to XI instead of using ALE IDOCS which he is currently using. Can anybody please tell me what are the advantages of using XI instead of just ALE IDOCs between SAP and Non SAP systems?? R