Wait for the entry?

Hi all

I need to create a custom entry dialog box and the problem I encountered is that I can't figure out how to make my request to wait for the user to complete the entries in the framework. When you use a JDialog or JOptionPane application will stop running and wait for the dialog box to close. My question is how to do something similar without using a JOptionPane or JDialog. I just can't figure out how to get the same effect by using a JFrame or other component. I know I could just use a JDialog or JOptionPane to get input from the user, but I'm just curious to know how I can stop running and wait for the entry as the JOptionPane allows you to do, but without using a JOptionPane or JDialog.

Thank you for your help :)
Nathan D.

-----
: Edit:
I forgot to mention that the reason main I avoids JDialogs is I need the entry dialog box to be internal not external application I use mode exclusive fullscreen. And a JOptionPane does not allow me to add the other components too it such as JLabels and other GUI. I just need a way to get input from a component or internal window and wait for the entry as a JOptionPane or JDialog.
-----

A NBS are:

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;



public class Main extends JFrame implements ActionListener {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new Main();
    }


    JButton go = new JButton("Show custom input dialog");

    public Main() {
        setSize(300,150);
        setLocationRelativeTo(null);
        setLayout(new FlowLayout());
        go.addActionListener(this);
        add(go);
        setVisible(true);
    }

    public void actionPerformed(ActionEvent e) {
        InputDialog d = new InputDialog();

        /*
         * Here is the problem it is necessary that I create a
         * custom input dialog to allow further modifications however
         * i'm not sure how to wait for the user to enter text and press
         * continue in that input dialog. Unlike JOptionPane the code executes
         * before the user presses continue. My question is how do I wait for the user
         * to press continue in the InputDialog before I call d.getString(); without making the main
         * application unresponsive.
         */

        String returnValue = d.getString();
        System.out.println("return value "+returnValue); //will be null or empty because application doesn't wait for input.
    }


    class InputDialog extends JFrame implements ActionListener {
        JTextField f = new JTextField();
        JButton go = new JButton("Continue");

        public InputDialog() {
            setTitle("Custom Input Dialog");
            setSize(300,150);
            setLocationRelativeTo(null);
            setLayout(new FlowLayout());
            f.setPreferredSize(new Dimension(100,25));
            go.addActionListener(this);
            add(f);
            add(go);
            setVisible(true);
        }

        public void actionPerformed(ActionEvent e) {

        }

        public String getString() {
            return f.getText();
        }
    }
}
Published by: neptune692 on January 3, 2011 13:25

neptune692 wrote:
.. a JOptionPane does not allow me to add the other components too it such as JLabels and other GUI. ..

Of course, it does!

import java.awt.event.*;
import java.awt.*;
import javax.swing.*;

public class DumbNameMain extends JFrame implements ActionListener {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        new DumbNameMain();
    }

    JButton go = new JButton("Show custom input dialog");

    public DumbNameMain() {
        setSize(300,150);
        setLocationRelativeTo(null);
        setLayout(new FlowLayout());
        go.addActionListener(this);
        add(go);
        setVisible(true);
    }

    public void actionPerformed(ActionEvent e) {
        JTextField f = new JTextField(10);
        JButton go = new JButton("Continue");
        JPanel p = new JPanel(new FlowLayout());
        p.add(f);
        p.add(go);
        JOptionPane.showMessageDialog( this, p );

        String returnValue = f.getText();
        System.out.println("return value "+returnValue);
    }
}

Tags: Java

