Display a schematic view with icons (jpg, gif, etc).

I'm trying to display a schematic view and use icons to represent the difference objects in this schematic view.
For example: to show a 3 phones conference call. The description will be the phone number (or person's name) and the icon will be the person's face or company logo.
I have tried to use JLabel, and JButton but then I have to use a Layout. Without a layout the are one-on-top of another.
I tried to use setLocation and it doesn't look to have any effect on the location of JLabel or JButton.
The following is my code:
import java.awt.Container;
import java.awt.Insets;
import java.awt.Point;
import java.awt.Dimension;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
* ShowIcons.java is a 1.4 application that requires no other files.
* @author Benny Regev
* @version 1.0.00.0000
public class ShowIcons {
    public static void addComponentsToPane(Container pane) {
        ImageIcon iconHE, iconCPE, iconNode, iconDemo;
        Point point1, point2, point3;
        pane.setLayout(null);
        iconHE = createImageIcon(NODE_HE_ICON);
        iconNode = createImageIcon(NODE_ICON);
        iconCPE = createImageIcon(NODE_CPE_ICON);
        iconDemo = createImageIcon(NODE_CPE_ICON);
        JButton b1 = new JButton(HE_TEXT, iconHE);
        JButton b2 = new JButton(NODE_TEXT, iconNode);
        JButton b3 = new JButton(CPE_TEXT, iconCPE);
        point1 = new Point(0, 500);
        point2 = new Point(500, 0);
        point3 = new Point(500, 500);
        b1.setLocation( point1 );
        b2.setLocation( point2 );
        b3.setLocation( point3 );
        pane.add(b3);
        pane.add(b2);
        pane.add(b1);
//        pane.add(iconDemo);
        Insets insets = pane.getInsets();
        Dimension size = b1.getPreferredSize();
        b1.setBounds(25 + insets.left, 5 + insets.top,
                     size.width, size.height);
        size = b2.getPreferredSize();
        b2.setBounds(55 + insets.left, 40 + insets.top,
                     size.width, size.height);
        size = b3.getPreferredSize();
        b3.setBounds(150 + insets.left, 15 + insets.top,
                     size.width + 50, size.height + 20);
    /** Returns an ImageIcon, or null if the path was invalid. */
    protected static ImageIcon createImageIcon(String path) {
        java.net.URL imageURL = ShowIcons.class.getResource(path);
        if (imageURL == null) {
            System.err.println("Resource not found: "
                               + path);
            return null;
        } else {
            return new ImageIcon(imageURL);
    }   //  End of Method protected static ImageIcon createImageIcon(String)
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event-dispatching thread.
    private static void createAndShowGUI() {
        //Make sure we have nice window decorations.
        JFrame.setDefaultLookAndFeelDecorated(true);
        //Create and set up the window.
        JFrame frame = new JFrame("AbsoluteLayoutDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Set up the content pane.
        addComponentsToPane(frame.getContentPane());
        //Size and display the window.
        Insets insets = frame.getInsets();
        frame.setSize(300 + insets.left + insets.right,
                      125 + insets.top + insets.bottom);
        frame.setVisible(true);
    public static void main(String[] args) {
        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
    public static final String NODE_HE_ICON = "images/shop_icon_esd_110.gif";
    public static final String NODE_CPE_ICON = "images/Default_feature1.gif";
    public static final String NODE_ICON = "images/icondesktop.gif";
    public static final String HE_TEXT = "Headent";
    public static final String CPE_TEXT = "CPE";
    public static final String NODE_TEXT = "10.0.0.10";
}Anyone has an idea??

Hi,
This might help
http://www.techonthenet.com/oracle/errors/ora01446.php
Regards,
Jari

Similar Messages

  • How to display the selection screen with icons as well as with text element

    How to display the selection screen with icons as well as with texts (written in text elements) for PlantDate, OrderType,WareHouse..

    Report zex33.
    type-pools: icon.
    selection-screen begin of line.
    selection-screen comment 1(20) text_001.
    parameters: p_werks type marc-werks.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text_002.
    parameters: p_whouse(10).
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(20) text_003.
    parameters: p_auart like vbak-auart.
    selection-screen end of line.
    initialization.
      write ICON_PLANT  as icon to text_001.
    concatenate text_001 text-001 into text_001 separated by space.
      write ICON_WAREHOUSE  as icon to text_002.
    concatenate text_002 text-002 into text_002 separated by space.
      write ICON_ORDER  as icon to text_003.
    concatenate text_003 text-003 into text_003 separated by space.

  • When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    When i save any image from any website then there is no option showing in the save as box like saves as .jpg etc. In this case I manually add the extension of image for example .jpg .gif etc. Please solve my problem :(

    I'm guessing your problem is caused by code validation errors: orphaned division tags for example, or mismatched code and document type (i.e.  XHTML /> mixed with HTML > style closures).
    Start by using the code validation tools below and fix any reported.  You'll need an Internet connection for this:
    HTML Validator - http://validator.w3.org 
    CSS Validator - http://jigsaw.w3.org/css-validator/  
    HTML & CSS Tutorials - http://w3schools.com/
    If this doesn't solve the problem, you will need to post a URL to your live page so we can see your code and images working together.   Or at the very least copy and paste your HTML and CSS code into a reply using double arrows >> Syntax Highlighting > Plain.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.

    Dears,
    i have this problem after i create tabular from depend on view
    ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc.
    this a query that i use
    select
    "INVOICE_DET",
    "INVOICE_DET" INVOICE_DET_DISPLAY,
    "INVOICE_ID",
    "STORAGE_CODE",
    "ITEM_QNTY",
    "ITEM_PRICE",
    "BONS_QNTY",
    "DISC_VALUE",
    "TOT_VAL",
    "LOCATION_CODE",
    "BATCH_DET",
    "ITEM_CODE",
    "ITEM_NAME",
    "UOM_CODE",
    "UOM_NAME",
    "SIZE_CODE",
    "SIZE_NAME",
    "COLOR_CODE",
    "COLOR_NAME",
    "STOREG_BRCHAS_BATCHN",
    "EXPR_DATE",
    "PROD_DATE",
    "ITEM_DET_ID"
    from "#OWNER#"."BRCHAS_INVOICE_DET_VIEW"
    this the view i created
      CREATE OR REPLACE FORCE VIEW "RETAIL"."BRCHAS_INVOICE_DET_VIEW" ("INVOICE_DET", "INVOICE_ID", "STORAGE_CODE", "ITEM_QNTY", "ITEM_PRICE", "BONS_QNTY", "DISC_VALUE", "TOT_VAL", "LOCATION_CODE", "BATCH_DET", "ITEM_CODE", "ITEM_NAME", "UOM_CODE", "UOM_NAME", "SIZE_CODE", "SIZE_NAME", "COLOR_CODE", "COLOR_NAME", "STOREG_BRCHAS_BATCHN", "EXPR_DATE", "PROD_DATE", "ITEM_DET_ID") AS
      SELECT invoice_det, invoice_id, storage_code, item_qnty, item_price,
              bons_qnty, disc_value, tot_val, location_code, batch_det, item_code,
              item_name, uom_code, uom_name, size_code, size_name, color_code,
              color_name, storeg_brchas_batchn, expr_date, prod_date, item_det_id
         FROM (SELECT d.invoice_det, d.invoice_id, d.storage_code, d.item_qnty,
                      d.item_price, d.bons_qnty, d.disc_value, d.tot_val,
                      d.location_code, d.batch_det, i.item_code,
                      get_item_name (i.item_code) item_name, i.uom_code,
                      get_uom_desc (i.uom_code) uom_name, i.size_code,
                      get_size_name (i.size_code) size_name, i.color_code,
                      get_color_name (i.color_code) color_name,
                      dd.storeg_brchas_batchn, b.expr_date, b.prod_date,
                      i.item_det_id
                 FROM brchas_invoice_det d,
                      brchas_batch dd,
                      brchas_batch_det b,
                      item_uom_size_color i
                WHERE dd.storeg_brchas_batchinternn = b.storeg_brchas_batchinternn
                  AND d.batch_det = b.batch_det
                  AND b.item_det_id = i.item_det_id
                  AND d.batch_det IS NOT NULL
               UNION ALL
               SELECT d.invoice_det, d.invoice_id, d.storage_code, d.item_qnty,
                      d.item_price, d.bons_qnty, d.disc_value, d.tot_val,
                      d.location_code, d.batch_det, i.item_code,
                      get_item_name (i.item_code) item_name, i.uom_code,
                      get_uom_desc (i.uom_code) uom_name, i.size_code,
                      get_size_name (i.size_code) size_name, i.color_code,
                      get_color_name (i.color_code) color_name,
                      NULL storeg_brchas_batchn, NULL expr_date, NULL prod_date,
                      i.item_det_id
                 FROM brchas_invoice_det d, item_uom_size_color i
                WHERE d.item_det_id = i.item_det_id
                AND d.batch_det IS NULL) ;
      CREATE OR REPLACE TRIGGER "RETAIL"."BRCHAS_INVOICE_DET_VIEW_TRG"
    INSTEAD OF DELETE OR INSERT OR UPDATE
    ON RETAIL.BRCHAS_INVOICE_DET_VIEW
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_PRICE NUMBER;
    V_BONUS_QNTY NUMBER;
    V_DISC_VAL NUMBER;
    BEGIN
      IF INSERTING THEN
          INSERT INTO BRCHAS_INVOICE_DET
          (INVOICE_DET,
          INVOICE_ID ,
          STORAGE_CODE,
          ITEM_QNTY,
          ITEM_PRICE,
          BATCH_DET,
          BONS_QNTY,
          TOT_VAL,
          LOCATION_CODE,
          DISC_VALUE,
          CREATED_USER,
          CREATED_DATE,
          ITEM_DET_ID
          VALUES
          ("BRCHAS_INVOICE_DET_SEQ".nextval,
          :NEW.INVOICE_ID ,
          :NEW.STORAGE_CODE,
          :NEW.ITEM_QNTY,
          :NEW.ITEM_PRICE,
          :NEW.BATCH_DET,
          :NEW.BONS_QNTY,
          (:NEW.ITEM_QNTY * NVL(:NEW.ITEM_PRICE,0)) - NVL(:NEW.DISC_VALUE,0),
          :NEW.LOCATION_CODE,
          :NEW.DISC_VALUE,
          nvl(v('APP_USER'),user),
          sysdate,
          :NEW.ITEM_DET_ID);
      ELSIF UPDATING THEN
            UPDATE BRCHAS_INVOICE_DET
            SET INVOICE_ID    =:NEW.INVOICE_ID,
                STORAGE_CODE  =:NEW.STORAGE_CODE,
                ITEM_QNTY     =:NEW.ITEM_QNTY,
                ITEM_PRICE    = :NEW.ITEM_PRICE,
                BATCH_DET     =:NEW.BATCH_DET,
                BONS_QNTY     = :NEW.BONS_QNTY,
                TOT_VAL       =(:NEW.ITEM_QNTY * NVL(:NEW.ITEM_PRICE,0)) - NVL(:NEW.DISC_VALUE,0),
                LOCATION_CODE =:NEW.LOCATION_CODE,
                DISC_VALUE    = :NEW.DISC_VALUE,
                ITEM_DET_ID =:NEW.ITEM_DET_ID
            WHERE INVOICE_DET =:NEW.INVOICE_DET;
      ELSE
            DELETE FROM BRCHAS_INVOICE_DET
             WHERE INVOICE_DET =:OLD.INVOICE_DET;
      END IF;
       EXCEPTION
         WHEN OTHERS THEN
           -- Consider logging the error and then re-raise
           RAISE;
    END BRCHAS_INVOICE_DET_VIEW_TRG;
    ALTER TRIGGER "RETAIL"."BRCHAS_INVOICE_DET_VIEW_TRG" ENABLE;
    please i need help
    Thanks
    Ahmed

    Hi,
    This might help
    http://www.techonthenet.com/oracle/errors/ora01446.php
    Regards,
    Jari

  • Displaying JList holding JLabel with icons of different height screwed up

    I started to create a unix 'make' wrapper, which filters for the binaries being created and display their names and potentially some icon for those in a JList.
    But sometimes the display of the icons is screwed up. It's cut to the size of a pure text (JLabel) line in the JList.
    Below you can find test program.
    You need to put two different sized picture files binary1.jpg and binary2.jpg in the run directory of the java build (i use eclipse)
    and create some test input file like this:
    > cat input
    binary1
    binary2
    binary3
    binary4
    binary5
    binary6
    binary7
    binary8
    binary9
    Set TEST_DIR environment variable to the build run directory.
    Finally start the java class like this:
    > bash -c 'while read line; do echo $line; sleep 1; done' < input| (cd $TEST_DIR; java -classpath $TEST_DIR myTest.MyTest)
    Then you should see the issue.
    ( Don't mind about the JAVA code in general - i know, that there are quite some other issues to fix :-) )
    - many thanks!
    best regards,
    Frank
    ================================================
    package myTest;
    import java.io.*;
    import java.util.HashMap;
    import java.util.Map;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.Dimension;
    import javax.imageio.ImageIO;
    import javax.swing.DefaultListModel;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.ListCellRenderer;
    public class MyTest {
        static class MyCellRenderer extends JLabel implements
                ListCellRenderer<Object> {
            private static final long serialVersionUID = 577071018465376381L;
            public MyCellRenderer() {
                setOpaque(true);
            public Component getListCellRendererComponent(JList<?> list,
                    Object value, int index, boolean isSelected,
                    boolean cellHasFocus) {
                if (value.getClass().equals(JLabel.class)) {
                    JLabel label = JLabel.class.cast(value);
                    setText(label.getText());
                    setIcon(label.getIcon());
                    setBackground(label.getBackground());
                    setForeground(label.getForeground());
                } else {
                    setText(value.toString());
                    setBackground(Color.WHITE);
                    setForeground(Color.BLACK);
                return this;
        static final Map<String, String> fileToPicture = new HashMap<String, String>() {
            private static final long serialVersionUID = 1L;
                put("binary1", "binary1.jpg");
                put("binary2", "binary2.jpg");
        static boolean endProcess;
        static boolean guiStarted;
        static DefaultListModel<Object> listModel;
        static JList<Object> list;
        static public void startGui() {
            JFrame frame = new JFrame("Building...");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setLayout(new BorderLayout());
            listModel = new DefaultListModel<Object>();
            list = new JList<Object>(listModel);
            list.setCellRenderer(new MyCellRenderer());
            list.setLayoutOrientation(JList.VERTICAL);
            list.setFixedCellHeight(-1);
            JScrollPane scrollPane = new JScrollPane(list);
            scrollPane.setPreferredSize(new Dimension(300, 500));
            frame.getContentPane().add(scrollPane, BorderLayout.NORTH);
            JButton ok = new JButton("CLOSE");
            ok.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    endProcess = true;
            frame.getContentPane().add(ok, BorderLayout.SOUTH);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
            guiStarted = true;
        static private void addElem(String string, Color color) {
            String fileName = fileToPicture.get(string);
            ImageIcon icon = null;
            if (null != fileName) {
                File file = new File(new File(".").getAbsolutePath() + "/"
                        + fileName);
                try {
                    icon = new ImageIcon(ImageIO.read(file));
                } catch (IOException e) {
                    System.err
                            .println("Exception: IOException for trying to read file '"
                                    + file + "'");
                    e.printStackTrace();
            JLabel label = new JLabel(string);
            Color darker = color.darker();
            label.setForeground(darker);
            label.setBackground(Color.WHITE);
            label.setIcon(icon);
            listModel.addElement(label);
            list.ensureIndexIsVisible(list.getModel().getSize() - 1);
        public static void main(String[] args) {
            endProcess = false;
            guiStarted = false;
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    startGui();
            while (!guiStarted) {
                try {
                    Thread.sleep(200);
                } catch (InterruptedException e) {
                    e.printStackTrace();
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String line = null;
            try {
                while (!endProcess) {
                    line = br.readLine();
                    if (line == null) {
                        break;
                    addElem(line, Color.BLACK);
                    System.out.println(line);
            } catch (IOException e) {
                e.printStackTrace();
            if (!endProcess) {
                addElem("...DONE", Color.RED);
                while (!endProcess) {
                    try {
                        Thread.sleep(200);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
            System.exit(0);

    I found out, that the issue is caused by trying to use auto-scrolling via line #100:
    list.ensureIndexIsVisible(list.getModel().getSize() - 1);
    this helped to solve it:
    java - ensureIndexIsVisible(int) is not working - Stack Overflow
    The result is:
    if (autoScroll.isSelected()) {
      SwingUtilities.invokeLater(new Runnable() {
         public void run() {
             list.ensureIndexIsVisible(list.getModel().getSize() - 1);
    rgds,
    Frank

  • File associations within ITS / WAS ... jpg, gif, etc.

    Hello ... I'm finding is that when you click on a jpg attachment in the portal, it does NOT use the local windows file associations to determine what program to open the file with.  However, once you select a program to open the file, the portal will continue to use that program, regardless of what the Windows defaults are.  In this case I'm using a SAP GUI for HTML transaction Iview (QA33) in NW 2007s SP12 and IE 6.0.  Although this is SAP GUI for HTML, it does fire off a Java applet when I display attachments (using classes Download.class and Execute.class among others).  Where is this file association information stored?  In the portal?  Browser?  JVM?  Java stack?  I know it is a client specific setting somewhere because different programs launch on different workstations.  I'd like to be able to modify and/or set defaults for this association ... any help greatly appreciated!!

    Hello Timothy,
    I think you may be referring to the ITS download and file type association.  Please see note 1058218 for more information about this and the execookie.txt file.  Thanks.
    Edgar

  • EXPORT chart (graph) to JPG, GIF .etc

    Hello.
    I have a problem with this. I want to export chart into SMARTFORM, but must have JPG or GIF picture. the question is - how export chart, graph to picture format?
    Tkanks very much.

    hi daniel,
                 you can export picture in smartforms but it must be in bitmap format so u must change the format and then in your samartform creare new node or do right click create->graphic and give the name of that graphic and object 'GRAPHICS and ID is BMAP, for exporting the grachic use the transaction se78. if it is use full for u then plz give reward points.
    Thanks
    Anirudh Saini

  • ORA-01446: cannot select ROWID from view with DISTINCT, GROUP BY, etc.

    Hi,
    I have created view by joining two tables...And it is like this...
    Create view Test_Data as
    Select t.column1, t.column2, t.rowid from table1 t
    union s.column1,s.column2, s.rowid from table2 s
    with read only...
    Now I executed the following stmt...
    Select * from Test_Data where rowid = objid_ where I am passing the objid_ value...But it gave me the above error...can not I run this select stmt using the rowid ?
    Any input is highly appreciated...
    Thanks And Best Regards,
    /Dinesh...
    Hi All Again,
    I created the view in the following way...Just to check...
    CREATE VIEW my_view AS
    SELECT t.col1 col1,
    t.col2 col2,
    t.rowid objid
    FROM table1 t
    WHERE rownum < 400
    UNION
    SELECT q.col1 col1,
    q.col2 col2,
    q.rowid objid
    FROM table2 q
    WITH read only;
    Then I executed the following stmt...
    Select * from my_view where rowid = objid_
    Then I did not get that Oracle Error ORA-01446, Does anybody have any clue regarding this matter, i.e. how the use of rownum solve this prob...
    Thanks And Best Regards,
    /Dinesh...
    Edited by: user521478 on Aug 9, 2010 4:46 PM

    Check this:
    SQL> create view my_view as select rowid rd from dual;
    View created.
    SQL> select * from my_view;
    RD
    AAAACsAABAAAAGiAAA
    SQL> select * from my_view where rd = 'AAAACsAABAAAAGiAAA';
    RD
    AAAACsAABAAAAGiAAA
    SQL> So your create view statement should be:
    Create view Test_Data as
    Select t.column1, t.column2, t.rowid rd from table1 t
    union s.column1,s.column2, s.rowid from table2 s
    with read onlyThen try:
    Select * from Test_Data where rd = objid;Edited by: AP on Jul 28, 2010 2:19 AM

  • ApEx 4.1.1: update record in a view with 'instead of update' trigger

    I created a form against a view. The view is complex enough which prevents direct updates. To incorporate the update logic I created an 'instead of update' trigger on the view. When I open up the form, do changes, and click 'Apply Changes' button I am getting the following exception
    ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    I understand that the standard 'Automatic Row Processing' process is trying to lock the record before updating using a cursor like
    select *
    from my_view
    for update
    and fails. Is it possible to bypass this locking while using the standard APEX processes?
    I think I can create a custom PL/SQL process which would execute the UPDATE statement (at least, it works in SQL*Plus), but I would like to know if I can use a standard ApEx functionality for this.

    Hello,
    Sorry for delay.
    I had found a feedback about trigger issue when restore SQL Database from a BACPAC file. Microsoft said the fixed  will be available in the next major release of DacFx.
    Feedback:
    SQL Azure fires a trigger when restoring from bacpac
    You can refer to the workarounds in the feedback. For example, if there is small amount of triggers on the database, you can try to remove the triggers and then recreate when restore from bacpac file.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • ADF BC: Creating updatable VO based upon DB View with "instead of" trigger

    Hello all,
    I have got an interesting issue. I have an Oracle DB view that is used to hide some complexity in the underlying DB design (it does some unions). This view is updatable because we have created an "instead of" update trigger to update the correct table when a row is updated. This is working fine in SQL.
    Next, we have created an ADF Entity object based upon the view, specifying an appropriate PK for the DB View. Then, we have created an updatable VO based upon the EO. All well and good so far. The issue we have is in trying to commit changes to the DB - because the ADF BC framework is trying to lock the row to update (using SELECT ... FOR UPDATE), it's not working because of ORA-02014 - cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    This leads me to thinking about overridding doSelect() on the EO as hinted here http://radio.weblogs.com/0118231/stories/2005/07/28/differenceBetweenViewObjectSelectAndEntityDoselectMethod.html
    As a temporary test, we have over-ridden the EO's doSelect to call super.doSelect(false) and it does work, although we will have lost update issues as detailed in Steve's article.
    My questions:
    1). Is overriding doSelect() the correct thing here? Perhaps there is a better way of handling this problem? I do have a base EO class from which all of the EO's extend, so adding this behavior should be straightforward.
    2). Does anyone have example doSelect implementation? I am thinking of overriding doSelect for my EO and calling super.doSelect (lock=false), but then I need to deal with some possible exceptions, no?
    Kind regards,
    John

    Hi John,
    I have exactly the same issue as you experienced back in January. I have a complex data modelling requirement which requires the need to pivot rows into columns using ROW_NUMBER() and PARTITION clauses. To hide the complexity from the middle tier, I have created a database view and appropriate INSTEAD OF triggers and mapped my EO to the view. I have overriden the lock() method on the EO implementation class (to avoid ORA-02014) and would like to try the same solution you used with the pl/sql call to lock the record.
    My question is, how did you manage the release of the lock if the transaction was not rolled back or committed by your application i.e. if the user closed the browser for instance.
    In my naivity, I would like to think that the BC4J framework would release any locks for the database session when it found the servlet session to be terminated however my concern is that the lock would persist and cause complications.
    Any assistance greatly appreciated (if you would be willing to supply your lock() method and pl/sql procedure logic I would be even more grateful!).
    Many thanks,
    Dave
    London

  • Oracle doc inconsistent on materialize view with union all and self joins

    First of all, I can't seem to create a materialized view containing self-joins AND union all. Is it possible?
    I checked Oracle 9i (my version: PL/SQL Release 9.2.0.4.0 - Production) documentation and I get different answers (or so it seems to me).
    First I saw this: "The COMPATIBILITY parameter must be set to 9.0 if the materialized aggregate view has inline views, outer joins, self joins or grouping sets and FAST REFRESH is specified during creation..."
    Did you see the part about 'self joins' in there? I did and I was pumped because that seems to say that you CAN have 'self joins' (and my compatibility is 9.2...)
    BUT
    In the very same document I also found "Oracle does not allow self-joins in materialized join views." (rage)
    You can see the document I am speaking of here: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/mv.htm#574889
    Whenever I try to create the mview I get the following error. (
    In any caseORA-01446 cannot select ROWID from view with DISTINCT, GROUP BY, etc.

    First of all, I can't seem to create a materialized view containing self-joins AND union all. Is it possible?
    I checked Oracle 9i (my version: PL/SQL Release 9.2.0.4.0 - Production) documentation and I get different answers (or so it seems to me).
    First I saw this: "The COMPATIBILITY parameter must be set to 9.0 if the materialized aggregate view has inline views, outer joins, self joins or grouping sets and FAST REFRESH is specified during creation..."
    Did you see the part about 'self joins' in there? I did and I was pumped because that seems to say that you CAN have 'self joins' (and my compatibility is 9.2...)
    BUT
    In the very same document I also found "Oracle does not allow self-joins in materialized join views." (rage)
    You can see the document I am speaking of here: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96520/mv.htm#574889
    Whenever I try to create the mview I get the following error. (
    In any caseORA-01446 cannot select ROWID from view with DISTINCT, GROUP BY, etc.

  • Updatable View issues:  cannot select FOR UPDATE from view with DI

    Hi All,
    I have a simple view XY and an instead of trigger on that to insert data into one table which is used in the my view. When I do insert statement on view XY it is working fine from sql but when i used same thing with page process of " Process Row of XY Automatic Row Processing (DML) " i am getting following error. I am using APEX 3.0 . Please help me.
    ORA-20001: Error in DML: p_rowid=xxxx, p_alt_rowid=abc, p_rowid2=, p_alt_rowid2=. ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    Thanks

    James,
    are you already on 3.0.1.00.07 or 3.0.1.00.08? Have a look at the release notes, it says something about a bug fix for some occurrences of ORA-02014.
    Also have a look at the new substitution value/item FSP_DML_LOCK_ROW which turns locking off if you set it to FALSE. See http://www.oracle.com/technology/products/database/application_express/html/3.0.1_readme.html#CHDIDIAF and also http://download-west.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/advnc.htm#BCGFDAIJ
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://apexplugin.sourceforge.net/ New!

  • [Solved] How to update records in entity based on view with distinct

    Hi
    - I have a relational view of the form:
    SELECT DISTINCT
    FROM TAB1, TAB2, ...- I created instead of triggers for delete, update and insert.
    - I created an entity object on this and an updatable view object
    - I added this to my module.
    - Then I test the view object in the module (module > test), and if I try to update an existing record, I receive the error:
    (java.sql.SQLException) ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    So, ADF internally create as select FOR UPDATE cursor to update the modified record and as the error shows, this is not possible on a view with distinct, ...
    Is there a way to work around this error without to rewrite the view?
    I was thinking that there is maybe a way to force ADF not to use the select FOR UPDATE and use UPDATE .. SET <value> WHERE <pk>, or maybe to create a new instead of trigger to catch the select FOR UPDATE?

    Arti,
    Here's another solution (that will still use locking, and can help avoid the "lost update" problem):
    http://stegemanoracle.blogspot.com/2006/03/using-updatable-views-with-adf.html
    John

  • Help with circumvention of ORA-01472: cannot use connect by on view with ..

    Hi,
    Any help resolving the following would be v. helpful.
    The Aim
    Produce a hierarchical report of all users and the privileges they have via the various roles they are granted.
    The SQL
    select lpad(' ', level*2,' ')|| granted_role from (select grantee, granted_role
    from dba_role_privs
    union
    select role, granted_role
    from role_role_privs
    union
    select role, privilege
    from role_sys_privs
    union
    select 'All users', username
    from dba_users)
    start with grantee='All users'
    connect by prior granted_role = grantee;
    The error
    ORA-0147: cannot use connect by on view with DISTINCT, GROUP BY, etc.
    The database
    Oracle 8.1.7.4 (Yes I know ....)
    The Solution
    [Thanks in advance]

    What if you create a table first
    create table role_grants as
        select granted_role, grantee
           from (select grantee, granted_role
                   from dba_role_privs
                 union
                 select role, granted_role
                   from role_role_privs
                 union
                 select role, privilege
                   from role_sys_privs
                 union
                 select 'All users', username
                  from dba_users)
    Then run the hierarchical report
    select lpad(' ', level*2,' ')|| granted_role
       from role_grants
       start with grantee='All users'
       connect by prior granted_role = grantee

  • Tree view display along with icons

    Hi all
           Anybody please give me the complete code to display the tree view which takes input from selection screen.I also need to display icons in the tree view.please help its urgent.
    Thank you.
    Regards
    Giri

    Hi giri ,
      Chk this program SAPSIMPLE_TREE_CONTROL_DEMO
      Displaying icon in tree view

Maybe you are looking for

  • Reports for Mexico Taxes - VAT

    SAP Gurus, Can you please provide some information, on the standard reports available in SAP for Mexico Taxes (VAT & Withholding). I have found only this report in our system. RFVATRTNMX - VAT Return (Mexico) Thanks.

  • I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App?

    I am getting ready to sell a Mac app and I want to know what the specs are to create a custom background for my Mac App? Here is a good example of what I am talking about: https://docs.google.com/file/d/0B28kNqQ8gmifRjRHam9wVnlrWG8/edit?usp=sharing

  • Did I just get swindled?

    I just bought CS6 Production Premium off ebay for around $1,000 and it came in a plastic dvd case with comparatively low quality printing. On the back, among other things, it said "This is a complimentary professional installation media kit and there

  • Missing Parts List History (CO24)

    Hello, is there a possibility within ERP 6.0 to see a history for missing parts in co-orders like in CO24. I want to create a TopN report for the missing parts of the past. CO24 seems to be only relevant for the current parts that are missing. Thanks

  • IMac G5 Shutting off by itself

    My imac G5 second generation is all of a sudden shutting off by itself in the middle of me working on things. The unit is not overheating or making loud fan noises when it does this? What should I do? Jason