Strange Behavior with SQL/XML

Our University have had for quite some time now a rather difficult situation with a very significant course handbook web site that creates HTML based on database XSL transformation of XML content generated with SQL/XML. The database is 10.2.0.2.0. The HTML is passed via a distributed database link to an Oracle Portal dynamic portlet for display. Some of the derived XML originates from XML Schema registered instance documents and some from relational storage.
Let me explain. Occasionally after a period of operating (could be one week, sometimes even less) we will experience a problem whereby our derived XML content (just prior to PL/SQL database XSL transformation) will develop a parsing problem. Once this happens to one XSL transform of a course then subsequently it happens for every course viewed/transformed there-after.
Recently I experienced the problem and then added the XMLNS argument to the extract function. That seemed to fix things and I thought I had it licked.
Today we started to get the same problem again. The error reported was:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00242: invalid use of ampersand ('&') character (use &)
Error at line 1
Now this might have been reasonable for one course. But every course reported the same problem there-after without fail. I managed to fix the issue but in a way that really doesn't seem to make sense. What I did was to alter the SQL/XML statement by adding in an extra XMLEMENT and then to recompile the function that returns an XMLTYPE based on the execution of the SQL statement. After compiling the function everything returned to normal.
This doesn't seem to make sense.
I am pretty desperate for help on this. I really don't know how to progress the solution. I don't get much joy from Oracle Support as our application covers too many high tech areas. This is really shaking confidence in our organization's use of Oracle technology.

Hi Mark.
We've isolated the problem a bit more now and there is a support SR (6089662.994). At this stage we are unable to reproduce - I am testing out an export though. The problem only occurs when a certain condition has been reached. Once that happens then extraneous characters are produced in the XMLTYPE feed returned by a function. We are not at all sure about how to make this condition occur. This doesn't just happen with one SQL/XML cursor - I've seen it happen with 3 different cursors. All are located in the same function that returns an XMLTYPE.
We are convinced the problem lies with one or more SQL/XML cursors located in the same function. Once one of these cursors malfunctions it will produce XML that is not well formed OR on occasion has content omitted but is well formed (there often seem to be extraneous characters). When the XML content is not well formed then the parsing stage (dbms_xmlparser.parseclob(myparser, xml_clob)) of XSL transformation crashes. This error then propagates to the dynamic portlet in Oracle Portal thus removing the content on the page. This happens for every execution of the cursor while the condition manifests, the only difference between calls being bind variables.
The interesting thing is that the error if left to itself will eventually stop. The cursor seems to right itself eventually. On the last occurrence, the problem commenced at 4.30am and went for 3.5 hrs and then seemed to right itself.