Similar Questions

  • Looking for a Boolean function similar to or, but do not wait for the second entry in case he gets a 'real' a single entry

    my program works in 2 processes in parallel inside a while loop and should stop when one of them ends.

    How can I do? Uses the function 'Or' wire loop the stop condition will not do the job, waiting for the two processes to give their comments before running.

    What I really need is a function that waits until she gets a 'true' through one of its entry and then executes without waiting than the other.

    Y at - it such an option?

    If not, does anyone have an idea how to achieve what I have described here?

    Thanks in advance!

    What you need is a "not synchronous or", i.e. "do something if Item 1 becomes real GOLD point 2 becomes true.  One way that comes to mind to do is with a design of producer/consumer model (event), where the consumer is a State Machine with a shutdown state.  Get 1 point to trigger an event (perhaps using a user event or property Value Change (follow the signs)) when it turns out true, and have it send to the consumer the Stop State.  Download point 2, to do the same thing.  Now one of them becoming true will cause the shutdown state be registered (without taking care of doing the other element), in other words, that becomes a real, (consumer) loop stops.

    Bob Schor

  • Storage VMotion - a general error occurred: could not wait for the data.  Error bad0007.

    People,

    I searched through this forum and have not found an answer that works in many positions out there, I say to myself that I would ask him once again.

    Here's the context:

    We have 12 identical Dell M600 blades in 2 chassis with 16 GB of Ram, 2 x Xeon E5430, they are all connected to an Equallogic PS 5000XV iSCSI SAN on a separate iSCSI (vswitch1) with 2 cards network dedicated network and dedicated switch, console svc iscsi dedicated, dedicated VMkernel port for iscsi access. Net access (vswitch0) contains port groups VM for our various networks and a console port and vmkernel svc for VMotion with 2 separate NETWORK cards as well.

    We are running ESX 3.5 U3 and VCenter 2.5 U3 on Win2k3 R2

    VMotion works between all servers, Storage Vmotion works for most machines, HA works and the value 2 host failurs with no monitoring of vm, DRS is set to manual for now I have a few machines on the local stores that I complete my rebuilt LUN, there is no set of rules for DRS and VMware EVC is enabled for guests of the Intel. However, I'll just describe one machine to do svmotion below.

    Here's the problem:

    I'm trying to Svmotion via svmotion.pl - interactive, a Machine to Windows 2000 with a virtual disk and a virtual RDM. I am aware of the requirements for the RDM and required parameters for svmotion, independent is not selected for the RDM, and I also have svmotioned several machines linux and win2k3 with the same configuration without problem. In the interactive session, I choose to individually place the disks and I chose the virtual disk to only the virtual machine to be moved, essentially, as I saw it move vdisk virtual machine and then copy to the pointer of the RDM.

    The use of the processor in this machine is about 25% average. but I try to run migrations at the time the lowest. and The Host it itself shows only about 5.5 GB of the 16 GB of RAM used. so I think we're good on the RAM. the volume/datastore that I'm migrating from has 485 GB free and the volume/datastore I migration towards a 145 GB free. the VM virtual disk is only about 33 GB.

    I run the script the windows version of the RCLI svmotion. and when to begin the process, I get the following error at around 2 percent of the progress:

    "Since the server has encountered an error: a general error occurred: could not wait for the data."  Error bad0007. Invalid parameter. »

    After searching around, I found the following hotfixes to the U2 release notes

    • Migrate.PageInTimeoutResetOnProgress: Set the value to 1.

    • Migrate.PageInProgress: The value 30, if you get an error even after the setting of the Migrate.PageInTimeoutResetOnProgress variable.

    I've made these changes, and I still get the same error.

    When I dig in the newspaper, I see these entries in the journal of vmkwarning:

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu4:1394) WARNING: bunch: 1397: migHeap0 already at its maximumSize bunch. Cannot extend.

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu4:1394) WARNING: bunch: 1522: Heap_Align (migHeap0, 1030120338/1030120338 bytes, 4 align) failed.  calling: 0x988f61

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu4:1394) WARNING: migrate: 1243: 1235452646235015: failure: out of memory (0xbad0014) @0x98da8b

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu2:1395) WARNING: MigrateNet: 309: 1235452646235015: 5 - 0xa023818: sent only 4096 bytes of data in message 0: Broken pipe

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu6:1396) WARNING: migrate: 1243: 1235452646235015: failed: Migration protocol error (0xbad003e) @0x98da8b

    (Feb 24 00:17:32 vmkernel iq-virt-c2-b6: 82:04:13:56.794 cpu2:1395) WARNING: migrate: 6776: 1235452646235015: could not send data for 56486: Broken pipe

    At this point, I'm stuck... What is Windows RCLI? the vcenter Server? or the service console with not enough of RAM? We have already increased all our consoles service 512 MB...

    Any help would be greatly appreciated...

    Thanks in advance.

    Alvin

    The vmkernel on out of memory error, I had that before. And vmware support recommends setting 800M Max service console memory. And I did it and have no problems after that.

    See if that helps the issue.

    Mike

  • HumanTaskActivity does not wait for the user to act

    Hello

    Proc2 I stole the activity of each of the branches, I invoke another process called PROC3 from the e-mail as PROC3 entry.

    PROC3 contains only HumanTaskActivity.

    By the time wherever I start my PROC2, he calls PROC3, but in HumanTaskActivity PROC3 does not wait for the response, it gets full without sending email.

    Any help would be very handful for me.

    Thank you
    VIKI

    VIKI,

    You can run just PROC3? It work? Except that there is a problem with the assignment of the user / group in this task? Users of human tasks has the correct permissions / roles?

    Marc

  • Ive been waiting for 20 minutes waiting for the consultant to apple. Must be a lot of problems apple these days

    Ive been waiting for 20 minutes waiting for the consultant to apple. Must be a lot of problems apple these days

    A twenty minute wait is not at all unusual.

  • Delay (30000 milliseconds) waiting for the SNMP service to communicate.

    When I start the SNMP service in Windows Server 2003 Enterprise 64-bit (SP2), the event ID 7009 (Timeout (30000 milliseconds) waiting for the SNMP service to communicate.), kindly help me to solve this problem.

    Hello

    Note that your computer is under domain, you must contact the TechNet forum, where we are the support technicians who are well equipped with knowledge on the issues of domain, do please visit the link provided below.

    http://social.technet.Microsoft.com/forums/en-us/winserverfiles/threads

  • remote desktop hang at 'Please wait for the system event notification' during logoff

    When I disconnect a remote connection, sometimes the GET logoff screen stuck at "Please wait for the system event notification" next time I try to open a session.
    This can also happen if that I disconnect the user, but the user seems to weigh on this same screen as well.

    There is a particular difficulty for this?  I can connect as long as administrator to another account, I can't kill connection attached somehow to be registered in the next time?

    Thank you

    Hello

    I suggest you to take a look at the answer in this thread and check if it helps.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/Sens-could-not-connect-to-the-system-event/4e5a04e9-88f8-4017-9416-2ca67c5ce7c5

    Hope this helps,

  • When I turn my laptop I have wait for the screen to come, or I have to wait for it to connect to the internet, what I do for this

    I have a computer gateway laptop and when I turn it on, I have to either wait for the screen to appear or for my laptop to connect to internet, I tried several different things, and none of them seem to work.before id turn on my laptop and within seconds it would connect, now it seems that it takes forever to connect. Thank you

    Hello

    1. any hardware or software changes made recently before the problem?

    I suggest that you follow all the steps in this article to resolve the problem.

    Optimize Windows Vista for better performance
    http://Windows.Microsoft.com/en-us/Windows-Vista/optimize-Windows-Vista-for-better-performance

  • Start stuck on "Please wait for the Local Session Manager."

    I would say that this problem started a couple of days. Went to start my laptop (Toshiba) and he sat on the "Please wait" message forever.

    Had no problems to start in safe mode. Looked up various ways of addressing the problem.

    Was able to change the resume date and back a few weeks ago. Still no luck. Happened to read something on a printer Epson being perhaps the problem driver (it was installed a day before the date of restoration chosen). Uninstalled the drivers, computer still does not start.

    Tried restarting running. I do not have the CD it came with Vista, but it was an option when you hold F8 during startup (I think?) Couldn't find any problems.

    Ran check on memory. No problem either.

    Changed settings for a verbose startup and ran a Diagnostic startup - all good for this. Then tried selective startup load system services... This is when the error occurs. When starting, it hangs on "Please wait for the Local Session Manager" and does nothing more.

    I looked in the event viewer to see what came that time and a couple mistakes were:

    Event ID 6000: winlogon notification subscriber was unavailable to handle a notification event.

    Event ID 7026: the next (s) start or start failed to load system
    spldr
    Wanarpv6

    It would be very useful for me not having to run my computer in safe mode automatically all the time, although it is useful that I at least have that option. Any help is greatly appreciated.

    Hello

    1. by chance your computer is connected to a domain environment?

    2. as you mentioned in your article that you tried the selective startup, I want to confirm if you have disabled the services left 3rd after hide Microsoft services?

    If you did not disable these services make sure you disable and then check if it works.
    See the article below for more information.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135
    Note: When the diagnosis is complete, don't forget to reset your computer to normal startup. Follow step 7 in the above article.

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Please wait for the customer to political group - stop questions

    Hello

    I have problems with the closing of a machine. When the machine is connected to the corporate network, everything works fine. However, if the computer is connected to the VPN (1 hour or more) it is always suspended when it stops. First step in the shutdown process is:

    Please wait for the system event Notification service.

    This change after 3 minutes exactly. Next step:

    Please wait for Group Policy client windows 7

    is never exceeded (even after a few hours). Machine never off.

    Under newspapers there are always these 4 events when the machine stops in vain:

    1. 6005: the winlogon notification subscriber takes a long time to handle the notification event (Logoff).
    2. 4627: the event COM + a system expired attempt to fire the method of logging on the event {D5978650-5B9F-11D1-8DD2-00AA004ABD5E} class for the Publisher and the Subscriber.  The Subscriber has not responded within 180 seconds. The full name of the subscription is "ISensLogon2". The HRESULT is 80010002
    3. 6006: the winlogon notification subscriber took 180 second (s) to handle the notification event (Logoff).
    4. 6005: the winlogon notification subscriber takes a long time to handle the notification event (Logoff).

    Sense has expired after 3 minutes while there is no event 6006 for GPClient and machine is stuck there for centuries (Please wait for the customer to group policy). I noticed in the system logs that before the machine hangs during the shutdown process there are these errors and warnings:

    • 5783: the session configuration for the Windows NT or Windows 2000 Domain Controller \\server for the domain X is not admissible.  The current CPP of Netlogon call on \\machine to \\server was canceled.
    • 1014: name resolution for the name of the server has expired after none of the configured DNS servers answered.
    • 131: NtpClient could not set a domain peer to use as a source of time due to the DNS resolution error on ". NtpClient will try again in 3473457 minutes and double the reattempt interval thereafter. The error was: the requested name is valid, but no data of the requested type was found. (0x80072AFC).

    There is more than 1014 events for different servers and some 131. 5783 is always alone.

    I did a group policy log, because I thought that I will be able to see where the machine stuck. Below you can see the part of the newspaper GPSVC when the machine stops in vain:

    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: incoming with the event 0xe58
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: cancellation pending appeals
    GPSVC (2d4.1cfc) 21:31:24:327 Client_CompleteNotificationCall: failed with 0x71a
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: cancelled waiting for calls
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: dating dwStatus = 0 x 0
    GPSVC (438.1a04) 21:31:24:327 waiting for user group wire political end.
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: incoming with the event 0xe10
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: cancellation pending appeals
    GPSVC (218.C88) 21:31:24:327 Client_CompleteNotificationCall: failed with 0 x 525
    GPSVC (2d4.1cfc) 21:31:24:327 Client_CompleteNotificationCall: failed with 0x71a
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: cancelled waiting for calls
    GPSVC (2d4.9C8) 21:31:24:327 CGPNotify::OnNotificationTriggered: Completenotification failed with 1317
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: incoming with the event 0xdcc
    GPSVC (218.1054) 21:31:24:327 CGPNotify::UnregisterNotification: incoming with the event 0x20cc
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (2d4.9C8) 21:31:24:327 CGPNotify::OnNotificationTriggered: Completenotification failed with 1317
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::UnregisterNotification: incoming with the event 0xd90
    GPSVC (218.1054) 21:31:24:327 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (2d4.1cfc) 21:31:24:327 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (2d4.1cfc) 21:31:24:342 CGPNotify::UnregisterNotification: dating dwStatus = 0 x 0
    GPSVC (218.D48) 21:31:24:342 Client_CompleteNotificationCall: failed with 0 x 525
    GPSVC (218.D48) 21:31:24:342 CGPNotify::OnNotificationTriggered: Completenotification failed with 1317
    GPSVC (218.1c04) 21:31:24:327 Client_CompleteNotificationCall: failed with 0 x 525
    GPSVC (218.1c04) 21:31:24:342 CGPNotify::OnNotificationTriggered: Completenotification failed with 1317
    GPSVC (218.1054) 21:31:24:342 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (218.1054) 21:31:24:342 CGPNotify::UnregisterNotification: dating dwStatus = 0 x 0
    GPSVC (218.1054) 21:31:24:342 CGPNotify::UnregisterNotification: entering with the event 0 x 2100
    GPSVC (218.1054) 21:31:24:342 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (218.1054) 21:31:24:342 CGPNotify::UnregisterNotification: dating dwStatus = 0 x 0
    GPSVC (218.1054) 21:31:24:342 CGPNotify::UnregisterNotification: entering with the event 0 x 1264
    GPSVC (218.1054) 21:31:24:342 CGPNotify::AbortAsyncRegistration: No asynchronous recording is in progress
    GPSVC (218.1054) 21:31:24:342 CGPNotify::UnregisterNotification: dating dwStatus = 0 x 0

    I excluded 1 GP machine and left on the VPN for a few hours, several times. He always stopped correctly.

    However I tried with the VPN disconnection before turning off the machine, I even turned off WiFi but machine still hanging. If I tried to get GP results it takes ages before stopping the machine and he's stuck in the step "to get the user name. Gpupdate/force will never update policy (it stops at policy update...). I tired with the installation of different patches that has not solved the problem.

    I think that there is that DNS issues while the machine is on VPN which led the GP cannot be applied. When the machine tries to close it is always somehow connected. There is no problem with the connection, no GP application script when the user disconnects, not roaming profiles.

    Does anyone have the same problems? All machines are Dell with Juniper NC (VPN).

    Thank you

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums.

    TechNet forum: For Windows 7 

    Hope this information helps.

  • BlackBerry Q10 in waiting for the new Q10 hit sprint but what will happen to my email?

    Currently, I am waiting for the new Q10 hit sprint.  but I hear that I have will no longer be able to use my email with the new blackberry blackberry.net.  I currently use it as my email address.  1 it's true they won't E-mail blackberry and if so what steps do I need to take to make a smooth transition?

    1. Yes, the blackberry.net email is no longer available... and quite honestly, in my opinion, it's a good thing. Blackberry.net email is not available elsewhere ON your BlackBerry, you can view it on the handheld device itself and no backup otherwise. Get a free gmail, yahoo or Outlook.com account.

    2. read this: Article ID: KB33260 (hosted) BlackBerry e-mail address reference for BlackBerry OS 10

    Then, create and start using another free email account now. When you finally go to the thread at BlackBerry10, you will have your solution in place for shipping the blackberry.net email account.

  • waiting for the task to the end host window.

    My computer startrd to show, when I restart or shutdown windows 7, I get a message saying that windows is waiting for the task host window to end what it means...?

    Hi Sanaaalsadouni,

    Thanks for posting your question in the Microsoft Community forums.

    The TASKHOST is a generic process, which acts as a host for the processes that are running DLL instead of exe files. Up TASKHOST checks the part Services of the registry to construct a list of services focused on the DLLS it needs to load, then load them.

    I suggest you try the procedure described in the article and see if it helps.

    Why my computer won't turn on or off quickly?
    http://Windows.Microsoft.com/en-us/Windows7/why-wont-my-computer-turn-on-or-off-quickly

    See the article for more information.

    See details about your computer's performance using Task Manager
    http://Windows.Microsoft.com/en-us/Windows7/see-details-about-your-computers-performance-using-Task-Manager

    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you.

  • new SSD HP Pavilion HPE win 7 home Premium Error: Driver_Power_State_Failure Bluescreen from 30 to 45 minutes waiting for the stop down.

    Hello all, there

    I recently installed a new SSD in a HP Pavilion HPE with windows 7 Home premium. After this event I get bluescreen Driver_Power_State_Failure after about 30-45 minutes waiting for the computer to stop. I have a minidump file if this will be useful and I would be very grateful if someone could help me solve this problem :D

    Minidump: http://www.mediafire.com/?hy7so6n9af5f73v

    I hope this helps and all support is most appreciated!

    The tihub3.sys seems to be in question:

    BUCKET_ID: X64_0x9F_3_POWER_DOWN_IMAGE_tihub3.sys

    The tihub3.sys, which is dated January 14, 2011, is a Texas Instruments USB 3.0 driver so try to update this driver by installing the next update:

    http://h10025.www1.HP.com/ewfrf/WC/softwareDownloadIndex?softwareitem=CP-108667-1&CC=UK&DLC=en&LC=en&os=4063&Product=5144370&sw_lang=

  • A timeout occurred while waiting for the host controller EHCI interrupt on answer Async ahead Bell.

    Whenever I put my adapter wireless netgear n150 under heavy load (download of World of Warcraft for example), it will go down to connection and until I restart the computer the adapter usb port is useless.  I dug into the event viewer and found that a timeout occurred while waiting for the EHCI host controller interrupt on the asynchronous response advance doorbell, source usbehci.  This seems to have been a problem with windows 8 I found other threads referencing but I can say that they are pre-release and some actually work solutions have been validated.  I already assured that all drivers, firmware and chipsets are up-to-date and compatible.  ANYONE please help?

    Quick fix I found:

    -try falling back to WiFi G rather than use N
    In my case, it works... is no longer a fall. But not the same bandwidth...
  • CREATE INDEXES online is waiting for the TX = 4 mode

    Hello

    I have a strange blocking problem where an INDEX CREATE LINE is waiting for a transaction that did only inserted a line in the parent table.

    Wait is mode TX = 4 (not TM locks) and I currently have it reproduced only on 11.2.0.3 and 11.2.0.4

    Easy to replicate the schema SCOTT:

    Session 1:

    SQL > set time on

    14:54:58 SQL > insert into SCOTT. Dept (DEPTNO, dname) values (50, 'test');

    1 line of creation.

    Session 2;

    14:55:24 SQL > create index test on SCOTT. EMP (ename) online;

    It's waiting ' enq: TX - line lock conflict ":"

    SQL > select sid, chain_signature from v$ wait_chains where blocker_is_valid = 'TRUE '.

    SID CHAIN_SIGNATURE

    ---------- ----------------------------------------------------------------------

    603 ' SQL * Net client message' < ='enq: TX - line lock conflict '

    While waiting to acquire the lock of transaction in mode 4:

    SQL > select * lock gv$ where sid = 603

    INST_ID SELECT ADDR KADDR SID TYPE ID1 ID2 LMODE CTIME BLOCK REQUEST

    ---------- ---------------- ---------------- ---------- ---- ---------- ---------- ---------- ---------- ---------- ----------

    1 00000006CDA05EB8 00000006CDA05F10 603 352577 0 4 0 348 2 AE

    1 00000006CDA06078 00000006CDA060D0 603 DL 779505 0 3 0 308 2

    1 00000006CD9FABE0 00000006CD9FAC38 603 DL 779505 0 3 0 308 2

    1 00007F28001F5028 00007F28001F5088 603 779505 0 2 0 308 2 TM

    1 00007F28001F5028 00007F28001F5088 603 779510 0 4 0 308 2 TM

    1 00000006CD9FA240 00000006CD9FA298 603 779505 0 4 0 308 2 OD

    1 00000006B4F26790 00000006B4F26808 589847 711499 6 0 308 2 TX 603

    1 00000006CDA0ED68 00000006CDA0EDC0 655377 996169 0 4 308 TX 603 0

    I've traced 10046 and 10704:

    broadcast message = obj 29231196672 #= 779514 tim = 1447251053634045

    ksqgtl * mode TX-000f001e-000ad97c = 4 flags = 0 x 10001 timeout = 21474836 *.

    ksqgtl: xcb = 0x6bb322528, ktcdix = 2147483647, topxcb = 0x6bb322528

    ktcipt (topxcb) = 0 x 0

    ksucti: init logon has of txn DID:

    ksqgtl:

    ksqlkdid: 0001-003F-0000AFC4

    ksudidTrace: ksqgtl

    ktcmydid(): 0001-003F-0000AFC4

    ksusesdi: 0001-003F-0000AFC3

    ksusetxn: 0001-003F-0000AFC4

    ksqcmi: TX, f001e, ad97c mode = 4 timeout = 21474836

    2015-11-11 15:11:36.566

    WAITING #140700792578680: nam ='enq: TX - line lock conflict ' ela 42932082 name = | mode = 1415053316 usn < < 16 | location = sequence 983070 = obj 711036 #= 779514 tim = 1447251096566283

    And there is nothing in V$ SESSION leader/block/line current. class obj # is EMP. current sql_id is the CREATE INDEX.

    If anyone has an idea on:

    -Why creating an index in line must wait for transactions that modified only parent table

    -How to continue the investigation

    -can or cannot reproduce in other versions

    Thanks in advance,

    Franck.

    I guess you have a constraint foreign key between emp and Dept.

    It's expected behaviours: since 11.1 any DML at one end of a referential integrity constraint translates into a mode lock 3 taken at the other end, and your phenomenon resembles a side effect of this.

    When you try to create the index online that your session must assume that the other session (holding mode 3 on the emp and dept) may have changed the emp and dept, so it must wait for the session to the commit or rollback.

    (I guess that in principle, he could walk the cancellation of the transaction see if EMP had in fact been changed - but maybe who was considered too complicated to be worth the risk to implement)

    Concerning

    Jonathan Lewis

    Updated - I just did a quick check to reproduce the effect on 11.1.0.7

    For reference - here are a few notes on modes of locking and how the application has changed over time: https://jonathanlewis.wordpress.com/2010/06/21/locks/

