Flatten to XML bug with unit variables in classes

Hi,
I just spent about 5 hours trying to figure out why some of my class data kept resetting itself to zero.  Turns out that the part that kept resetting was the part that had a unit variable in it, and that fails to load properly from the Unflatten From XML VI.  It works fine if it's just a cluster, it's being in a class that's the problem.
I've attached the zip file with the example VIs.
Could I ask that someone with LV 2014 try this to see if the bug exists there?  
Right now we're running 2011, but we plan a companywide shift to 2015 as soon as it comes out (and therefore, 2011 drops from extended support).  I'd like to know if I can just wait for the upgrade and then it will work, or if I need to redo about ~15 variables in classes with units on them that I had been counting on loading and saving using the built-in XML functions.

I was planning on trying for a CAR only after confirming the problem hadn't been quietly fixed in the last 3 years.  I couldn't find anything in the changelogs but sometimes you never know...
Now that UliB has confirmed it's still a problem I will likely do so.

Similar Messages

  • BC4J bug with "bind variables" JBO-27122 ORA-01008

    I think we are found a BUG using BC4J with bind variables in a view object.
    If the bind variable appear in the WHERE condition two or more times at
    the beginning of the query the above error occur.
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement:
    SELECT Emp.EMPNO,Emp.ENAME,Emp.JOB,Emp.MGR,Emp.HIREDATE,Emp.SAL,Emp.COMM, Emp.DEPTNO
    FROM SCOTT.EMP Emp
    WHERE :1 <=10000 and :1 <= sal and :2=20
    java.sql.SQLException: ORA-01008: not all variables bound
    Otherwise if bind variable apper two or more times, but not together
    like this sample:
    WHERE :1 <=10000 and :2=20 and :1 <= sal
    the error not occur.
    We prove this with:
    JDeveloper 9.0.5.2 (build 1618)Business Components Version 9.0.5.16.0
    JDeveloper 9.0.5.0 (build 1375)Business Components Version 9.0.5.13.52
    I looking for a patch! or acceptable workaround.
    Tx for your help!
    diego.
    /* the cliente app */
    ApplicationModule am = Configuration.createRootApplicationModule("business_tier.AppModule","AppModuleLocal");
    ViewObject vo = am.findViewObject("EmpView");
    vo.setWhereClauseParam(0,"100");
    vo.setWhereClauseParam(1,"20");
    Row emp = vo.first();

    This is a known bug (1326006). The workaround is to use:
    vo.setWhereClauseParam(0,"100");
    vo.setWhereClauseParam(1,"20");
    vo.setWhereClauseParam(2,"20");
    Hope this helps,
    Lynn
    Java Tools Team

  • XML Publisher Desktop is having issue with one variable declaration

    Hello:
         I'm creating a check printing report in XML Publisher. When trying to run the preview for my template; it is throwing an error:
             Caused by: oracle.xdo.parser.v2.XPathException: Variable not defined: 'first_rec'.
          Below is the code in the text field of the template. I don't understand why it is throwing the above error. Any help is appreciated!
         <?for-each@section:OutboundPayment?><xsl:variable  xdofo:ctx="incontext" name="inner_group"  select=".//DocumentPayable"/><?for-each:$inner_group?><?if:(position()-1) mod $no_of_line_per_page=0?><xsl:variable name="first_rec"  xdofo:ctx="incontext" select="position()"/>
    Thanks.
    Message was edited by: Ora Person
    Can anyone in OTN community suggest the solution to the above problem? Suprise to see that no one responded to my question in past 3 days!!

    Refer
    Integrating Oracle XML Publisher with Oracle JDeveloper 10g

  • Bug with exporting project to java source

    Hi,
    This is in TopLink 9.0.4.2 (Build 040311).
    We're in the process of trying to determine if we should upgrade our TopLink from 2.5 to 9.0.4, and have not yet purchased a support contract because we haven't made the final decision yet, so I'm posting this bug here in hopes that someone can submit the bug.
    In one of our projects, we have an AggregateObjectMapping (AOM) for a Measurement object that is owned by 2 different objects, each with 2 to 4 instances of this Measurement class. I set up the instances of the AOM in the workbench just fine, and looking at the XML descriptors that are written out, it appears fine. Exporting the project session XML file works fine as well. However, when it is exported to a Java file, the instances of the AOM are exported incorrectly as described below.
    Here is the abbreviated mapping of the attributes of the Measurement class:
    <mappings>
    <mapping>
    <inherited>false</inherited>
    <instance-variable-name>mPrecision</instance-variable-name>
    <default-field-names>
    <default-field-name>direct field=yPrecision</default-field-name>
    </default-field-names>
    <uses-method-accessing>false</uses-method-accessing>
    <read-only>false</read-only>
    <mapping-class>MWDirectToFieldMapping</mapping-class>
    </mapping>
    <mapping>
    <inherited>false</inherited>
    <instance-variable-name>mQuantity</instance-variable-name>
    <default-field-names>
    <default-field-name>direct field=y</default-field-name>
    </default-field-names>
    <uses-method-accessing>false</uses-method-accessing>
    <read-only>false</read-only>
    <mapping-class>MWDirectToFieldMapping</mapping-class>
    </mapping>
    <mapping>
    <inherited>false</inherited>
    <instance-variable-name>mUnit</instance-variable-name>
    <uses-method-accessing>false</uses-method-accessing>
    <read-only>false</read-only>
    <reference-descriptor>com.cimsoft.lws.units.Unit.ClassDescriptor</reference-descriptor>
    <private-owned>false</private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <table-reference-mapping-reference-handle>
    <reference-handle>
    <reference-table>csrSlotGenericValue</reference-table>
    <reference-name>csrSlotGenericValue_csdUnit</reference-name>
    </reference-handle>
    </table-reference-mapping-reference-handle>
    <uses-joining>false</uses-joining>
    <one-to-one-mapping-indirection-policy>
    <indirection-policy>
    <uses-indirection>false</uses-indirection>
    </indirection-policy>
    </one-to-one-mapping-indirection-policy>
    <mapping-class>MWOneToOneMapping</mapping-class>
    </mapping>
    <mapping>
    <inherited>false</inherited>
    <instance-variable-name>UNDEFINED_MEASUREMENT</instance-variable-name>
    <mapping-class>MWUnmappedMapping</mapping-class>
    </mapping>
    </mappings>
    Notice that there are two direct to field mappings (mPrecision and mQuantity) and one OneToOneMapping (mUnit). The exported sessions XML file has the correct XML for instances of this object. Here is an example from a class that has 3 instances of this Measurement object mapped:
    <database-mapping>
    <attribute-name>mAlarmSize</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.cimsoft.lws.units.Measurement</reference-class>
    <is-null-allowed>true</is-null-allowed>
    <aggregate-to-source-field-name-associations>
    <association>
    <association-key>unitId</association-key>
    <association-value>csrStock.alarmSizeUnitId</association-value>
    </association>
    <association>
    <association-key>y</association-key>
    <association-value>csrStock.alarmSize</association-value>
    </association>
    <association>
    <association-key>yPrecision</association-key>
    <association-value>csrStock.alarmSizePrecision</association-value>
    </association>
    </aggregate-to-source-field-name-associations>
    <type>oracle.toplink.mappings.AggregateObjectMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>mCurrentSize</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.cimsoft.lws.units.Measurement</reference-class>
    <is-null-allowed>true</is-null-allowed>
    <aggregate-to-source-field-name-associations>
    <association>
    <association-key>unitId</association-key>
    <association-value>csrStock.currentSizeUnitId</association-value>
    </association>
    <association>
    <association-key>y</association-key>
    <association-value>csrStock.currentSize</association-value>
    </association>
    <association>
    <association-key>yPrecision</association-key>
    <association-value>csrStock.currentSizePrecision</association-value>
    </association>
    </aggregate-to-source-field-name-associations>
    <type>oracle.toplink.mappings.AggregateObjectMapping</type>
    </database-mapping>
    <database-mapping>
    <attribute-name>mLotSize</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.cimsoft.lws.units.Measurement</reference-class>
    <is-null-allowed>true</is-null-allowed>
    <aggregate-to-source-field-name-associations>
    <association>
    <association-key>unitId</association-key>
    <association-value>csrStock.lotSizeUnitId</association-value>
    </association>
    <association>
    <association-key>y</association-key>
    <association-value>csrStock.lotSize</association-value>
    </association>
    <association>
    <association-key>yPrecision</association-key>
    <association-value>csrStock.lotSizePrecision</association-value>
    </association>
    </aggregate-to-source-field-name-associations>
    <type>oracle.toplink.mappings.AggregateObjectMapping</type>
    </database-mapping>
    However, here are the corresponding mappings in the exported Java file (with what it really should be manually inserted by me in comments):
         AggregateObjectMapping mAlarmSizeMapping = new AggregateObjectMapping();
         mAlarmSizeMapping.setAttributeName("mAlarmSize");
         mAlarmSizeMapping.setReferenceClass(com.cimsoft.lws.units.Measurement.class);
         mAlarmSizeMapping.setIsNullAllowed(true);
         mAlarmSizeMapping.addFieldNameTranslation("csrStock.alarmSizeUnitId", "unitId");
         mAlarmSizeMapping.addFieldNameTranslation("csrStock.alarmSize", "y");
         mAlarmSizeMapping.addFieldNameTranslation("csrStock.alarmSizePrecision", "yPrecision");
         descriptor.addMapping(mAlarmSizeMapping);
         AggregateObjectMapping mCurrentSizeMapping = new AggregateObjectMapping();
         mCurrentSizeMapping.setAttributeName("mCurrentSize");
         mCurrentSizeMapping.setReferenceClass(com.cimsoft.lws.units.Measurement.class);
         mCurrentSizeMapping.setIsNullAllowed(true);
         mCurrentSizeMapping.addFieldNameTranslation("csrStock.currentSize", "alarmSize");
         mCurrentSizeMapping.addFieldNameTranslation("csrStock.currentSizeUnitId", "unitId");
         mCurrentSizeMapping.addFieldNameTranslation("csrStock.currentSizePrecision", "alarmSizePrecision");
         // should be: mCurrentSizeMapping.addFieldNameTranslation("csrStock.currentSize", "y");
         // should be: mCurrentSizeMapping.addFieldNameTranslation("csrStock.currentSizePrecision", "yPrecision");
         descriptor.addMapping(mCurrentSizeMapping);
         AggregateObjectMapping mLotSizeMapping = new AggregateObjectMapping();
         mLotSizeMapping.setAttributeName("mLotSize");
         mLotSizeMapping.setReferenceClass(com.cimsoft.lws.units.Measurement.class);
         mLotSizeMapping.setIsNullAllowed(true);
         mLotSizeMapping.addFieldNameTranslation("csrStock.lotSizeUnitId", "unitId");
         mLotSizeMapping.addFieldNameTranslation("csrStock.lotSize", "currentSize");
         mLotSizeMapping.addFieldNameTranslation("csrStock.lotSizePrecision", "currentSizePrecision");
         // should be: mLotSizeMapping.addFieldNameTranslation("csrStock.lotSize", "y");
         // should be: mLotSizeMapping.addFieldNameTranslation("csrStock.lotSizePrecision", "yPrecision");
         descriptor.addMapping(mLotSizeMapping);
    It appears that the actual Measurement descriptor is being modified accidentally as it's being exported, as you'll notice that the first mapping (for mAlarmSize) correctly maps the default "y" to "alarmSize", and then the next mapping (for mCurrentSize) instead of mapping "y" to "currentSize" maps "alarmSize" to "currentSize", and the next AOM maps "currentSize" to "lotSize" instead of "y" to "lotSize".
    Thanks,
    Greg

    No one ever responded, so I'm commenting to bring it up again. It turns out that the error happens not just exporting to Java, but anytime the command-line project generation is used. If the Workbench is used to export either to XML or to a Java file, the file is generated correctly. It is not generated correctly if you try to do it from the commandline (e.g. from a build environment).
    This has happened with 9.0.4.2 through the current 9.0.4.5.
    Here are different ways I've tried doing it from the commandline, and they all generate the erroneous XML and Java files:
    java oracle.toplink.workbench.external.api.JavaSourceGenerator inputMWP outputJava.java
    and
    java oracle.toplink.workbench.external.api.DeploymentXMLGenerator inputMWP outputXML.xml
    which are recommended by the documentation. Also recommended by the documentation:
    JavaSourceGenerator.generate( inputFile, outputFile )
    and
    DeploymentXMLGenerator.generate( inputFile, outputFile ).
    From decompiling the management workbench to see what it was doing differently:
    MWProject project = WorkbenchSession.instance().openProject( inputFile );
    if ( doXML )
    project.setProjectDeploymentXmlDirectory( directory );
    project.setProjectDeploymentXmlFileName( filename );
    project.exportDeploymentXml();
    else
    project.setProjectSourceRootDirectory( directory );
    project.setProjectClassName( classname );
    project.exportJavaSource( outputFile );
    //Also tried plain old project.exportJavaSource(); which appears to actually do something different.
    Any ideas? It looks like a bug to me, particularly that different java or XML deployment files are generated when run from the commandline versus run from the UI. Obviously, the commandline is very important because it is what the build system needs.
    Thanks,
    Greg

  • XML problem with getPayload

    Hi,
    I have come across an obscure but annoying xml bug in the bpel (collaxa?) implementation. I need to use xs:extension elements in the schema for the payload contents, which then of course requires a declaration of the xsi namespace. The payload is saved fine, and when I view the contents in the bpelconsole, it is there (as shown below). However, when I get the task and call getPayload, the xsi declaration is missing from the element, which then crashes JAXB.
    This is what is shown in the BPELConsole audit:
    <payload>
      <process-request xmlns="urn:ch.bedag.pef.iflow.process" user="ea91" process-name="Wohnadresse">
        <person xmlns="urn:ch.bedag.pef.iflow.core">
          <angestellter>
            <anstellung/>
            <wohnadresse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:AdresseSchweiz">
              <adresszusatz>c/o Bedag Informatik</adresszusatz>
              <strasse>Gutenbergstrasse 1</strasse>
              <ort>Bern</ort>
              <plz>
                <plz>3000</plz>
              </plz>
            </wohnadresse>
          </angestellter>
          <name>Prince</name>
          <personalnummer>
            <personalnummer>111111</personalnummer>
          </personalnummer>
          <vorname>John</vorname>
        </person>
      </process-request>
    </payload>And this is what I get when I call getPayload:
    <process-request xmlns="urn:ch.bedag.pef.iflow.process" user="ea91" process-name="Wohnadresse">
      <person xmlns="urn:ch.bedag.pef.iflow.core">
        <angestellter>
          <anstellung/>
          <wohnadresse type="ns1:AdresseSchweiz">
            <adresszusatz>c/o Bedag Informatik</adresszusatz>
            <strasse>Gutenbergstrasse 1</strasse>
            <ort>Bern</ort>
            <plz>
              <plz>3000</plz>
            </plz>
          </wohnadresse>
        </angestellter>
        <name>Prince</name>
        <personalnummer>
          <personalnummer>111111</personalnummer>
        </personalnummer>
        <vorname>John</vorname>
      </person>
    </process-request>The only difference is in the wohnadresse element, which has the correct xsi:type attribute, but the xsi: namespace declaration is missing.
    Any chance of fixing this? Otherwise I will have to convert the payload to a string, fix the problem, back to xml and then pass it off to jaxb. Very irritating...
    I don't know if it will help, but I did see the same problem when I tried converting a string to xml using a DOMResult and a Transformer. I switched to DOMParser and and InputSource and the problem went away.
    Thanks
    John

    Hi
    After a lot of experimenting, it looks like there are two problems:
    1. If I call IDeliveryService.post with a NormalizedMessage constructed with a String, bpel is not completely reliable with the namespaces (it converts them all to default namespaces defined on particular elements, but it missed the namespace within the xsi:type declaration). I fixed this by using DOMUtil to convert the string to a CubeDOMElement, which is then correctly converted to the input variable.
    2. The CubeDOMElement also makes mistakes if you use Element.getElementsByTagNameNS(ns, name). Even when all the information was there, the method removed one of the namespace declarations (actually a duplicate, but necessary because the prefix was used in the document).
    I got round this by calling the CubeDOMElement method getContentAsXml, which bizarrely returns the full xml of the child nodes, with all namespaces correctly defined and used, and then converting the xml string into a normal org.w3c.Element.
    It looks like a few more test cases are needed for the collaxa xml implementation...
    Best wishes
    John

  • Flatten to xml from variant

    I have problems with flattening variant data to xml-strings. I tried to make an application to save variant data to xml-files, but the vi "flatten to xml" didn't solve always the same solution. The bug don't occur always and i tried alot to show it. The vi produce sometimes not finished xml-strings. I attached a vi, witch shows the bug on my computer every time.
    Thanks for help, Mathis Wieland
    Attachments:
    error_variant_to_string.vi ‏40 KB

    I installed OpenG toolbox and OpenG Flatten to XML, the error with changing results is fixed, but this vi can't make variants to a xml-string, as well it has problems with the value fo refnums.
    Yours sincerely
    Mathis Wieland
    Attachments:
    error_flatten_to_xml.vi ‏35 KB

  • SLOW report performance with bind variable

    Environment: 11.1.0.7.2, Apex 4.01.
    I've got a simplified report page where the report runs slowly compared to running the same query in sqldeveloper. The report region is based on a pl/sql function returning a query. If I use a bind variable in the query inside apex it takes 13 seconds to run, and if I hard code a string it takes only a few hundredths of a second. The query returns one row from a table which has 1.6 million rows. Statistics are up-to-date and the columns in the joins and where clause are indexed.
    I've run traces using p_trace=YES from Apex for both the bind variable and hard coded strings. They are below.
    The sqldeveloper explain plan is identical to the bind variable plan from the trace, yet the query runs in 0.0x seconds in sqldeveloper.
    What is it about bind variable syntax in Apex that is causing the bad execution plan? Apex Bug? 11g bug? Ideas?
    tkprof output from Apex trace with bind variable is below...
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM(:P71_SEARCH_SOURCE1)))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.01          0          1         27           0
    Fetch        2     13.15      13.22      67694      72865          0           1
    total        4     13.15      13.23      67694      72866         27           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=72869 pr=67694 pw=0 time=0 us cost=29615 size=14255040 card=178188)
          1   FILTER  (cr=72869 pr=67694 pw=0 time=0 us)
          1    HASH JOIN RIGHT SEMI (cr=72865 pr=67694 pw=0 time=0 us cost=26308 size=14255040 card=178188)
          1     INDEX FAST FULL SCAN IDX$$_0A300001 (cr=18545 pr=13379 pw=0 time=0 us cost=4993 size=2937776 card=183611)(object id 68485)
    1696485     TABLE ACCESS FULL PERSONS (cr=54320 pr=54315 pw=0 time=21965 us cost=14958 size=108575040 card=1696485)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     HASH JOIN (RIGHT SEMI)
          1      INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                     'IDX$$_0A300001' (INDEX)
    1696485      TABLE ACCESS   MODE: ANALYZED (FULL) OF 'PERSONS' (TABLE)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       1276        0.00          0.16
      db file sequential read                       812        0.00          0.02
      direct path read                             1552        0.00          0.61
    ********************************************************************************Here's the tkprof output with a hard coded string:
    select p.master_id link, p.first_name||' '||p.middle_name||' '||p.last_name||' '||p.suffix personname,
    p.gender||' '||p.date_of_birth g_dob, p.master_id||'*****'||substr(p.ssn,-4) ssn, p.status status
    from persons p
    where
       p.person_id in (select ps.person_id from person_systems ps where ps.source_key  like  LTRIM(RTRIM('0b')))
    order by 1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.02       0.04          0          0          0           0
    Execute      1      0.00       0.00          0          0         13           0
    Fetch        2      0.00       0.00          0          8          0           1
    total        4      0.02       0.04          0          8         13           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 62  (ODPS_PRIVACYVAULT)   (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT ORDER BY (cr=10 pr=0 pw=0 time=0 us cost=9 size=80 card=1)
          1   FILTER  (cr=10 pr=0 pw=0 time=0 us)
          1    NESTED LOOPS  (cr=8 pr=0 pw=0 time=0 us)
          1     NESTED LOOPS  (cr=7 pr=0 pw=0 time=0 us cost=8 size=80 card=1)
          1      SORT UNIQUE (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1       TABLE ACCESS BY INDEX ROWID PERSON_SYSTEMS (cr=4 pr=0 pw=0 time=0 us cost=5 size=16 card=1)
          1        INDEX RANGE SCAN IDX_PERSON_SYSTEMS_SOURCE_KEY (cr=3 pr=0 pw=0 time=0 us cost=3 size=0 card=1)(object id 68561)
          1      INDEX UNIQUE SCAN PK_PERSONS (cr=3 pr=0 pw=0 time=0 us cost=1 size=0 card=1)(object id 68506)
          1     TABLE ACCESS BY INDEX ROWID PERSONS (cr=1 pr=0 pw=0 time=0 us cost=2 size=64 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
          1   SORT (ORDER BY)
          1    FILTER
          1     NESTED LOOPS
          1      NESTED LOOPS
          1       SORT (UNIQUE)
          1        TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                       'PERSON_SYSTEMS' (TABLE)
          1         INDEX   MODE: ANALYZED (RANGE SCAN) OF
                        'IDX_PERSON_SYSTEMS_SOURCE_KEY' (INDEX)
          1       INDEX   MODE: ANALYZED (UNIQUE SCAN) OF 'PK_PERSONS'
                      (INDEX (UNIQUE))
          1      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'PERSONS' (TABLE)

    Patrick, interesting insight. Thank you.
    The optimizer must be peeking at my bind variables with it's eyes closed. I'm the only one testing and I've never passed %anything as a bind value. :)
    Here's what I've learned since my last post:
    I don't think that sqldeveloper is actually using the explain plan it says it is. When I run explain plan in sqldeveloper (with a bind variable) it shows me the exact same plan as Apex with a bind variable. However, when I run autotrace in sqldeveloper, it takes a path that matches the hard coded values, and returns results in half a second. That autotrace run is consistent with actually running the query outside of autotrace. So, I think either sqldeveloper isn't really using bind variables, OR it is using them in some other way that Apex does not, or maybe optimizer peeking works in sqldeveloper?
    Using optimizer hints to tweak the plan helps. I've tried both /*+ FIRST_ROWS */ and /*+ index(ps pk_persons) */ and both drop the query to about a second. However, I'm loath to use hints because of the very dynamic nature of the query (and Tom Kyte doesn't like them either). The hints may end up hurting other variations on the query.
    I also tested the query by wrapping it in a select count(1) from ([long query]) and testing the performance in sqldeveloper and in Apex. The performance in that case is identical with both bind variables and hard coded variables for both Apex and SqlDeveloper. That to me was very interesting and I went so far as to set up two bind variable report regions on the same page. One region wrapped the long query with select count(1) from (...) and the other didn't. The wrapped query ran in 0.01 seconds, the unwrapped took 15ish seconds with no other optimizations. Very strange.
    To get performance up to acceptable levels I have changed my function returning query to:
    1) Set the equality operator to "=" for values without wildcards and "like" for user input with wildcards. This makes a HUGE difference IF no wildcard is used.
    2) Insert a /*+ FIRST_ROWS */ hint when users chose the column that requires the sub-query. This obviously changes the optimizer's plan and improves query speed from 15 seconds to 1.5 seconds even with wildcards.
    I will NOT be hard coding any user supplied values in the query string. As you can probably tell by the query, this is an application where sql injection would be very bad.
    Jeff, regarding your question about "like '%' || :P71_SEARCH_SOURCE1 || '%'". I've found that putting wildcards around values, particularly at the beginning will negate any indexing on the column in question and slows performance even more.
    I'm still left wondering if there isn't something in Apex that is breaking the optimizer "peeking" that Patrick describes. Perhaps something in the way it switches contexts from apex_public_user to the workspace schema?

  • Create xml file with values from context

    Hi experts!
    I am trying to implement a WD application that will have some input fields, the value of those input fields will be used to create an xml file with a certain format and then sent to a certain application.
    Apart from this i want to read an xml file back from the application and then fill some other context nodes with values from the xml file.
    Is there any standard used code to do this??
    If not how can i do this???
    Thanx in advance!!!
    P.S. Points will be rewarded to all usefull answers.
    Edited by: Armin Reichert on Jun 30, 2008 6:12 PM
    Please stop this P.S. nonsense!

    Hi,
    you need to create three util class for that:-
    XMLHandler
    XMLParser
    XMLBuilder
    for example in my XML two tag item will be there e.g. Title and Organizer,and from ur WebDynpro view you need to pass value for the XML tag.
    And u need to call buildXML()function of builder class to generate XML, in that i have passed bean object to get the values of tags. you need to set the value in bean from the view ui context.
    Code for XMLBuilder:-
    Created on Apr 4, 2006
    Author-Anish
    This class is to created for having function for to build XML
    and to get EncodedXML
      and to get formated date
    package com.idb.events.util;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import com.idb.events.Event;
    public class XMLBuilder {
    This attribute represents the XML version
         private static final double VERSION_NUMBER = 1.0;
    This attribute represents the encoding
         private static final String ENCODING_TYPE = "UTF-16";
         /*Begin of Function to buildXML
    return: String
    input: Event
         public String buildXML(Event event) {
              StringBuffer xmlBuilder = new StringBuffer("<?xml version=\"");
              xmlBuilder.append(VERSION_NUMBER);
              xmlBuilder.append("\" encoding=\"");
              xmlBuilder.append(ENCODING_TYPE);
              xmlBuilder.append("\" ?>");
              xmlBuilder.append("<event>");
              xmlBuilder.append(getEncodedXML(event.getTitle(), "title"));
              xmlBuilder.append(getEncodedXML(event.getOrganizer(), "organizer"));
              xmlBuilder.append("</event>");
              return xmlBuilder.toString();
         /End of Function to buildXML/
         /*Begin of Function to get EncodedXML
    return: String
    input: String,String
         public String getEncodedXML(String xmlString, String tag) {
              StringBuffer begin = new StringBuffer("");
              if ((tag != null) || (!tag.equalsIgnoreCase("null"))) {
                   begin.append("<").append(tag).append(">");
                   begin.append("<![CDATA[");
                   begin.append(xmlString).append("]]>").append("</").append(
                        tag).append(
                        ">");
              return begin.toString();
         /End of Function to get EncodedXML/
         /*Begin of Function to get formated date
    return: String
    input: Date
         private final String formatDate(Date inputDateStr) {
              String date;
              try {
                   SimpleDateFormat simpleDateFormat =
                        new SimpleDateFormat("yyyy-MM-dd");
                   date = simpleDateFormat.format(inputDateStr);
              } catch (Exception e) {
                   return "";
              return date;
         /End of Function to get formated date/
    Code for XMLParser:-
    Created on Apr 12, 2006
    Author-Anish
    This is a parser class
    package com.idb.events.util;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import com.idb.events.Event;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    public class XMLParser {
    Enables namespace functionality in parser
         private final boolean isNameSpaceAware = true;
    Enables validation in parser
         private final boolean isValidating = true;
    The SAX parser used to parse the xml
         private SAXParser parser;
    The XML reader used by the SAX parser
         private XMLReader reader;
    This method creates the parser to parse the user details xml.
         private void createParser()
              throws SAXException, ParserConfigurationException {
              // Create a JAXP SAXParserFactory and configure it
              SAXParserFactory saxFactory = SAXParserFactory.newInstance();
              saxFactory.setNamespaceAware(isNameSpaceAware);
              saxFactory.setValidating(isValidating);
              // Create a JAXP SAXParser
              parser = saxFactory.newSAXParser();
              // Get the encapsulated SAX XMLReader
              reader = parser.getXMLReader();
              // Set the ErrorHandler
    This method is used to collect the user details.
         public Event getEvent(
              String newsXML,
              XMLHandler xmlHandler,
              IWDMessageManager mgr)
              throws SAXException, ParserConfigurationException, IOException {
              //create the parser, if not already done
              if (parser == null) {
                   this.createParser();
              //set the parser handler to extract the
              reader.setErrorHandler(xmlHandler);
              reader.setContentHandler(xmlHandler);
              InputSource source =
                   new InputSource(new ByteArrayInputStream(newsXML.getBytes()));
              reader.parse(source);
              //return the results of the parse           
              return xmlHandler.getEvent(mgr);
    Code for XMLHandler:-
    Created on Apr 12, 2006
    Author-Anish
    This is a parser class
    package com.idb.events.util;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import com.idb.events.Event;
    Created on Apr 12, 2006
    Author-Anish
    *This handler class is created to have constant value for variables and function for get events,
        character values for bean variable,
        parsing thr date ......etc
    package com.idb.events.util;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Locale;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.helpers.DefaultHandler;
    import java.util.*;
    import com.idb.events.Event;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    public class XMLHandler extends DefaultHandler {
         private static final String TITLE = "title";
         private static final String ORGANIZER = "organizer";
         IWDMessageManager manager;
         private Event events;
         private String tagName;
         public void setManager(IWDMessageManager mgr) {
              manager = mgr;
    This function is created to get events
         public Event getEvent(IWDMessageManager mgr) {
              manager = mgr;
              return this.events;
    This function is created to get character for setting values through event's bean setter method
         public void characters(char[] charArray, int startVal, int length)
              throws SAXException {
              String tagValue = new String(charArray, startVal, length);
              if (TITLE.equals(this.tagName)) {
                   this.events.setTitle(tagValue);
              if (ORGANIZER.equals(this.tagName)) {
                   String orgName = tagValue;
                   try {
                        orgName = getOrgName(orgName);
                   } catch (Exception ex) {
                   this.events.setOrganizer(orgName);
    This function is created to parse boolean.
         private final boolean parseBoolean(String inputBooleanStr) {
              boolean b;
              if (inputBooleanStr.equals("true")) {
                   b = true;
              } else {
                   b = false;
              return b;
    This function is used to call the super constructor.
         public void endElement(String uri, String localName, String qName)
              throws SAXException {
              super.endElement(uri, localName, qName);
         /* (non-Javadoc)
    @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
    This function is used to call the super constructor.
         public void fatalError(SAXParseException e) throws SAXException {
              super.fatalError(e);
    This function is created to set the elements base on the tag name.
         public void startElement(
              String uri,
              String localName,
              String qName,
              Attributes attributes)
              throws SAXException {
              this.tagName = localName;
              if (ROOT.equals(tagName)) {
                   this.events = new Event();
         public static void main(String a[]) {
              String cntry = "Nigeria";
              XMLHandler xml = new XMLHandler();
              ArrayList engList = new ArrayList();
              engList = xml.getCountries();
              ArrayList arList = xml.getArabicCountries();
              int engIndex = engList.indexOf(cntry);
              System.out.println("engIndex  :: " + engIndex);
              String arCntryName = (String) arList.get(engIndex);
              System.out.println(
                   ">>>>>>>>>>>>>>>>>>>>" + xml.getArabicCountryName(cntry));
    Hope that may help you.
    If need any help , you are most welcome.
    Regards,
    Deepak

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Flatten to XML does not save Item Names of ListBox to XML file.

    On my Front Panel, I have a ListBox Indicator that has Strings from which the User can select. Also the User can edit items in the ListBox to add new elements. After the user selects one and pushes my Save button, I use the Flatten to XML function to save the selection in an XML file. But Flatten to XML only saves the Value (index of the selected item(s)) to the XML file and not the ListBox Item Names. That is enough information to reconstruct which of the String data that the user selected.
    In a ListBox where a User is selecting among a list of Strings, shouldn't the Flatten to XML function also store the String(s) that were selected?
    Solved!
    Go to Solution.

    Dennis Knutson wrote:
    The control is a U32 which is no different than placing a regular numeric control on the front panel. The flatten to xml is only passed a numeric value in both cases. It can't record something that you do not pass to it. The state of the control is the numeric value and the state can be reconstructed with that numeric. If you want to reconstuct the strings (which are not states), use the property node.
    I disagree. A ListBox that contains Stings to select from is full of String information. Both I and the User entered those Strings into the ListBox. It is the only data in the Listbox that we see. It is the most important information in the ListBox. The Strings are present in the Item Names. The Flatten to XML does have access to the Item Names and can and should provide them. Neither I nor the User are interested in the Numeric Index of the Selected Items. That is useless information to us. Both of use are dealing with Strings. If the State of the ListBox control is to be reconstructed from the XML data provided by the Flatten to XML function, then the Strings (Item Names) in the Listbox must be provided in the XML data.

  • Object variable or With Block variable not set

    Hi - We have saved a working input schedule to a new name and modified it to use for another company.  There is a report tab to bring down the historical units from BPC, a tab to trend the history, and a tab that references the other two tabs to forecast the units into the future and send the forecasted units back up to BPC.  The input schedule that was saved to a new name and modified works fine until we attempt to Send and Refresh the active worksheet on the forecast tab.   When we do so, it indicates the number of records that will be sent, but when it attempts to Process the upload to BPC we receive an error message that indicates  Object variable or With Block variable not set  and no records are sent to BPC.
    We have retested the original input template that was copied and the original template still transfers data successfully to BPC.  We have also tried starting with a blank input template and copying in the formulas from the working template and we still get the same error message.  
    We have read several postings on this error and it seems to be a pretty general error, and so far none of the suggestions have worked for us.  One suggested checking for special characters, but the only non alpha non-numeric characters used are dashes in the values of one of the dimensions and spaces and underlines in the formulas used to forecast the units, but both of these are present and don't seem to cause any problem in the working input schedule. 
    We are currently on BPC 7.5 SP6 and using Excel 2010.
    Any help would be appreciated.

    >Note 1494285 seems to be in reference to BPC for Microsoft and we are using NetWeaver.
    Sorry, 1513080 is for NW (there's link to it in bottom of 1494285) :
    - Currently only BPC 7.5 NW SP05 and above support Office 2010
    - Note: BPC NW 7.5 NW cannot work on office 2010 (64-bits), office 2010 (64-bits) is not supported.
    Check your proxy settings (note 1592560: Getting "Error 91 Object variable or with block variable after upgrade to SP06" in the Excel Client.)
    Try 1576893: After upgrading to SP06, the EVDRE reports stop working.
    PS. Maybe I wrong, but some problems with 2010 Office clients in our system dissapear after patching to SP08.

  • "Object Variable or With Block Variable not set" Error on Adobe Presenter 8 Ribbon on PPT 2010/2007

    Returning back from Adobe training at KEDRIYA VIDYALAYA no 1  Jalhalli Bangalore when I started Powerpoint to use Adobe Presenter 8  I am getting : "Object Variable or With Block Variable not set " error on clicking any of the menu features of the Presenter Ribbon. My Config are :
    i)             WINDOWS XP SP 3
    ii)            POWERPOINT 2007 / 2010 ( for both same error is coming)
    iii)           MS XML Library 4.0 installed.
    iv)           Adobe Presenter 8
    I am using all liscenced copies of softwares.
    Hardware specs are also as per Minimum Adobe standards.
    I Have tried a lot removing Data Execution Prevention Mode , but all in vain the problem still exists
    Why is this happening. Please help.
    Kamal K Gupta
    PGT Comp. SC.
    KV No. 2 Srivijaya nagar

    This is not really a "Downloading, Installing, Setting Up" question; you may get better help if you ask in the Presenter forum.

  • Safari won't display XML content with an embedded stylesheet

    I'm using Safari 5.0.2 on Windows XP. I cannot get it to display an XML document with an embedded CSS stylesheet. The file in question appears in this ZIP file: http://www.hl7.org/documentcenter/ballots/2011JAN/downloads/CDAR2IG_SDISP_R1_D12011JAN.zip
    That document demonstrates is an attempt to enable display of standardized healthcare content in common web browsers. Can anyone here help?

    I have a separate bug report to Chrome on this one, same general result in display. The file is an XML document, not a CSS style-sheet. It contains an xml-stylesheet processing instruction that has a local URI #hl7-css-for-cda pointing to an element in the XML that contains the CSS stylesheet. That element uses xml:id to identify itself, so it is (according to the W3C) possible for the browser to determine that element as being the target of the URI.
    The problem appears to be that the Display Engine in Safari won't load the content of that URI as a CSS stylesheet.
    When I validate the CSS content in that XML element it returns as being valid CSS, and when I validate the XML using my XML editor, it is both well formed, and valid against the XML Schema appropriate to that file.

  • Modifying XML files with JDOM

    Hi:
    I've been trying to get up to speed with JDOM, and while it seems pretty intuitive, I've been having a problem w/ modifying XML documents.
    Namely, once I get a Document object from a (skeleton) XML file, do changes made to the Document object through, say, addContent() propagate to the original file? My gut feeling is no, although this was certainly what I had expected initially.
    Here's a code fragment of what I had tried to do to populate a barebones XML file:
                   Document doc = builder.build(output);
              // add 100 elements, all the same
              for (int count = 0; count < 100; count++)
                   Element curr = new Element("book");
                   // create child nodes for book
                   Element title = new Element("title");
                   title.addContent("Book " + (count + 1));
                   Element author = new Element("author");
                   author.addContent("Author " + (count + 1));
                   Element price = new Element("price");
                   price.addContent("Price " + (count + 1));
                   curr.addContent(title);
                   curr.addContent(author);
                   curr.addContent(price);
                   doc.getRootElement().addContent( curr );
              }

    Mikael,
    This sounds like one of the many quirks (perhaps bugs) related to how FrameMaker handles non-FM files in books. The current book model doesn't play well with XML files as chapters and this seems like yet another problem. Apparently, if an xref does not target another .fm file in the book, Frame assumes that the target file is not in the book and therefore will not be in the book PDF.
    There have been discussions here about this in the past. The solution that I use is to run an API client before publishing that converts all XML files to .fm files, and redirect all xrefs appropriately. Then, book features work as expected and PDFs come out as normal. This is not feasible, however, without the automation from the API client.
    There may be some who would say that the best approach is to use XML and books the way that the designers did account for... that is, the whole book becomes an XML document with entity references to the separate chapters. In my work, though, this model was not appropriate... rather, I needed a binary FM book to act like a book, except with XML files as chapters. So, I think I understand your situation.
    Is API programming or FrameScript an option for you? I think it may be the only way to get what you are looking for.
    Russ

  • APEX BIP report query output format - not able to set with a variable

    I have a Named Columns (RTF) report that is working great, but I can't control the output format with a variable. I can set the "Output Format" in the Report Query Attributes, but it doesn't work when I set the report output format to "Derive from item". No matter what the item contains, I always get PDF output. I can see the variable in my session, but it doesn't control the output format. I have tried using the values "xml", "XML", "rtf", and "RTF".
    Any help would be appreciated...

    My guess is that an exception is being thrown for some rows. Since you've stubbed out your catch phrase to do nothing you're not going to have any visibility into what exception was thrown. You need to put some kind of logging in the catch phrase to see
    what is happening.

Maybe you are looking for

  • Profit Centre wise Stock Report

    Hi folks!! Is there any report available, through which we can retrive profit centre wise stock report. Best regards

  • Using Template information in dynamic pages

    Having created some interface templates for my current project, I find I am not able to readiily use them in dynamic pages. Is there a technique for this, that allows me to get the details from my page styles / Interface templates and combine them wi

  • Sales Order/Variant Costing: Plz suggest

    Hi Gurus, My scenario is that the company is making machine tools - A machine is assembled from about 60 sub-assemblies (60 sub-assemblies in BOM). Which can be produced in-house or purchased. Each of these sub assemblies have further child sub-assem

  • Blank rows on page after header but before body?

    I've got a "blank row" at the top of my pages using a certain page template. From the template, my header is : <html lang="&BROWSER_LANGUAGE."> <head>#HEAD#<title>#TITLE#</title> <link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_9/theme.css" ty

  • ERROR MESSAGE QA142 / QA148

    Dear All, Kindly suggest the solution: 1. Not Maintained "Insp setup" for "01" lot origin in Material Master. 2. PO Created for Material "X"  as on 28.04.2007. 3. GR for material "X"  as on 03.05.2007. 4. MMBE, shows stock in "Quality Inspection"  (i