Similar Messages

  • Strange behavior with Bindings??

    Hello to all JavaFX 2 Binding experts,
    I have a strange behavior with Bindings in JavaFX 2.2 (Java 1.7 update 21). Please have a look at the following source code:
    package test;
    import javafx.application.Application;
    import javafx.beans.binding.BooleanBinding;
    import javafx.beans.property.SimpleBooleanProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.RadioButton;
    import javafx.stage.Stage;
    public class BindingVsProperty extends Application
        @FXML
        private RadioButton opt11;
        @FXML
        private RadioButton opt12;
        @FXML
        private RadioButton opt21;
        @FXML
        private RadioButton opt22;
        @FXML
        private Label lbl11And21;
      @Override
        public void start(Stage arg0) throws Exception
            FXMLLoader l_loader = new FXMLLoader();
            l_loader.setLocation(BindingVsProperty.class.getResource("BindingVsproperty.fxml"));
            l_loader.setController(this);
            l_loader.load();
            Scene l_scene = new Scene((Parent)l_loader.getRoot());
            arg0.setScene(l_scene);
            useBinding1();
            //useBinding2();
            //useBinding3();
            arg0.show();
        private void useBinding1() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding2() // OK - ChangeListener.changed(..) is called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            lbl11And21.visibleProperty().bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding3() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            new SimpleBooleanProperty(false).bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        public static void main(String[] args)
            launch(args);
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <BorderPane id="BorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="371.0" xmlns:fx="http://javafx.com/fxml">
      <center>
        <AnchorPane prefHeight="200.0" prefWidth="200.0">
          <children>
            <Label id="lblAnd" fx:id="lbl11And21" layoutX="82.0" layoutY="121.0" text="Group1 Opt1 AND Group2 Opt1 is true" textFill="#41cc00" visible="false" />
            <RadioButton fx:id="opt21" layoutX="216.0" layoutY="24.0" mnemonicParsing="false" text="Group 2 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group2" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt22" layoutX="216.0" layoutY="67.0" mnemonicParsing="false" text="Group 2 - Opt 2" toggleGroup="$group2" />
            <RadioButton fx:id="opt11" layoutX="29.0" layoutY="24.0" mnemonicParsing="false" text="Group 1 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group1" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt12" layoutX="29.0" layoutY="67.0" mnemonicParsing="false" text="Group 1- Opt 2" toggleGroup="$group1" />
          </children>
        </AnchorPane>
      </center>
    </BorderPane>
    What I need for my application is the use case in useBinding1(), i.e., a BooleanBinding where several listeners are attached to. The problem is that I never get a callback in the ChangeListener if one of the RadioButton.selectedProperty() is changed.
    Now I tried what happens if I use the same BooleanBinding for another binding to a property plus the listener, now the listener gets callbacks as expected! (see useBinding2() )
    Than I thought may be Bindings must be bound in order to trigger listeners and tried useBinding3() where I bind the BooleanBinding to a new BooleanProperty, in this case the listener doesn't get callback anymore...
    And now I'm very frustrated and hope that anyone out there can help me to understand this strange behavior.
    Thanks a lot!
    WhiteAntelope

    All these work just fine for me: the listeners are all called as expected. Note that the listener is only invoked when the value of the binding actually changes, which doesn't happen every time a radio button is pressed. (For example, if both buttons are unselected, the binding is false. If one button is selected, the binding remains false and the listener is not invoked. When the second button is selected, the binding becomes true, and the listener is invoked.)

  • Strange behavior with "insertTextAsContent"

    Hi,
    I've got a strange behavior with this loop :
    for (j = 0; j < myParagraph.characters.length-1; j++) {
         var myCharacter = myParagraph.characters[j];
         if (myCharacter.appliedFont.fontStyleName == "Regular") {
              alert(myCharacter.contents);
              myXmlElement.insertTextAsContent(myCharacter.contents, XMLElementPosition.ELEMENT_END);
    I loop through every characters of a paragraph, test if they are "regular", "italic", "bold"..., and store them in different xmlElement. Everything is fine except that every double characters (in french : homme, cette, elle, ville...) output in my xmlElement as one only character (home, cete, ele, vile...). I try with "aaaaaazzzzzzeeeeeerrrrrtttttyyyyy" and it give me, the same way, "azerty" ?!
    The "alert" line output the correct full sentences character by character ("h", "o", "m", "m", "e"...).
    If you have any idea to explain, you are more than welcome
    Thanks
    ** edit : don't know if it's important but I'm using CS6 **

    Hi
    Have you seen this in the object model viewer?
    XMLElement.insertTextAsContent (using:varies, position: XMLElementPosition ): Text
    Adobe InDesign CC (8.0) Object Model
    Inserts the specified text as content before, in, or after the XML element.
    using: Data Type: varies
    The text to be inserted. Can accept: String or SpecialCharacters enumerator.
    position: Data Type: XMLElementPosition
    The position at which to insert the text. Note that text inserted before or after the element does not become part of the content of the element. Instead, it becomes content of the parent of the element.
    Don't ask me why it works when there is no doubled character
    So i tried the following and it worked. I hope this will solve your problem.
    function main() {
         if (app.documents.length != 0) {
            var myDoc = app.activeDocument;
            var myParagraph = myDoc.textFrames[0].paragraphs[0];
            var myXmlElement  = myDoc.xmlElements[0];
            for (j = 0; j < myParagraph.characters.length-1; j++) {
                var myCharacter = myParagraph.characters[j];
                if (myCharacter.appliedFont.fontStyleName == "Regular") {
                    alert(myCharacter.contents);
                    myXmlElement.contents += myCharacter.contents;
                    alert(">" + myXmlElement.contents+ "<");
                }     // if
            }     //for
        }     // if
    }   // main()
    Kind regards
    Dani (from Switzerland)

  • Strange behavior with DefaultCellEditor

    Hello everybody,
    I found a strange behavior with DefaultCellEditor using a JTextField in a JTable. The following line will show, what I mean:
    setDefaultCellEditor(String.class,new DefaultCellEditor(new JTextField()));
    Imho this should do the same as JTable does already, when it installs a JTextField as default cell editor for cell values of the String class. But, it seems, that it is not the same:
    When I add this line in the constructor of a JTable subclass the editor component seems to be less wide and less high to the right and bottom - it looks so with Win95 with JDK 1.4.0 - but with Win2000 it is correct for example.
    My question is - how can it be, that the normal default cell editor does not have this behavior but when I use the line above, it is displayed in the wrong way?- What does the default cell editor in another way than I do it, that it has not this ugly display?
    I would like to look in the sources, but unfortunately I can't find the source code in JDK 1.4.0 - perhaps you have a hint, where to find it.
    greetings Marsian

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with Collections

    Hello!
    I have a - from my point of view - strange behavior with a List (same also applies to Vector, LinkedList, and others):
    List<String> myList = new myList<String>;
    myList.add("One");
    while (true) {
    try {
    System.out.println(myList.size());
    throw new Exception();
    } catch (Exception e) {
    e.printStackTrace();
    }And the result is 1, 2, 2, 2, ...although I added only one element. The two elements in the List point to the same object.
    What could case this issue?
    Regards,

    len00x wrote:
    List<String> myList = new myList<String>;This doesn't even look like it will compile for at least one reason, easily two.

  • Strange behavior with Label#setWrapText(true) in GridPane.

    I've got a strange behavior with a Label, which has setWrapText(true) in a GridPane.
    Check out the sample and click the button.
    You see, that the GridPane suddenly behaves as if it had GridPane.setVGrow and HGrow set for the lblStatus.
    (it takes the full available space).
    Furthermore the first column shrinks to a minimum, so that lblText1 can't display its text anymore.
    Tested with 2.1 GA.
    Any help with that?
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class TestApp4 extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage stage) throws Exception {
            GridPane gridPane = new GridPane();
            gridPane.setPadding(new Insets(2, 2, 2, 2));
            Label lblText1 = new Label();
            lblText1.textProperty().set("Some text");
            Label lblText2 = new Label();
            lblText2.textProperty().set("Some other text");
            Button btnClick = new Button();
            btnClick.textProperty().set("Click me");
            final Label lblStatus = new Label();
            lblStatus.setWrapText(true);
            gridPane.add(lblText1, 0, 0, 1, 1);
            gridPane.add(lblText2, 1, 0);
            gridPane.add(lblStatus, 0, 2, 2, 1);
            gridPane.add(btnClick, 0, 3, 2, 1);
            btnClick.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    lblStatus.setText("very long text, very long text, very long text, very long text,very long text, very long text");
            gridPane.setGridLinesVisible(true);
            Scene scene = new Scene(gridPane, 300, 300);
            stage.setScene(scene);
            stage.show();
    }Edited by: csh on 19.07.2012 03:35

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with csv flat file integration

    Hi,
    i've a real strange behavior with csv flat file integration.
    I've defined the file inbound with | as separator
    Here is the sender payload result, extra columns appears !
    <row>
      <VAL1>D</VAL1>
      <VAL2 />
      <VAL3>01</VAL3>
      <VAL4 />
      <VAL5 />
      <VAL6>003160000</VAL6>
      <VAL7 />
      <col>003160001</col>
      <col />
      <col>2</col>
      <col />
      <col>91200604212</col>
      <col />
      <col>VIRTUAL DJ HOME EDITION</col>
      <col />
      <col>2</col>
      <col />
      <col>2</col>
      <col />
      <col />
      <col>2</col>
      <col />
      </row>
    When i changed the separator to ; in my file and in the file inbound it gives the following.
    Everything is ok.
    <row>
      <VAL1>D</VAL1>
      <VAL2>01</VAL2>
      <VAL3 />
      <VAL4>003160000</VAL4>
      <VAL5>003160001</VAL5>
      <VAL6>7</VAL6>
      <VAL7>91200604212</VAL7>
      <col>VIRTUAL DJ HOME EDITION</col>
      <col>10</col>
      <col>10</col>
      <col />
      <col>10</col>
      </row>
    Why using a different separator would change the payload ?
    It will be a good thing for me if I could use the pipe separator.
    Thanks

    Can you give the steps you're using to get this error? I'm not seeing any problem here.
    1) Create a new audio project (44.1 KHz).
    2) Arm the record head in track 1 by pressing the "R" button in that track. Verify audio levels.
    3) Record by pressing the record button in the audio controls.
    4) Stop recording by pressing the stop button.
    5) Play back the resulting audio. Sounds fine.
    6) Select File > Export.
    7) Change the file format to WAVE file. Change the bit depth to 16 bit, change the sample rate to 44.1 KHz.
    8) Type the name SAVETEST.wav and click on the Export button.
    9) Play back the resulting WAV file in QuickTime Player, Apple Loops Utility, etc. and it seems just fine.
    What am I missing that you're doing?

  • Strange behavior with Zoom and Image control

    HELP - I have a strange behavior (bug?) with using Zoom
    effect on an Image that has been placed on a Canvas. I am using
    dynamically instantiated images which are placed on a canvas inside
    a panel. I then assign a Zoom IN and Zoom Out behavior to the
    image, triggered by ROLL_OVER and ROLL_OUT effect triggers. THE BUG
    is that the image jumps around on the Zoom OUT and lands on a
    random place on the canvas instead of coming back to the original
    spot. This is especially true if the mouse goes in and out of the
    image very quickly. HELP -- what am I doing wrong? Computer = Mac
    OS X 10.4.9 Flex 2.0.1
    Here's a simple demo of the bug -- be sure to move the mouse
    in and out rapidly:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="setUp();">
    <mx:Script><![CDATA[
    import mx.events.EffectEvent;
    import mx.effects.Fade;
    import mx.effects.Zoom;
    import mx.rpc.events.ResultEvent;
    import flash.display.Sprite;
    import mx.core.UIComponent;
    import mx.controls.Image;
    private var zoomIn:Zoom;
    private var zoomOut:Zoom;
    private function setUp():void {
    var image:Image = new Image();
    image.id = "album_1_1";
    image.x = 200;
    image.y = 200;
    image.width = 64;
    image.height = 64;
    image.source = "
    http://s3.amazonaws.com/davidmccallie/album-128.jpg";
    image.addEventListener(MouseEvent.ROLL_OVER, doZoom);
    image.addEventListener(MouseEvent.ROLL_OUT, doZoom);
    myCanvas.addChild(image);
    zoomIn = new Zoom();
    zoomIn.zoomHeightTo = 2.0;
    zoomIn.zoomWidthTo = 2.0;
    zoomIn.captureRollEvents = true;
    zoomIn.suspendBackgroundProcessing = true;
    zoomOut = new Zoom();
    zoomOut.zoomHeightTo = 1.0;
    zoomOut.zoomWidthTo = 1.0;
    zoomOut.captureRollEvents = true;
    zoomOut.suspendBackgroundProcessing = true;
    private function doZoom(event:MouseEvent):void {
    var image:Image = Image(event.currentTarget);
    if (event.type == MouseEvent.ROLL_OVER) {
    zoomIn.target = event.currentTarget;
    zoomIn.play();
    } else if (event.type == MouseEvent.ROLL_OUT) {
    zoomOut.target = event.currentTarget;
    zoomOut.play();
    ]]>
    </mx:Script>
    <mx:Panel width="100%" height="100%"
    layout="absolute">
    <mx:Canvas id="myCanvas" width="100%" height="100%">
    </mx:Canvas>
    </mx:Panel>
    </mx:Application>

    There must be bugs in the Zoom effect code -- I changed the
    Zoom to Resize in the above code, and it works perfectly. Of
    course, Resize is not as nice as Zoom because you can't set the
    resize to be around the center of the image, but at least it works.
    Does anyone know about bugs in the Zoom effect?

  • Strange Behavior with gMSA in Server 2012 R2

    Greetings,
    I have been doing some testing with gMSA Accounts in a Server 2012 R2 environment (two separate environments, actually), and I have noticed something very strange that occurred in both environments, which does not appear to be occurring in one of our customer's
    self-managed environments.
    We created a Group Managed Service Account using the following article:
    http://blogs.technet.com/b/askpfeplat/archive/2012/12/17/windows-server-2012-group-managed-service-accounts.aspx
    Everything went smoothly, and the account installs/tests successfully on both of the hosts that we are testing on. I am able to set my services to run under the account, and most of them appear to work fine. I am having some issues with a few of my services,
    and I believe that the strange behavior I am seeing may have something to do with this - described below: 
    As soon as I set the service's Log On Account (via the Log On Tab under the Service's Properties), the entirety of the "Log On" tab changes to "greyed out," and I am unable to change the Log On account back via the GUI (Screenshot
    attached).
    I found that I am able to successfully change the account via Command Line using sc.exe, but the Log On tab remains greyed out! So far, I have found nothing to remedy this, but confirmed that it happens for any service I set to use the gMSA as the Logon
    Account, and that it happens in 2 separate test environments, but not in a Customer's production environment - very strange.
    All servers in this environment are running Server 2012 R2, and domain Functional Level is currently Server 2012.
    I have been unable to find any information online about this behavior, so I am hoping someone has seen this before, and can explain why this is happening.
    Nick

    VIvian,
    Yes, we used the Install-AdServiceAccount gMSA command on each host using the gMSA account, and then ran Test-AdServiceAccount gMSA, which returned "True."
    However, one thing I noticed is that if I run Test-ADServiceAccount gMSA as a Local Administrator, it fails with the following:
    PS C:\Users\Administrator> Test-AdServiceAccount gMSA$
    Test-AdServiceAccount : The server has rejected the client credentials.
    At line:1 char:1
    + Test-AdServiceAccount gMSA$
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : SecurityError: (:) [Test-ADServiceAccount], AuthenticationException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.Security.Authentication.AuthenticationException,Microsoft.A
       ctiveDirectory.Management.Commands.TestADServiceAccount
    If I run Test-ADServiceAccount gMSA as Domain Administrator, it returns true:
    PS C:\Users\Administrator.<domainname>> Test-AdServiceAccount gMSA$
    True
    Is this normal?
    Overall, I think the issue I am running into is at the Application Level, and not a problem with the gMSA, as it appears to be working. (Can Start/Stop services without any issues). I will be investigating my issue further with 3rd-party vendors, unless
    you think there is something wrong with my gMSA accounts based on the information I have provided.
    Nick

  • How do I create an undeclared namespace node with sql/xml?

    I have to interact with a .NET web service that is expecting to have an xml node with an undeclared namespace, i.e. <address xmlns=""> I figured that I could create this by using XMLATTRIBUTES ( '' AS "xmlns") but a null attribute will not be added to the attribute listing. This works fine for other xmlns entries that contain values. Without this undeclared namespace node, the web service reports an Internal SOAP failure message, so I have to include it. Do I have to resort to manually injecting this null attribute via DOM after I produce the xml? I'm using SQL/XML query generate the xml as a view which gives me the entire packet for this document/literal web service OTHER THAN this missing undeclared namespace element.
    Any tips/suggestions would be helpful! Thanks a bunch, and have a Happy Holiday Season.
    Eric

    You can use UTL_RAW package.
    First, convert string to raw with UTL_RAW.CAST_TO_RAW, then using UTL_RAW.CONVERT to convert raw to utf-8 and finally UTL_RAW.CAST_TO_VARCHAR to get utf-8 string.
    Regards

  • Re-Write the Node-DOM code with SQL-XML funtions

    Hi Friends,
    Could you please help in re-writing the below code using SQl-XML functions
    DECLARE
    l_domdoc dbms_xmldom.DOMDocument;
    l_xmltype XMLTYPE;
    l_root_node dbms_xmldom.DOMNode;
    l_departments_node dbms_xmldom.DOMNode;
    l_dept_element dbms_xmldom.DOMElement;
    l_dept_node dbms_xmldom.DOMNode;
    l_name_node dbms_xmldom.DOMNode;
    l_name_textnode dbms_xmldom.DOMNode;
    l_location_node dbms_xmldom.DOMNode;
    l_location_textnode dbms_xmldom.DOMNode;
    l_employees_node dbms_xmldom.DOMNode;
    l_emp_element dbms_xmldom.DOMElement;
    l_emp_node dbms_xmldom.DOMNode;
    l_emp_first_name_node dbms_xmldom.DOMNode;
    l_emp_first_name_textnode dbms_xmldom.DOMNode;
    l_emp_last_name_node dbms_xmldom.DOMNode;
    l_emp_last_name_textnode dbms_xmldom.DOMNode;
    BEGIN
    -- Create an empty XML document
    l_domdoc := dbms_xmldom.newDomDocument;
    -- Create a root node
    l_root_node := dbms_xmldom.makeNode(l_domdoc);
    -- Create a new node Departments and add it to the root node
    l_departments_node := dbms_xmldom.appendChild( l_root_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'Deptartments' ))
    FOR r_dept IN (SELECT dept.department_id
    , dept.department_name
    , loc.city
    FROM departments dept
    JOIN locations loc
    ON loc.location_id = dept.location_id
    WHERE dept.department_id IN (10,20)
    LOOP
    -- For each record, create a new Dept element with the Department ID as attribute.
    -- and add this new Dept element to the Departments node
    l_dept_element := dbms_xmldom.createElement(l_domdoc, 'Dept' );
    dbms_xmldom.setAttribute(l_dept_element, 'Deptno', r_dept.Department_Id );
    l_dept_node := dbms_xmldom.appendChild( l_departments_node
    , dbms_xmldom.makeNode(l_dept_element)
    -- Each Dept node will get a Name node which contains the department name as text
    l_name_node := dbms_xmldom.appendChild( l_dept_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'Name' ))
    l_name_textnode := dbms_xmldom.appendChild( l_name_node
    , dbms_xmldom.makeNode(dbms_xmldom.createTextNode(l_domdoc, r_dept.department_name ))
    -- Each Dept node will aslo get a Location node which contains the location(city) as text
    l_location_node := dbms_xmldom.appendChild( l_dept_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'Location' ))
    l_location_textnode := dbms_xmldom.appendChild( l_location_node
    , dbms_xmldom.makeNode(dbms_xmldom.createTextNode(l_domdoc, r_dept.city ))
    -- For each department, add an Employees node
    l_employees_node := dbms_xmldom.appendChild( l_dept_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'Employees' ))
    FOR r_emp IN (SELECT employee_id
    , first_name
    , last_name
    FROM employees
    WHERE department_id = r_dept.department_id
    LOOP
    -- For each record, create a new Emp element with the Employee ID as attribute.
    -- and add this new Emp element to the Employees node
    l_emp_element := dbms_xmldom.createElement(l_domdoc, 'Emp' );
    dbms_xmldom.setAttribute(l_emp_element, 'empid', r_emp.employee_id );
    l_emp_node := dbms_xmldom.appendChild( l_employees_node
    , dbms_xmldom.makeNode(l_emp_element)
    -- Each emp node will get a First name and Last name node which contains the first name and last name as text
    l_emp_first_name_node := dbms_xmldom.appendChild( l_emp_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'FirstName' ))
    l_emp_first_name_textnode := dbms_xmldom.appendChild( l_emp_first_name_node
    , dbms_xmldom.makeNode(dbms_xmldom.createTextNode(l_domdoc, r_emp.first_name ))
    l_emp_last_name_node := dbms_xmldom.appendChild( l_emp_node
    , dbms_xmldom.makeNode(dbms_xmldom.createElement(l_domdoc, 'LastName' ))
    l_emp_last_name_textnode := dbms_xmldom.appendChild( l_emp_last_name_node
    , dbms_xmldom.makeNode(dbms_xmldom.createTextNode(l_domdoc, r_emp.last_name ))
    END LOOP;
      END LOOP;
    l_xmltype := dbms_xmldom.getXmlType(l_domdoc);
    dbms_xmldom.freeDocument(l_domdoc);
    dbms_output.put_line(l_xmltype.getClobVal);
    END;
    thanks and regards,
    Arun Thomas T

    It's as easy as this :
    SQL> select xmlserialize(document
      2           xmlelement("Departments"
      3           , xmlagg(
      4               xmlelement("Dept"
      5               , xmlattributes(d.department_id as "Deptno")
      6               , xmlforest(
      7                   d.department_name as "Name"
      8                 , l.city as "Location"
      9                 )
    10               , xmlelement("Employees"
    11                 , (
    12                     select xmlagg(
    13                              xmlelement("Emp"
    14                              , xmlattributes(e.employee_id as "empid")
    15                              , xmlforest(
    16                                  e.first_name as "FirstName"
    17                                , e.last_name as "LastName"
    18                                )
    19                              )
    20                            )
    21                     from hr.employees e
    22                     where e.department_id = d.department_id
    23                   )
    24                 )
    25               )
    26             )
    27           )
    28           indent
    29         )
    30  from hr.departments d
    31       join hr.locations l on l.location_id = d.location_id
    32  where d.department_id in (10,20) ;
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    <Departments>
      <Dept Deptno="10">
        <Name>Administration</Name>
        <Location>Seattle</Location>
        <Employees>
          <Emp empid="200">
            <FirstName>Jennifer</FirstName>
            <LastName>Whalen</LastName>
          </Emp>
        </Employees>
      </Dept>
      <Dept Deptno="20">
        <Name>Marketing</Name>
        <Location>Toronto</Location>
        <Employees>
          <Emp empid="201">
            <FirstName>Michael</FirstName>
            <LastName>Hartstein</LastName>
          </Emp>
          <Emp empid="202">
            <FirstName>Pat</FirstName>
            <LastName>Fay</LastName>
          </Emp>
        </Employees>
      </Dept>
    </Departments>

  • Strange problem with SQL query in toad.

    Guys,
    My colleague is up with a strange problem with an SQL query that if it is run in toad encounters the "ORA-03113: end-of-file on communication channel" problem,but if run in SQL plus executes just fine.
    Do anyone have thoughts about this strange error in toad?
    Thanks!!!!
    Regards,
    Bhagat

    Not sure what version of TOAD you have but it may have shipped with SQLMonitor which montiors SQL sent from Windows apps . Navigation should be similar to;
    Start~Programs~Quest Software~TOAD for Oracle~Tools~SQLMonitor
    or
    C:\Program Files\Quest Software\Toad for Oracle\SQLMonitor.exe
    To use it, start TOAD and connect, start SQLMonitor and click the checkbox for TOAD.exe, then execute the query. SQLMonitor will show you the actual query that TOAD sent to the client. It may be exactly what you sent or it may contain some extras.

  • Strange behavior with NI 9401

    Hi everyone!
    I think I have a strange problem with the NI 9401 modules.
    My hardware is a CompactRIO and I'm using Labview 8.0.
    I'm reading a 13 bit encoder with two NI 9401 modules: the first for 8 input channels and the second for the other remaining 5. input channels.
    13 bits means that the slots in the outest part of the counter are 8192 so i expect my encoder to count up/down till 8192. What instead happens is that the counter goes up to 7934, then suddenly to 7860, then from 0 to 254 and then finally to 0 again and up again to 7934 and the story always goes on like this. I put the true/false outputs of the encoder in a boolean array and then, from the boolean array to a number. (see the attacched VI)
    Here's how I devided the inputs between the two modules
    -NI 9401 2 :
    DIO0= 2^0
    DIO1= 2^1
    DIO2= 2^2
    DIO3= 2^3
    DIO4= 2^4
    DIO5= 2^5
    DIO6= 2^6
    DIO7= 2^7
    - NI 9401
    DIO0= 2^8
    DIO1= 2^9
    DIO2= 2^10
    DIO3= 2^11
    DIO4= 2^12
    When running the VI I suddenly realized that every time all the input for each modules should be true ( i.e. five leds on for the second module or eight leds on for the first) , the value of all the inputs goes immediately to 0 i.e. all the leds switch off . To make an example: I see 4 leds on for the second module but when comes the time of the fifth, all the leds switch off so it means all the inputs are false which i can't understand. I tried to change the pin assignments in order to read the same inputs from different pins and this did'nt change anything. I tried to use only 4 inputs for the second module and this didn't work. Every time all the inputs for each module should be true it goes up to (n-1) inputs true and the n inputs zero. More information about this strange behaviour: while a normal false input produces a voltage of 0.036 V the voltage I measured from the last pin that should be true and that should give me all the leds on for one module, produces instead -0.146 V.
    This is everything I tried in order to solve this problem but now I'm at a dead end.
    Could it be a kind of module setting which I didn't consider?
    Due to all the attempts I've made I excluded any disfunction of the encoder so I focused my attention to the modules.
    Does anyone of you have any idea?
    Thanks!!
    Rob_F
    Attachments:
    Prova_encoder2.lvproj ‏14 KB
    Prova_encoder2.vi ‏155 KB

    Thanks a lot JMota!
    We just sent back the encoder to the company who sells them. They want to be sure it's not a product defect or, even worse, a problem of conflict with the NI 9401.
    In the meanwhile we built up the acquisition VI for the accelerometer and the encoder. One while loop sends the accelerometer data to a DMA FIFO and another parallel while loop is used to read the encoder outputs and send these data to another DMA FIFO. I did this because I know only 1 DMA FIFO can be used for each channel. When I read the data with two FIFO.read with two parallel loops in the Real-Time I discovered that I can't make them work indipendently as i thought i.e. reading settings of one FIFO.read ( number of elements and loop timing) affects also the other FIFO.read . 
    Any explanation for this behavior?
    Thanks again JMota!

  • Strange behavior with Firefox

    Hi Team,
    I am using HTMLDB V2.0 and Firefox V1.5.0.1. I used wizard to create a report/form application. However, when I press a button to update the form all the buttons line up in a vertical row and I then have to press the same button again.
    My application is 30412 at htmldb.oracle.com. The problem is occurring at page 4. Go to page 3 (2nd tab) and select any record. You will be directed to page 4. Then when you press any button (cancel, create, delete, apply changes) on page 4, page 4 is refreshed and the buttons strangely line up in a vertical column. I then have to press the same button again before the update occurs.
    I have the same report/form setup on pages 1 and 2 and it is working fine on those pages.
    This strange behavior is not occurring in IE. I also notice that the font size is bigger in IE .
    I would appreciate any help you might offer.
    I really enjoy working with HTMLDB.
    Thanks, Andy

    Sorry about that. I removed all the authorization schemes from the application. I also changed the authentication scheme to HTMLDB. Let me know if I need to do something more for you to get access.
    Thanks for looking at it.
    I think it may have something to do with the "button, alternative 3" template from theme 3 that I am using. When I switch to the "button" template from theme 3 then the strange behavior goes away in Firefox.
    Andy

  • Strange behavior with obssocookie on different browser

    Hi,
    I am trying to integrate OAM with our application deployed on WLS. I have set up an IIS proxy server and installed a web gate on it. I have seen a couple of strange behavior
    1) If I try to access some static image file, SSO keeps asking for authentication. It happens for both firefox and IE, but it doesn't happen for chrome though. Looks like for image file request, the obssocookie is not passed correctly. Anyone sees that before?
    2) If I use firefox on the machine where WLS app server is installed to connect to proxy server, if I use hostname in the URL, I don't see the obssocookie. If I use IP address in the URL, I can see obssocookie. If I use IE or any browser from any other machine, obssocookie is always available
    thanks.
    -Wei

    I found it in the document
    B.1 How Logout Works
    The WebGate logs a user out when it receives a URL containing "logout." (including the "."), with the exceptions of logout.gif and logout.jpg, for example, logout.html or logout.pl. When the WebGate receives a URL with this string, the value of the ObSSOCookie is set to "logout."
    The Access System sets an obSSOCookie for each user or application that accesses a resource protected by a WebGate. The obSSOCookie enables users to access resources that are protected by the Access System that have the same or a lower authentication level. Removing the ObSSOcookie causes the WebGate to log the user out and requires the user to re-authenticate the next time he or she requests a resource that is protected by the Access System.
    Well, I havn't got that far in the document:)
    Thanks a lot for your help.
    -Wei

Maybe you are looking for

  • Lumia 800 refuses to operate in Landscape

    Hi, Happy with my Lumia 800 coming from a Dell Venue Pro. Strange behaviour that I cannot correct myself (done a reset  twice). My screen refuse to rotate into landscape. Any ideas are welcome.

  • Purchase Order 'Fast Change' functionality

    Hi Experts, The standard fast change function in PO does not accomodate fields used for intercompany transfers like Route etc. Some threads discussed this but defers to Tcode MASS which also does not include this field. MASS is not very recommended f

  • Can I create and manage collections in itunes instead of on the ipad?

    Can I create and manage collections in itunes instead of on the ipad? I have hundreds (maybe thousands) of PDF files for technical work items that I need to categorize and use on my ipad but it is a bit cumbersome to manually move them one at a time

  • Flash Remoting in Windows CE

    Just wondering if Flash remoting runs on a Windows CE device. The device I'm looking into is a touchscreen running on Windows CE 5 Pro. Assuming it has enough processing power, will it be possible to run swfs published for the Flash 7 player, and hav

  • I need big attention and a big HELP!

    ..i have a nokia 6600 mobile..i have a problem with my mobile phone,when i start sending messages to my friends its ok but when they already reply to me i usually found an error on my outbox,the error is it is trying to reply that person with a multi