Maybe you are looking for

  • Satellite A300-1RZ - stucks Windows 7 upgrade on the first step of the installation

    Hi all I'm Italian, I an A300 Satellite with Vista Home Premium I paid 30 euros for the free upgrade to Windows 7, which reached my House yesterday. I got 2 DVD:-1 to 'prepare' my phone: * TOSHIBA UPGRADE DVD *.-1 upgrade operating system: * WINDOWS

  • Dynadock extended window settings problem

    I use a PA3541U-2PRP Dynadock and have problems with the display parameters attached to it. For some reason whenever I restart, or lock/unlock the desktop screen was extended to mirror mode mode. According to the manual, I should be able to change th

  • Missing letters...

    Hello eveyone! I have a problem with my IPhone 5. When I change to English keyboard in Lithuanian, I find that certain essential letters are missing and I can't use properly phone when I want to type correctly in my mother tongue. You may have troubl

  • B210a won't airprint

    everything works fine but the airprint I did everything suggested the support page, but it will not airprint Looks like everything is going well, my iphone, ipad and itouch all detect the printer and it seems that he sends it but nothing every lot of

  • How to make compatible software that works under xp/2000 or vista when I have windows 7

    I bought a programmer superchip for my truck it said to search for updates before installing and it works under xp/2000 or vista when I have windows 7, what can that do to make it work