XSLT Grouping & Muenchian Method STRANGE PROBLEM

Hi Everyone!
I'm having a problem using a XMLTRANSFORM for grouping Muenchian Method.
There are three oracle databases:
DB1: Win2k3, Oracle 9.2.0.7 Standard,
DB2: Win2k3, Oracle 9.2.0.7 Enterprise,
DB3: WinXP, Oracle 10.2.0.1 XE.
DB1 and DB2 are installed on different computers.
And there are two scripts:
S1: select
  xmltransform(xmltype(
  '<PROJECTS>
  <PROROW>
    <id>2</id><name>Customer 1</name><project_name>Project 2</project_name>
  </PROROW>
  <PROROW>
    <id>1</id><name>Customer 1</name><project_name>Project 1</project_name>
  </PROROW>
  <PROROW>
    <id>3</id><name>Customer 2</name><project_name>Project 1</project_name>
  </PROROW>
</PROJECTS>'),
xmltype(
'<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="xml" encoding="UTF-8" version="1.0" indent="yes"></xsl:output>
<xsl:key name="rows" match="PROROW" use="name" />
<xsl:template match="PROJECTS">
<xsl:element name="ROOT">
  <xsl:apply-templates
    select="PROROW[generate-id(.) = generate-id(key(''rows'', name)[1])]">
        <!--<xsl:value-of select="key(''rows'', name)">-->
  </xsl:apply-templates>
</xsl:element>  
</xsl:template>
<xsl:template match="PROROW">
  <b><xsl:value-of select="name" /></b>
  <ul>
    <xsl:for-each select="key(''rows'', name)">
      <li>
        <xsl:element name="COUNT_KEYS">
          <xsl:value-of select="count(key(''rows'', name))" />
        </xsl:element>
        <a href="projects_results.xml?project={id}">
          <xsl:value-of select="project_name" />
        </a>
      </li>
    </xsl:for-each>
  </ul>
</xsl:template>
</xsl:stylesheet>')) x
from dual;S2: select
  xmltransform(xmltype(
  '<REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
  <CONCEPT ID="0" TYPE="0">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">0</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.93a</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.94</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.44</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.93</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.94</COL>
    </ROW>
  </CONCEPT>
</REPORT>'),
xmltype(
'<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8" version="1.0" indent="yes"></xsl:output>
<xsl:key name="rows" match="CONCEPT" use="concat(@ID, @TYPE)" />
<xsl:template match="REPORT">
  <xsl:copy>
      <xsl:apply-templates select="@*"/> 
      <xsl:apply-templates
        select="CONCEPT[generate-id(.) = generate-id(key(''rows'', concat(@ID, @TYPE))[1])]"/>
  </xsl:copy>
</xsl:template>
<xsl:template match="CONCEPT">
  <xsl:copy>
      <xsl:apply-templates select="@*"/>
      <!--<xsl:value-of select="count(key(''rows'', concat(@ID, @TYPE)))"/>|-->
      <xsl:for-each select="key(''rows'', concat(@ID, @TYPE))">
                    <xsl:copy-of select="ROW"/>
      </xsl:for-each>
  </xsl:copy>    
</xsl:template>
<xsl:template match="@*">
  <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>')) x
from dual;S1 comes from http://sourceware.org/ml/xsl-list/2000-07/msg00458.html.
S2 is mine.
The results of executing these scripts are:
S1 on DB1 & DB2:
<ROOT>
  <b>Customer 1</b>
  <ul>
    <li>
      <COUNT_KEYS>1</COUNT_KEYS>
      <a href="projects_results.xml?project=2">Project 2</a>
    </li>
  </ul>
  <b>Customer 2</b>
  <ul>
    <li>
      <COUNT_KEYS>1</COUNT_KEYS>
      <a href="projects_results.xml?project=3">Project 1</a>
    </li>
  </ul>
</ROOT>S2 on DB1 & DB2 is variable. For example:
<REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
  <CONCEPT ID="0" TYPE="0">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">0</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.93</COL>
    </ROW>
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.94</COL>
    </ROW>
  </CONCEPT>
</REPORT>I obtained results with 2 (first two) and 5 (correct result!) <ROW> elements for <CONCEPT ID=”0” TYPE=”1”>.
When I run S3 cyclic it returns (randomly): 2, 2, 2, 2, 5, 5, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5, 2, ,2, 2, 2,5, 5, 5, 5, 5, 2, 2, 2 ROWs for 2nd CONCEPT. Sounds impossible? 1st CONCEPT is always with 1 <ROW>.
I noticed that, when I remove xsi:noNamespaceSchemaLocation="report.xsd" attribute or set it to the value of not registered schema, S2 always return one (the first from the top) ROW for both CONCEPTs.
I don't think it is a problem of my report.xsd schema, but the content of this schema is:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oraxdb="http://xmlns.oracle.com/xdb" oraxdb:flags="291" oraxdb:schemaURL="report.xsd" oraxdb:schemaOwner="SYS" oraxdb:numProps="7">
  <xs:element name="REPORT" type="reportType" oraxdb:propNumber="2447" oraxdb:global="true" oraxdb:SQLName="REPORT" oraxdb:SQLType="reportType229_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258"/>
  <xs:complexType name="reportType" oraxdb:SQLType="reportType229_T" oraxdb:SQLSchema="SYS">
    <xs:sequence>
      <xs:element maxOccurs="unbounded" name="CONCEPT" oraxdb:propNumber="2453" oraxdb:global="false" oraxdb:SQLName="CONCEPT" oraxdb:SQLType="CONCEPT230_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="CONCEPT236_COLL" oraxdb:SQLCollSchema="SYS">
        <xs:complexType oraxdb:SQLType="CONCEPT230_T" oraxdb:SQLSchema="SYS">
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="ROW" oraxdb:propNumber="2452" oraxdb:global="false" oraxdb:SQLName="ROW234" oraxdb:SQLType="ROW231_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="ROW234235_COLL" oraxdb:SQLCollSchema="SYS">
              <xs:complexType oraxdb:SQLType="ROW231_T" oraxdb:SQLSchema="SYS">
                <xs:sequence>
                  <xs:element maxOccurs="unbounded" name="COL" oraxdb:propNumber="2451" oraxdb:global="false" oraxdb:SQLName="COL" oraxdb:SQLType="COL232_T" oraxdb:SQLSchema="SYS" oraxdb:memType="258" oraxdb:SQLInline="true" oraxdb:MemInline="false" oraxdb:JavaInline="false" oraxdb:SQLCollType="COL233_COLL" oraxdb:SQLCollSchema="SYS">
                    <xs:complexType oraxdb:SQLType="COL232_T" oraxdb:SQLSchema="SYS">
                      <xs:simpleContent>
                        <xs:extension base="xs:string">
                          <xs:attribute name="NAME" type="xs:string" use="required" oraxdb:propNumber="2450" oraxdb:global="false" oraxdb:SQLName="NAME" oraxdb:SQLType="VARCHAR2" oraxdb:memType="1"/>
                        </xs:extension>
                      </xs:simpleContent>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="ID" type="xs:short" use="required" oraxdb:propNumber="2448" oraxdb:global="false" oraxdb:SQLName="ID" oraxdb:SQLType="NUMBER" oraxdb:memType="3" oraxdb:memByteLength="2"/>
          <xs:attribute name="TYPE" type="xs:short" use="required" oraxdb:propNumber="2449" oraxdb:global="false" oraxdb:SQLName="TYPE" oraxdb:SQLType="NUMBER" oraxdb:memType="3" oraxdb:memByteLength="2"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>S1 on DB3:
<ROOT>
  <b>Customer 1</b>
  <ul>
    <li>
      <COUNT_KEYS>2</COUNT_KEYS>
      <a href="projects_results.xml?project=2">Project 2</a>
    </li>
    <li>
      <COUNT_KEYS>2</COUNT_KEYS>
      <a href="projects_results.xml?project=1">Project 1</a>
    </li>
  </ul>
  <b>Customer 2</b>
  <ul>
    <li>
      <COUNT_KEYS>1</COUNT_KEYS>
      <a href="projects_results.xml?project=3">Project 1</a>
    </li>
  </ul>
</ROOT>S2 on DB3
<REPORT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="report.xsd">
  <CONCEPT ID="0" TYPE="0">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">0</COL>
    </ROW>
  </CONCEPT>
  <CONCEPT ID="0" TYPE="1">
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.93a</COL>
    </ROW>
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">9.94</COL>
    </ROW>
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.44</COL>
    </ROW>
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.93</COL>
    </ROW>
    <ROW>
      <COL NAME="REG_ID">0</COL>
      <COL NAME="UNIT_ID">0</COL>
      <COL NAME="UNIT">RAPORT ZBIORCZY</COL>
      <COL NAME="LP_OPIS">10.94</COL>
    </ROW>
  </CONCEPT>
</REPORT>DB3 always generates good results for both scripts. <CONCEPT ID=”0” TYPE=”1”> always consists of 5 ROWs regardless of the attribute xsi:noNamespaceSchemaLocation value (schema registered or not). It is my computer at home. I decided to install oracle there because of the problems with DB1 and DB2. Unfortunately these are my DBs at work. So I need to run XMLTRANSFORM there.
IMHO problems of S2 derive from result of S1 - function count(key(''rows'', name))
always returns 1 regardless of number of rows. But this is only my supposition.
I don’t know what is going on. The results of S3 on DB1/2 make me sick.
I tried client 9.2.0.8, instant client 11.1.0.6.0 and no client – a job (transformation was inserted to a table) and this problem still exists.
Any suggestions?
Thanks in advice…
Tomek.

Hi,
maybe you are right (I think similar), but I can't find any information about this bug on the Internet. So this is strange, if it is really a bug. I hope somebody used (or tried to use) this Muenchian Method in oracle 9.2.x, and can tell does it works or not.
In [Oracle9i XML Developers Kits|www.oracle.com/technology/tech/xml/xdk_sample/9ir2_xdkfaq.html] there is written:
"You can do the grouping in your XSLT stylesheet Steve Muench's Book "Building Oracle XML Applications" book dedicates a section in Chapter 9 to techniques for doing this kind of grouping in XSLT to present one- or multi-level break reports...
The technique that I present in steve's book was coined the (blush...) "Muenchian Method" for doing grouping in XSLT."
Thanks,
Tomek.
Edited by: tdomanek on 2009-03-15 17:14
Edited by: tdomanek on 2009-03-15 23:48

Similar Messages

  • Error in Muenchian method in XSLT mapping using sapxmltoolkit.jar

    Hi,
    The following example produces a different result in SAP from that of Altova, Microsoft providers. It is a resonably complex Muenchian transformation that I have reduced this to the core issue:
    Have tried with SP14 but same result on every delivered version of sapxmltoolit.jar
    I am trying to extract a unique set of locationCodes to assemble an IDOC for each locationCode - breaking out the relevant order lines.
    <b>My question is twofold:</b>
    a) is the behaviour of sapxmltoolkit errannt to the spec?
    b) is there another way to produce this list or work around?
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" version="1.0" indent="yes"/>
      <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
      <xsl:template name="buildIdoc" match="ORDER">
        <ORDERS05>
          <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
            <xsl:sort select="locationCode" data-type="number"/>
            <xsl:comment><xsl:value-of select="locationCode"/> Location Code</xsl:comment>
            <xsl:comment><xsl:value-of select="../lineNo"/> Line Number</xsl:comment>
            <IDOC BEGIN="1"></IDOC>
          </xsl:for-each>
        </ORDERS05>
      </xsl:template>
    </xsl:stylesheet>
    <b>Sample input document:</b>
    ?xml version="1.0"?>
    <ORDER loops-id="ORDER">
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>1</lineNo>
        <productCode>9990007454</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>6</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>3</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <unDefData></unDefData>
        <segmentCount>0</segmentCount>
      </PRODQNTY>
      <PRODQNTY loops-id="PRODQNTY">
        <lineNo>2</lineNo>
        <productCode>1864503696</productCode>
        <LOCNQNTY>
          <locationCode>001</locationCode>
          <quantityOrdered>4</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>004</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>005</locationCode>
          <quantityOrdered>2</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>006</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>007</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>009</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>021</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
        <LOCNQNTY>
          <locationCode>082</locationCode>
          <quantityOrdered>1</quantityOrdered>
        </LOCNQNTY>
      </PRODQNTY>
    </ORDER>
    <b>Expected Output:</b> - from Altova - 1 record per locationCode
    <?xml version="1.0" encoding="UTF-8"?>
    <ORDERS05>
         <!--001 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--004 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--005 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--006 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--007 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--009 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--021 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
         <!--082 Location Code-->
         <!--1 Line Number-->
         <IDOC BEGIN="1" />
    </ORDERS05>
    <b>Output from sapxmltoolkit.jar</b> - 1 record per locationCode per PRODQNTY line so I get a non unique set of locationCodes: (every location twice in this example - and with 16 order lines, every location 16 times and 128 IDOCs (instead of 8 IDOCs).
    <?xml version="1.0" encoding="utf-8"?>
    <ORDERS05>
      <!--001 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--001 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--004 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--005 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--006 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--007 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--009 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--021 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--1 Line Number-->
      <IDOC BEGIN="1"/>
      <!--082 Location Code-->
      <!--2 Line Number-->
      <IDOC BEGIN="1"/>
    </ORDERS05>

    A bit more heartache & trials and I solved it
    The key defition is unstable in XSLT the way I defined it
    Simple change to the XSLT: remove the PRODQNTY node reference from the match attribute:
    <b>incorrect key:</b>
    <xsl:key name="partner-ids" match="PRODQNTY/LOCNQNTY" use="locationCode"/>
    <b>correct key:</b>
    <xsl:key name="partner-ids" match="LOCNQNTY" use="locationCode"/>
    And the "group-by or Muenchian method" loop statement:
    <xsl:for-each select="PRODQNTY/LOCNQNTY[count(.|key('partner-ids',locationCode)[1])=1]">
    Hopes this helps someone else....
    Regds Doug.

  • Strange Problem in dynamically list population with record group

    Hello Room,
    I am dynamically populating a single list with 2 record groups. I am having a strange problem. All the code are written in 2 seperate buttons. The code of every button is given below.
    Button 1 code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT companyname,to_char(co) from companymaster order by companyname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    Button 2 Code:-
    DECLARE
    rg_reports RECORDGROUP;
    rg_name VARCHAR2(40) := 'REPORTS';
    vTemp NUMBER;
    BEGIN
    -- Pls make sure Group doesn't already exist
    rg_reports := FIND_GROUP(rg_name);
    -- If it doesn't exist then create it and add ur query to it
    IF Id_Null (rg_reports) THEN
    rg_reports:=CREATE_GROUP_FROM_QUERY(rg_name , 'SELECT accountname,to_char(co) from accountmaster order by accountname');
    end if;
    --Populate the Record Group
    vTemp:=POPULATE_GROUP(rg_reports);
    POPULATE_LIST('REPORTS.EXAMPLELIST', rg_name);
    Delete_Group( rg_reports );
    END;
    The code is same here only the sql is different in these 2 buttons. Now the problem point.
    when i press button 1, I get the list populated ok. when i try to click on the list item and keep the button pressed the list gets scrolled properly.
    when i press button 2 after that i get account names well populated in the same list item as well, but this time, when i keep the button pressed the list does not scroll below as in button 1. It does not even allow to select different item from the list of button 2 code.
    I tried to clear cache, cookies, exit browser everything and try to run the button 2 first, but still the problem in button 2 code.
    Following are my system details.
    windows 7 professional edition.
    Oracle database 11g on windows 7
    Oracle forms 10g patchset 10.1.2.0.2 on windows 7
    Browser Netscape Navigator with oracle jinitiator 1.3.1.22
    But this form is run by a client side html file where oracle forms 10g is not installed on windows xp. html file is just referring server url to run the module. The file is run on Netscape navigator browser with oracle jinitiator 1.3.1.22
    My question is that is this a bug ? if button 1 gets the list item scrolled, why is the problem with button 2 even though i press it first. Here I am deleting the record group also. after the code is over. Initially I thought this may be the character length problem so I took the maximum character length for that list item as given by the 2 columns in database.
    Why is the list scrolling not happening in button 2 but in button 1 with same codes on both ?
    Anybody please help me.

    The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
    Adjust your query.

  • Lync 2013 I have a strange problem concerning group call pickup in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having about 5-7 second Anybody out there having similar problems with call pickup Groups?

    HI
    I have a strange problem concerning  group call pickup  in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having  about 5-7 second
    Anybody out there having similar problems with call pickup Groups?

    Hi,
    Did you meet any other call delay when you using Lync?
    As the issue happen for Lync desktop client, it can be performance issue. Please check if there is any error message from FE Server when the issue happen.
    Also please check if you have updated Lync Server to the latest version, if not, update it and then test again.
    Best Regards,
    Eason Huang  
    Eason Huang
    TechNet Community Support

  • Strange Problem with Code Groups / Codes

    Hey all, have a strange problem with Code Groups and Codes.
    Our data migration team accidentally loaded an early version of our catalog (code groups and codes) in to our 'Gold' configuration client. They then proceed to delete them all via transaction qs41. However, the code groups have been deleted, but not the codes.
    So, basically, no codes groups exist in table QPGR or QPGT but all the entries remain in QPCD with the assigment to code groups. The usage indicator is not set on the codes so why they did not get deleted with the codes groups is unknown.
    The issue that this is now causing us is that we can't recreate the codes groups with these codes assigned as the system thinks they already exist (via a check on table QPCD i would expect).
    Also, i have been unable to recreate what happened did in other clients... seems very strange.
    Any help appreciated.
    Cheers

    Ben,
    You could try SE11, and see if you can delete the records from there.. but I'm not hopeful...
    Otherwise you may need to write a quick ABAP program to delete the data base entries.
    PeteA

  • Strange problem with nested address book groups

    I have a strange problem with iSync. I have created a group On-the-Go in my Address Book that I'm syncing with my phone (Motorola v600). The group consists of three other groups. Let's call them A, B and C.
    The problem is that only group C gets synchronized. Contacts from groups A and B disappear from the phone. Strangely, if I select A or B to sync in iSync - they get synchronized just fine. Also, group C, in turn, contains other nested groups, but that does not seem to be a problem.
    I played with group names, tried to recreate group A to no avail.
    For now, I have added all contacts from A and B to On-the-Go as a workaround, but
    it looks like a bug to me.

    I have a strange problem with iSync. I have created a group On-the-Go in my Address Book that I'm syncing with my phone (Motorola v600). The group consists of three other groups. Let's call them A, B and C.
    The problem is that only group C gets synchronized. Contacts from groups A and B disappear from the phone. Strangely, if I select A or B to sync in iSync - they get synchronized just fine. Also, group C, in turn, contains other nested groups, but that does not seem to be a problem.
    I played with group names, tried to recreate group A to no avail.
    For now, I have added all contacts from A and B to On-the-Go as a workaround, but
    it looks like a bug to me.

  • Strange problems with iCal group calendar

    Hi,
    I got some strange problems with group calendar. They are evil so that we may decide to throw it away because under this cirumstances it's not usable for our company.
    1) If we add events running more than one week in webcalendar, we can see it in the actual week, but not in the following weeks.
    2) The webcalendar seems to be 2 hours in the future, we cannot find how to change time zone or whatever. We can see, that we added a new event at 4pm, in the list of recent changes we see that this event was added at 6pm.
    3) In the Wiki we can see the usernames in the list of recent changes, but in calendar there is only unknown. But there are no anonymous users, only named users within these group.
    Any idea?
    Thanks
    Rene

    If I hadn't been using iCal/Google Calendar for over 18 months, with reminders from both systems playing nicely over that period, I'd happily agree with you. The issue with Reminders only began (for me, at least) in February this year. I agree that there's potential for conflict, and maybe both sets of developers finally threw in the towel. This is a pity, because I like both systems, but I feel slightly irritated at being effectively told by Google or Apple that I have to choose sides.

  • Strange problem on JDialog show method

    Hi, there:
    I have a strange problem on JDialog. I have a swing application, using JDK1.3, eclipse 2.1.3 as my developing tool. I have a dialog extends from JDialog, which is supposed to pop up for "yes" and "no" choice. Everything works fine if I invoke the application from "debug" mode. However, if I invoke the application from "run" mode, everything works fine if I use mouse clicking, but if I just using keyboard input, the dialog works fine first time, but after the first time show up, the dialog seems accept the "Enter" key automatically somewhere, so that the dialog closed immediately after "show" method is called, before I got a chance to press any key. And the dialog select "yes" automatically.
    Really appreciated if anyone has any clue.
    Thanks a lot in advance
    David

    Hi, there:
    The problem seems like that a keyevent was not consumed by the other GUI component. In my above swing application, I have a combobox, by using keyboard only, after I choose an item in combobox and press "Enter" key, the dialog is supposed to be popped up with "Yes" and "No" choice.
    The problem seems like that:
    1. the combobox has keyPressed() defined (with keyReleased() empty);
    2. the following dialog class has keyReleased() defined (with keyPressed() empty);
    3. So, after press "Enter" key in combobox, KEY_PRESSED event is consumed by combobox in its keyPressed() but KEY_RELEASED event is not consumed for some reasons I don't know, which causes the problem that the dialog's method keyReleased() is trigged automatically by that event. And, after I move those logic in dialog class from keyReleased() to keyPressed() everything works fine.
    However, I'm still not very sure why that KEY_RELEASED event is not consumed by the combobox (I did define an empty keyReleased() method in combobox)? Or it may come from other reason?
    Really appreciated if anyone can clarify me on that issue.
    Thanks a lot
    David

  • XSLT problem (very strange problem)

    I am working on TRANSFORM activity. The schema of element that is giving problem in destination schema is ...
    <xs:element name="CustomInformation">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ColumnValue" minOccurs="0" maxOccurs="unbounded">
    <xs:complexType mixed="true">
    <xs:sequence>
    <xs:element name="Value" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Documents" type="DocumentsType" minOccurs="0"/>
    <xs:element name="tsvData" type="tsvType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="instance" type="InstanceType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    I want output like this...
    <ns1:CustomInformation>
    <ns1:ColumnValue name="client_name">value of source field</ns1:ColumnValue>
    <ns1:ColumnValue name="fa_sales_owner">value of source field</ns1:ColumnValue>
    </ns1:CustomInformation>
    I am trying this code in TRANSFORM source code...
    <ns1:CustomInformation>
    <ns1:ColumnValue>
    <xsl:attribute name="name">
    <xsl:text disable-output-escaping="no">client_name</xsl:text>
    </xsl:attribute>
    <xsl:text disable-output-escaping="no">*<xsl:value-of select="/ns0:SfOpportunityIntfCollection/ns0:SfOpportunityIntf/ns0:accountName"/>*</xsl:text>
    </ns1:ColumnValue>
    <ns1:ColumnValue>
    <xsl:attribute name="name">
    <xsl:text disable-output-escaping="no">fa_sales_owner</xsl:text>
    </xsl:attribute>
    <xsl:text disable-output-escaping="no">*<xsl:value-of select="/ns0:SfOpportunityIntfCollection/ns0:SfOpportunityIntf/ns0:clientExecutive"/>*</xsl:text>
    </ns1:ColumnValue>
    </ns1:CustomInformation>
    against this xml...
    <SfOpportunityIntfCollection xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/iSalesAdapter">
    <SfOpportunityIntf>
    <accountId>3</accountId>
    <accountName>4</accountName>
    <clientExecutive>15</clientExecutive>
    <recordType>16</recordType>
    </SfOpportunityIntf>
    </SfOpportunityIntfCollection>
    But the element 'ColumnValue' is coming blank(tag <xsl:value-of> is not working). while the same statement is working out of <customInformation> element!!!
    Can anybody help me?

    Thanks for the link.
    I created a seperate project for xslt but still the same problem. But when I tried with removing <xsl:text disable-output-escaping="no">, it worked. Very strage, but yet don't know what was the problem :) If you know then please let me know.
    Can you help me in other queries too...
    1. In my Empty BPEL process I am receiving data through db partnerlink (through polling) and I am converting it through Transform activity. This time I am only validating my xslt through GUI only. At runtime what xml will be generated, how I can see it? Is there any way to output/log it?
    2. I want one more help from you. In xslt code, I need to put some transformation logic eg. if-else according to the specific value, check for null, blank values etc. Somewhere I read that I can do all this validation in java code also. What will be comfortable?
    3. In output xml, I want to remove the xml declaration as well as namespace declaration for 'ns1' and all prefixed 'ns1' from all element. Is that possible in the same transform process? like this...
    *<NikuDataBus>*
    *<Projects>*
    *<Project name="2" projectID="1" description="13" start="2009-08-04T16:02:23.390" finish="2009-08-04T16:02:23.390">*
    *<CustomInformation>*
    *<ColumnValue name="client_name">4</ns1:ColumnValue>*
    *<ColumnValue name="fa_sales_owner">15</ns1:ColumnValue>*
    *</CustomInformation>*
    *</Project>*
    *</NikuDataBus>*
    Please reply for my all queries.
    Edited by: vicky_007 on Aug 4, 2009 4:49 PM

  • Short code causes a strange problem - About the list again -- please read!

    Hi again people. Maybe you remember my project - has a list, that you can search thru using a text field. During the work I got stuck on a strange problem ( Again :-( ) My app has one text field, one combo box, one list and a text field once more. The code should do the following ->
    *1. Load the list, no problem with that.*
    *2. Show the elements of the list, that match the selected group in the combo box,no problem.*
    *3. Search thru the list using the text field,no problem.*
    4. When the user selects an element from the list, it should display its info in the second text field. This also works fine, but when after looking at info of one of the elements the things on numbers 2 and 3 ( look up! ) stop working. I must say that everything works fine until user selects an element from the list. I couldnt understand this kind of behavior so I am asking you to help me please.
    The code is very simple:
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    class the_window extends JFrame implements DocumentListener, ItemListener, ListSelectionListener {
        FileReader reader;
        String data_base[][];
        String first_pass[];
        int number_of_elements;
        DefaultListModel dflm = new DefaultListModel();
        JList list;
        JTextField text_field = new JTextField();
        JTextField info_field = new JTextField();
        String groups[] = {"1. group" , "2. group"};
        JComboBox groups_cmbx = new JComboBox(groups);
        the_window(){
            super("the Window!");
            JPanel panel = new JPanel(null);
            Container c = this.getContentPane();
            c.add(panel);
            text_field.setBounds(10,10,170,25);
            text_field.getDocument().addDocumentListener(this);
            panel.add(text_field);
            groups_cmbx.setBounds(10,45,170,25);
            groups_cmbx.addItemListener(this);
            panel.add(groups_cmbx);
            list = new JList(dflm);
            list.setBounds(10,90,170,190);
            list.setFixedCellHeight(20);
            list.addListSelectionListener(this);
            panel.add(list);
            info_field.setBounds(10,280,170,25);
            panel.add(info_field);
            load_the_base();
            refresh();
            this.setSize(190,350);
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.setResizable(false);
            this.setVisible(true);
        public void itemStateChanged(ItemEvent e){
            refresh();
        public void valueChanged(ListSelectionEvent e){
            String str = (String) dflm.getElementAt(list.getSelectedIndex());
            int index = 0;
            for(int i = 0; i < number_of_elements; i++){
                if(str.equals(data_base[0])){
    index = i;
    break;
    info_field.setText(data_base[index][1]);
    private void load_the_base(){
    String data = "";
    try{
    reader = new FileReader("data.txt";);
    int r = 0;
    while((r = reader.read()) != -1){
    char c = (char) r;
    data += c;
    reader.close();
    }catch(IOException e){}
    first_pass = data.split(";");
    number_of_elements = first_pass.length;
    data_base = new String[number_of_elements][];
    for(int i = 0; i<number_of_elements; i++){
    data_base[i] = first_pass[i].split("#");
    private void refresh(){
    String search_str = text_field.getText();
    int selektovano = groups_cmbx.getSelectedIndex();
    dflm.clear();
    for(int i = 0; i < number_of_elements; i++){
    int grupa = Integer.parseInt(data_base[i][2]);
    if(grupa == selektovano){
    String at_the_moment = data_base[i][0]; // if you change this to String at_the_moment = data_base[i][1]; it works perfectly
    if(at_the_moment.startsWith(search_str)){
    dflm.addElement(at_the_moment);
    public void changedUpdate(DocumentEvent e){
    refresh();
    public void removeUpdate(DocumentEvent e){
    refresh();
    public void insertUpdate(DocumentEvent e){
    refresh();
    public class Main {
    public static void main(String[] args) {
    JFrame f = new the_window();
    Now, can you please tell me whats wrong with this?
    For the "data.txt" make a new text file using *notepad* and copy the following line into the document:
    _1. element#1. info#0;2. element#2. info#0;3. element#3. info#1;4. element#4. info#1;5. element#5. info#1;_                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Darryl.Burke wrote:
    Keith, thanks for making that readable. So here's the diagnosis -
    In the refresh() method, calling defaultListModel.clear() results in a valueChanged(...) event in which this method calldefaultListModel.getElementAt(list.getSelectedIndex())results in the exception noted, as getSelectedIndex returns -1, the list being empty... you can't getElementAt(-1).
    I haven't analyzed all the code nor checked whether is now works as desired, but this small change to valueChanged counters the exception being thrown.   public void valueChanged(ListSelectionEvent e) {
    infoField.setText(""); // do this unconditionally
    if (list.getSelectedIndex() != -1) {
    String value = (String)defaultListModel.getElementAt(list.getSelectedIndex());
    for(int i = 0; i < numFields; i++){
    if(value.equals(matrix[0])){
    infoField.setText(matrix[i][1]);
    break;
    db
    Yea! You were right! I didnt think that calling *list_model.clear();* will result in calling *valueChanged()* ........
    That was some *clear()* thinking :-) Thank you!
    corlettk wrote:
    I cleaned up some variable & method names (tut tut), imports (very naighty), and some thread stuff... but it remains fundamentally the same codeIs it so important to "clean" the imports? How much does it slow down the loading time? Should I do this on all my projects, because they are all "very naighty"?
    ps. Thanks to all that gave some help to answering this strange question :-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Submitting a form with enter key causing strange problems

    I am having a very strange problem with a webapp I am currently developing. I am using JSF 1.2 along with Facelets and RichFaces. I have coded a workflow/wizard 4-step process, and on some pages I have 4 submit buttons that all call different actions on the page. The users thought it would be useful to have the enter key submit the form, so I followed some online resources to trap a keypress using javascript, looking for the enter keycode and calling document.getElementById("elementName").click(). This works fine most of the time. Sometimes, though, it seems as if an entire new session is being created, and odd behavior starts happening. For example, my page will only include 2 of the 4 facelets on the screen -or- I will get NullPointerExceptions for objects that I know have been created in the session bean I am currently using -or- I will get a duplicate form Id after trying to re-submit the page. Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"? I'm really at my wit's end here (plus it's nearly 3 AM, that never helps things). All of the buttons being clicked are standard h:commandButtons. There is some setTimeout logic included to disable the buttons on the page to prevent double clicks (I cannot disable them onsubmit because disabled buttons don't pass the right values, perhaps that's causing it, but if so, clicking the buttons with the mouse would cause that issue too, right?)
    I am not posting the code (yet), but if anyone wants to take a look see and see if I am doing something really abhorrently wrong, I'm more than willing to, I'm just curious if anyone has had problems regarding javascript submission of forms via the click() method. Clicking the button does not exhibit this type of behavior. Just as a side note: I am doing different things with the enter key depending if a modal window is open (the enter key closes the modal if it's up, and if not, it submits the form via a button click).
    Any help is much appreciated, if anyone has any inkling about where I should start looking for answers it would be really helpful.
    Thank you.

    edfrost wrote:
    Could the javascript click simulation not be submitting all of the form elements or is the enter key also acting like its default action (the form submission) in addition to the "click"?My guess is the second of these. You need to suppress the event handling after programmatically clicking the button.

  • A very Strange Problem!!!help me!!

    i encounter a very strange problem, in EJB
    i write two EJB, one Stateless Session called A, and one Entity called B.
    i want to call B's findByPrimaryKey method in one A's Business, but failed!!!
    but when i remove the statement that performed the findByPrimaryKey method to A's setSessionContext method, It's Success!!!!!
    what the Problem, i am useing the Borland 's AppServer.
    who can help

    how u create the entity bean B from A?
    using proper lookup?
    can u try by write a small function inside bean A
    that contain proper lookup to Bean B...
    then try to call finbyPrimaryKey...
    now tell me is it working?
    or else can u give code or clear idea..
    if i can help u ,,,, sure i will
    do mail me
    [email protected]

  • Strange problem with WD component build

    Hi all,
    I have strange problem with building one wd component, which is part of SC. I'm getting few errors which stops me from building component (and transporting to other systems via CMS of course). I'm providing sample of the errors (3 types) and ant error:
    [code]     [wdgen] [Error]   com.gbs.gmob.RequisitionFoCust --> ContextValueAttribute startDate [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Error]   com.gbs.gmob.RequisitionFoCust --> ContextValueAttribute stopDate [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Error]   com.gbs.gmob.SuppMatGroupView --> TextView MATERIAL_GROUP_NAME_editor [text]: Context element and property are not compatible
         [wdgen] [Error]   com.gbs.gmob.SuppMatGroupView --> TextView MATERIAL_GROUP_ID_editor [text]: Context element and property are not compatible
         [wdgen] [Error]   com.gbs.gmob.SupplierCust --> ContextModelNode SuppMatGroup [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
         [wdgen] [Error]   com.gbs.gmob.SupplierCust --> ContextValueAttribute material_group_list [type]: Type missing (Hint: The type property must be set to a simple type, a built in type or any java native type)
         [wdgen] [Warning] com.gbs.gmob.ApprovalRejectView --> TextEdit TextEdit: UIElement does not have a label
         [wdgen] [Info]    Catching throwable null
         [wdgen] [Info]    com.sap.webdynpro.generation.ant.GenerationAntTaskError
         [wdgen]      at com.sap.webdynpro.generation.ant.GenerationAnt.showCheckResult(GenerationAnt.java:153)
         [wdgen]      at com.sap.ide.webdynpro.generation.Generation.check(Generation.java:2050)
         [wdgen]      at com.sap.ide.webdynpro.generation.Generation.generatePersistentComponent(Generation.java:1299)
         [wdgen]      at com.sap.ide.webdynpro.generation.console.GenerationConsole.generate(GenerationConsole.java:175)
         [wdgen]      at com.sap.webdynpro.generation.ant.GenerationAnt.main(GenerationAnt.java:50)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [wdgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [wdgen]      at java.lang.reflect.Method.invoke(Method.java:324)
         [wdgen]      at com.sap.webdynpro.generation.ant.WDGenAntTask.execute(WDGenAntTask.java:219)
         [wdgen]      at org.apache.tools.ant.Task.perform(Task.java:341)
         [wdgen]      at org.apache.tools.ant.Target.execute(Target.java:309)
         [wdgen]      at org.apache.tools.ant.Target.performTasks(Target.java:336)
         [wdgen]      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
         [wdgen]      at com.sap.tc.buildplugin.techdev.ant.util.AntRunner.run(AntRunner.java:115)
         [wdgen]      at com.sap.tc.buildplugin.AbstractAntBuildAction.execute(AbstractAntBuildAction.java:65)
         [wdgen]      at com.sap.tc.buildplugin.AbstractPlugin.handleBuildStepSequence(AbstractPlugin.java:225)
         [wdgen]      at com.sap.tc.buildplugin.AbstractPlugin.performBuild(AbstractPlugin.java:201)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [wdgen]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [wdgen]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [wdgen]      at java.lang.reflect.Method.invoke(Method.java:324)
         [wdgen]      at com.sap.tc.buildtool.PluginCommunicator.maybeInvoke(PluginCommunicator.java:114)
         [wdgen]      at com.sap.tc.buildtool.PluginCommunicatorV2.communicate(PluginCommunicatorV2.java:42)
         [wdgen]      at com.sap.tc.buildtool.PluginHandlerImpl.handlePluginCommunication(PluginHandlerImpl.java:354)
         [wdgen]      at com.sap.tc.buildtool.PluginHandlerImpl.execute(PluginHandlerImpl.java:176)
         [wdgen]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:1726)
         [wdgen]      at com.sap.tc.devconf.impl.DCProxy.make(DCProxy.java:5559)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction.buildDCsForDevConfig(BuildAction.java:307)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction.access$200(BuildAction.java:58)
         [wdgen]      at com.sap.ide.eclipse.component.provider.actions.dcproject.BuildAction$1.run(BuildAction.java:212)
         [wdgen]      at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
         [wdgen] ERROR: Unknown exception during generation null (com.sap.webdynpro.generation.ant.GenerationAntTaskError)
         [wdgen] ERROR: Generation failed due to errors (6 seconds)
    Ant runtime 9.234 seconds
    Ant build finished with ERRORS
    [Error]   Generation failed!
    Error: Build stopped due to an error: [Error]   Generation failed!
    [/code]
    Strange is that if I try to rebuild and deploy locally, no errors occurs and I can normally deploy and run application manually!
    Does anyone have experience with this problem?
    Thanks in advance!
    Regards,
    Ivan

    Hi Ivan
    I have faced this problem earlier BUT ultimately I have to create the DC from scratch.
    But you can check these things:
    1.Have you copy/pasted Dictionary type from other location (check the path of the dictionary types ) --> If yes then deleted that and create again(do not use copy/paste)
    2.This also happens if your "Used DC" has some problems in the JDI --> Remove the used DC and add it again.
    3.Make sure the NWDI infastructure is perfect- this may be a cause.
    4. Check Context mappings --> delete all mappings > save metadata > Create again.
    5. Delete the model and recreate it again.
    6.If you have done reimporting model make sure to restart J2EE instance.
    Hope this solves the problem - if not please post
    Regards
    Ananda

  • Strange Problem with a Vector wraped inside a Hashtable

    Hi all ,
    I'm having a strange problem with a Vector wraped within a Hashtable inherited Class.
    My goal is to keep the order of the elements of the Hashtable so what I did was to extend Hashtable and wrap a Vector Inside of it.
    Here is what it looks like :
    package somepackage.util;
    import java.util.Enumeration;
    import java.util.Hashtable;
    import java.util.Vector;
    public class OrderedHashTable extends Hashtable {
        private Vector index;
        /** Creates a new instance of OrderedHashTable */
        public OrderedHashTable() {      
            this.index = new Vector();
    //adds a key pair value to the HashTable and adds the key at the end of the index Vector
       public synchronized Object put(Object key,Object value){      
           index.addElement(key);
           Object obj = super.put(key,value);
           System.out.println("inside OrderedHashTable Put method index size = " + index.size());
           return obj;    
    public synchronized Object remove(Object key){
           int indx = index.indexOf(key);
           index.removeElementAt(indx);
           Object obj = super.remove(key);
           return obj;
    public synchronized Enumeration getOrderedEnumeration(){
           return index.elements();
    public synchronized Object getByIndex(int indexValue){
           Object obj1 = index.elementAt(indexValue);
           Object obj2 = super.get(obj1);      
           return obj2;
       public synchronized int indexOf(Object key){
        return index.indexOf(key);
        public synchronized int getIndexSize() {
            return index.size();
        }Everything seemed to work fine util I tried to add objects using a "for" loop such as this one :
    private synchronized void testOrderedHashTable(){
            OrderedHashTable test = new OrderedHashTable();
            for (int i = 1 ; i<15; i++){
                 System.out.println("adding Object No " + i);
                 String s = new String("string number = "+i);
                 test.put(new Integer(i),s);
                 System.out.println("-----------------------------------");
            //try to list the objects
            Enumeration e = test.getOrderedEnumeration();
            while (e.hasMoreElements()){
                Integer intObj = (Integer) e.nextElement();
                System.out.println("nextObject Number = "+ intObj);
        }Here is the console output :
    Generic/JSR179: adding Object No 1
    Generic/JSR179: inside OrderedHashTable Put method index size = 1
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 2
    Generic/JSR179: inside OrderedHashTable Put method index size = 2
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 3
    Generic/JSR179: inside OrderedHashTable Put method index size = 3
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 4
    Generic/JSR179: inside OrderedHashTable Put method index size = 4
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 5
    Generic/JSR179: inside OrderedHashTable Put method index size = 5
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 6
    Generic/JSR179: inside OrderedHashTable Put method index size = 6
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 7
    Generic/JSR179: inside OrderedHashTable Put method index size = 7
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 8
    Generic/JSR179: inside OrderedHashTable Put method index size = 8
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 9
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 10
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 10
    Generic/JSR179: inside OrderedHashTable Put method index size = 11
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 11
    Generic/JSR179: inside OrderedHashTable Put method index size = 12
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 12
    Generic/JSR179: inside OrderedHashTable Put method index size = 13
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 13
    Generic/JSR179: inside OrderedHashTable Put method index size = 14
    Generic/JSR179: -----------------------------------
    Generic/JSR179: adding Object No 14
    Generic/JSR179: inside OrderedHashTable Put method index size = 15
    Generic/JSR179: -----------------------------------
    Generic/JSR179: nextObject Number = 1
    Generic/JSR179: nextObject Number = 2
    Generic/JSR179: nextObject Number = 3
    Generic/JSR179: nextObject Number = 4
    Generic/JSR179: nextObject Number = 5
    Generic/JSR179: nextObject Number = 6
    Generic/JSR179: nextObject Number = 7
    Generic/JSR179: nextObject Number = 8
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 9
    Generic/JSR179: nextObject Number = 10
    Generic/JSR179: nextObject Number = 11
    Generic/JSR179: nextObject Number = 12
    Generic/JSR179: nextObject Number = 13
    Generic/JSR179: nextObject Number = 14
    You can notice that the output seems correct until the insertion of object 9.
    At this point the vector size should be 9 and the output says it is 10 elements long ...
    In the final check you can notice the 9 was inserted twice ...
    I think the problem has something to do with the automatic resizing of the vector but I'm not really sure. Mybe the resizing is done in a separate thread and the new insertion occurs before the vector is resized ... this is my best guess ...
    I also tested this in a pure J2SE evironment and I don't have the same strange behavior
    Can anybody tell me what I am doing wrong or how I could avoid this problem ?
    Thanks a lot !
    Cheers Alex

    Am i doing anything wrong?Uhm, yes. Read the API doc for addElement() and for addAll()

  • A strang problem about Resin database connection pool

    I am a beginner&#65292;hope somebody can help me.
    my web site occured a strange problem after I used the Resin database connection pool instead of
    connecting directly
    the error message as follows:java.lang.IllegalArgumentException: Request cannot be null
    at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:100)
    at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:92)
    at com.caucho.server.connection.RequestAdapter.<init>(RequestAdapter.java:96)
    at com.caucho.server.webapp.DispatchRequest.<init>(DispatchRequest.java:97)
    at com.caucho.server.webapp.IncludeDispatchRequest.<init>(IncludeDispatchRequest.java:77)
    at com.caucho.server.webapp.IncludeDispatchRequest.createDispatch(IncludeDispatchRequest.java:87)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:389)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:345)
    at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:807)
    at _jsp._intro__jsp._jspService(/intro.jsp:60)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
    at com.caucho.jsp.Page.pageservice(Page.java:571)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:155)
    at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:211)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:331)
    at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:464)
    at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
    at java.lang.Thread.run(Thread.java:595)

    <!--
    - Resin 3.0 configuration file.
    -->
    <resin xmlns="http://caucho.com/ns/resin"
    xmlns:resin="http://caucho.com/ns/resin/core">
    <!--
    - Logging configuration for the JDK logging API.
    -->
    <log name='' level='info' path='stdout:' timestamp='[%H:%M:%S.%s] '/>
    <log name='com.caucho.java' level='config' path='stdout:'
    timestamp='[%H:%M:%S.%s] '/>
    <log name='com.caucho.loader' level='config' path='stdout:'
    timestamp='[%H:%M:%S.%s] '/>
    <!--
    - For production sites, change dependency-check-interval to something
    - like 600s, so it only checks for updates every 10 minutes.
    -->
    <dependency-check-interval>2s</dependency-check-interval>
    <!--
    - You can change the compiler to "javac" or jikes.
    - The default is "internal" only because it's the most
    - likely to be available.
    -->
    <javac compiler="internal" args=""/>
    <!-- Security providers.
    - <security-provider>
    - com.sun.net.ssl.internal.ssl.Provider
    - </security-provider>
    -->
    <!--
    - If starting bin/resin as root on Unix, specify the user name
    - and group name for the web server user.
    - <user-name>resin</user-name>
    - <group-name>resin</group-name>
    -->
    <!--
    - Configures threads shared among all HTTP and SRUN ports.
    -->
    <thread-pool>
    <!-- Maximum number of threads. -->
    <thread-max>128</thread-max>
    <!-- Minimum number of spare connection threads. -->
    <spare-thread-min>25</spare-thread-min>
    </thread-pool>
    <!--
    - Configures the minimum free memory allowed before Resin
    - will force a restart.
    -->
    <min-free-memory>1M</min-free-memory>
    <server>
    <!-- adds all .jar files under the resin/lib directory -->
    <class-loader>
    <tree-loader path="$resin-home/lib"/>
    </class-loader>
    <!-- Configures the keepalive -->
    <keepalive-max>500</keepalive-max>
    <keepalive-timeout>120s</keepalive-timeout>
    <!-- The http port -->
    <http server-id="" host="*" port="8080"/>
    <!--
    - SSL port configuration:
    - <http port="8443">
    - <openssl>
    - <certificate-file>keys/gryffindor.crt</certificate-file>
    - <certificate-key-file>keys/gryffindor.key</certificate-key-file>
    - <password>test123</password>
    - </openssl>
    - </http>
    -->
    <!--
    - The local cluster, used for load balancing and distributed
    - backup.
    -->
    <cluster>
    <srun server-id="" host="127.0.0.1" port="6802" index="1"/>
    </cluster>
    <!--
    - Enables/disables exceptions when the browser closes a connection.
    -->
    <ignore-client-disconnect>true</ignore-client-disconnect>
    <!--
    - Enables the cache
    -->
    <cache path="cache" memory-size="10M"/>
    <!--
    - Enables periodic checking of the server status.
    - With JDK 1.5, this will ask the JDK to check for deadlocks.
    - All servers can add <url>s to be checked.
    -->
    <ping>
    <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
    </ping>
    <!--
    - Defaults applied to each web-app.
    -->
    <web-app-default>
    <!--
    - Sets timeout values for cacheable pages, e.g. static pages.
    -->
    <cache-mapping url-pattern="/" expires="5s"/>
    <cache-mapping url-pattern="*.gif" expires="60s"/>
    <cache-mapping url-pattern="*.jpg" expires="60s"/>
    <!--
    - Servlet to use for directory display.
    -->
    <servlet servlet-name="directory"
    servlet-class="com.caucho.servlets.DirectoryServlet"/>
    </web-app-default>
    <!--DataSource jndi configuration-->
    <database>
    <jndi-name>jdbc/artunion</jndi-name>
    <driver type="org.gjt.mm.mysql.Driver">
    <url>jdbc:mysql://localhost:3306/union</url>
    <user>as</user>
    <password>as</password>
    </driver>
    <prepared-statement-cache-size>8</prepared-statement-cache-size>
    <max-connections>20</max-connections>
    <max-idle-time>30s</max-idle-time>
    </database>
    <!--
    - Default host configuration applied to all virtual hosts.
    -->
    <host-default>
    <class-loader>
    <compiling-loader path='webapps/WEB-INF/classes'/>
    <library-loader path='webapps/WEB-INF/lib'/>
    </class-loader>
    <!--
    - With another web server, like Apache, this can be commented out
    - because the web server will log this information.
    -->
    <access-log path='logs/access.log'
    format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
    rollover-period='1W'/>
    <!-- creates the webapps directory for .war expansion -->
    <web-app-deploy path='webapps'/>
    <!-- creates the deploy directory for .ear expansion -->
    <ear-deploy path='deploy'>
    <ear-default>
    <!-- Configure this for the ejb server
    - <ejb-server>
    - <config-directory>WEB-INF</config-directory>
    - <data-source>jdbc/test</data-source>
    - </ejb-server>
    -->
    </ear-default>
    </ear-deploy>
    <!-- creates the deploy directory for .rar expansion -->
    <resource-deploy path='deploy'/>
    <!-- creates a second deploy directory for .war expansion -->
    <web-app-deploy path='deploy'/>
    </host-default>
    <!-- includes the web-app-default for default web-app behavior -->
    <resin:import path="${resinHome}/conf/app-default.xml"/>
    <!-- configures the default host, matching any host name -->
    <host id=''>
    <document-directory>D:/artunion</document-directory>
    <!-- configures the root web-app -->
    <web-app id='/'>
    <!-- adds xsl to the search path -->
    <class-loader>
    <simple-loader path="$host-root/xsl"/>
    </class-loader>
    <servlet-mapping url-pattern="/servlet/*" servlet-name="invoker"/>
    </web-app>
    </host>
    </server>
    </resin>
    Thank you!

Maybe you are looking for