Overriding windowClosing(Window Event e)???

Hello,
I have a similar question to some already posted regarding closing frames and panels. I am currently writing an application using Java as the interface an Access as the backend. I have the option to exit through a Jmenu. This allows me to prompt the user to save their changes before closing.
My problem is I want the user to have the same option when using the X button in the top right hand corner.
At the minute I am using the code below, which ends the application immediately, without allowing me time to save any changes first.
     fl.addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
Can anyone offer me a better solution; I would ideally like to be able to load a JoptionPane with a YES_NO_OPTION to confirm if to save, followed by a second to confirm Exit, which is how the Jmenu option works.
Thanks for any help in advance.
Kris Dowse

What your code actually does: it intercepts the window is closing event, and as soon as it arrives, it kills the Java Virtual Machine (that's what System.exit() does).
Instead of the System.exit() call, you should let your option pane to appear. If it's modal (what I think it is), then I'd say you should run it in another thread, because you're supposed to return from an event handling method as soon as possible. The best is if you have a method which is invoked both from the action listener of the File/Exit menu item, and the window closing listener of the JFrame. This method should create a new thread, doing the work inside, and return immediatelly. If the user (inside the new thread) chooses to cancel the exit, then the thread simply stops, and your application runs. If the user chooses to really exit, then just call the System.exit(), that will kill all the active threads and stop the JVM. This is the behaviour you're seeking for, aren't you?
However, I'd think you also should set the JFrame's setDefaultCloseOperation to DO_NOTHING_ON_CLOSE.

Similar Messages

  • How do you override the WINDOWS key?

    I'm writing or rather rewriting a game. I would like to override the windows key to do some function in the game without invoking the windows menu. Is this possible, and if so how?
    Below is a sample bit of code I used to see what key codes, locations, and events were fired while pressing various keys. I made the key pressed/typed/released methods consume the events in an attempt to block the windows menu from coming up. I tried using a KeyEventDispatcher to catch all key events and consume them there, but it still displays the windows menu (on Windows 2000 at least).
    I have searched the forums and the all mighty Google to no avail. Please help me if you can. Thank you.
    import java.awt.Dimension;
    import java.awt.KeyEventDispatcher;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.FocusManager;
    import javax.swing.JFrame;
    public class Test extends JFrame implements KeyListener, KeyEventDispatcher
      public Test()
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        addWindowListener(new WindowAdapter()
          @Override
          public void windowClosing(WindowEvent windowEvent)
            System.exit(0); //close all windows and exit
        FocusManager.getCurrentManager().addKeyEventDispatcher(this);
        this.addKeyListener(this);
        this.pack();
      public static void main(String[] arguments)
        Test frame;
        frame = new Test();
        frame.setTitle("Test Frame");
        frame.setPreferredSize(new Dimension(200,200));
        frame.invalidate();
        frame.pack();
        frame.setVisible(true);
      // this doesn't stop windows key from being processed whether true or false
      // if it is true the keyPressed, keyTyped, and keyReleased don't get called
      public boolean dispatchKeyEvent(KeyEvent keyEvent)
        System.out.println("dispatchKeyEvent " + keyEvent);
        return true;
      public void keyPressed(KeyEvent keyEvent)
        System.out.println("keyPressed " + keyEvent);
        keyEvent.consume();
      public void keyReleased(KeyEvent keyEvent)
        System.out.println("keyReleased " + keyEvent);
        keyEvent.consume();
      public void keyTyped(KeyEvent keyEvent)
        System.out.println("keyTyped " + keyEvent);
        keyEvent.consume();
    }

    Thanks for the reply. That is basically all I wanted to confirm. I wanted to allow the player to redefine the windows key to some game specific command. I can do this for all of the other keys I was able to test except for that one.
    If someone uses it on something other than windows they can redefine any key that maps to one of theirs. Since I don't have any alternate systems or keyboards to test on I won't bother making other keyboard configurations for the time being, if ever.

  • Lots of Anyconnect Error Message in Windows Event Log

    Hi Community.
    We have lots of Anyconnect Error Messages in the Windows Event Log. Following two examples.
    Can anyone tell me why these errors appears and how do I fix them ? I already installed the newest Anyconnect on my machine.
    Thanks in advance and Kind Regards Patrick
    Example 1
      <Provider Name="acvpnagent" />
      <EventID Qualifiers="9216">2</EventID>
      <Keywords>0x80000000000000</Keywords>
      <EventRecordID>97564</EventRecordID>
      <Channel>Cisco AnyConnect Secure Mobility Client</Channel>
    - <EventData>
      <Data>Function: CNetEnvironment::logProbeFailure File: .\NetEnvironment.cpp Line: 1432 Invoked Function: CHttpProbeAsync::SendProbe Return Code: -27066354 (0xFE63000E) Description: HTTP_PROBE_ASYNC_ERROR_CANNOT_CONNECT HTTP (host: 109.164.211.237)</Data>
      </EventData>
    Example 2
      <Provider Name="acvpnagent" />
      <EventID Qualifiers="9216">2</EventID>
      <Keywords>0x80000000000000</Keywords>
      <EventRecordID>97565</EventRecordID>
      <Channel>Cisco AnyConnect Secure Mobility Client</Channel>
    - <EventData>
      <Data>Function: CNetEnvironment::TestAccessToSG File: .\NetEnvironment.cpp Line: 1385 Invoked Function: CNetEnvironment::analyzeHttpResponse Return Code: -28966899 (0xFE46000D) Description: NETENVIRONMENT_ERROR_PROBE_INCOMPLETE:Network Probe could not contact target</Data>
      </EventData>

    HI and welcome to Discussions,
    in my personal opinion there is not much for you to worry about.
    The 'Windows Tool for the elimination of malware' is nothing you miss as long as you have a decent Anti-Virus Software running.
    The update for the IE 7 might be missing an installed IE 7, which can do by downloading it yourself from Microsofts webpage.
    If you don't use the IE but something like Firefox or Opera or Safari, than don't bother with these update.
    Stefan

  • How to write to windows event logs from determinations-server under IIS

    This is just an FYI technical bit of information I wish someone had shared with me before I started trying to write OPA errors to the windows event log... Most problems writing to the windows event log from log4net occur because of permissions. Some problems are because determinations-server does not have permissions to create some registry entries. Some problems cannot be resolved unless specific registry entry permissions are actually changed. We had very little consistency with the needed changes across our servers, but some combination of the following would always get the logging to the windows event log working.
    To see log4net errors as log4net attempts to utilize the windows event log, temporarily add the following to the web.config:
    <appSettings>
    <!-- uncomment the following line to send diagnostic messages about the log configuration file to the debug trace.
    Debug trace can be seen when attached to IIS in a debugger, or it can be redirected to a file, see
    http://logging.apache.org/log4net/release/faq.html in the section "How do I enable log4net internal debugging?" -->
    <add key="log4net.Internal.Debug" value="true"/>
    </appSettings>
    <system.diagnostics>
    <trace autoflush="true">
    <listeners>
    <add
    name="textWriterTraceListener"
    type="System.Diagnostics.TextWriterTraceListener"
    initializeData="logs/InfoDSLog.txt" />
    </listeners>
    </trace>
    </system.diagnostics>
    To add an appender for the windows event viewer, try the following in the log4net.xml:
    <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
    <param name="ApplicationName" value="OPA" />
    <param name="LogName" value="OPA" />
    <param name="Threshold" value="all" />
    <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
    </layout>
    <filter type="log4net.Filter.LevelRangeFilter">
    <levelMin value="WARN" />
    <levelMax value="FATAL" />
    </filter>
    </appender>
    <root>
    <level value="warn"/>
    <appender-ref ref="EventLogAppender"/>
    </root>
    To put the OPA logs under the Application Event Log group, try this:
    Create an event source under the Application event log in Registry Editor. To do this, follow these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application
    4.     Right-click the Application subkey, point to New, and then click Key.
    5.     Type OPA for the key name.
    6.     Close Registry Editor.
    To put the OPA logs under a custom OPA Event Log group (as in the demo appender above), try this:
    Create an event log in Registry Editor. To do this, follow these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
    4.     Right-click the eventlog subkey, point to New, and then click Key.
    5.     Type OPA for the key name.
    6.     Right-click the new OPA key and add a new DWORD called "MaxSize" and set it to "1400000" which is about 20 Meg in order to keep the log file from getting too large.
    7.     The next steps either help or sometimes cause an error, but you can try these next few steps... If you get an error about a source already existing, then you can delete the key.
    8.     Right-click the OPA subkey, point to New, and then click Key.
    9.     Type OPA for the key name.
    10.     Close Registry Editor.
    You might need to change permissions so OPA can write to the event log in Registry Editor.  If you get permission errors, try following these steps:
    1.     Click Start, and then click Run.
    2.     In the Open text box, type regedit.
    3.     Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
    4.     Right-click the EventLog key, select Permissions.
    5.     In the dialog that pops up, click Add...
    6.     Click Advanced...
    7.     Click Locations... and select the current machine by name.
    8.     Click Find Now
    9.     Select both the Network user and IIS_IUSERS user and click OK and OK again. (We never did figure out which of those two users was the one that fixed our permission problem.)
    10.     Change the Network user to have Full Control
    11.     Click Apply and OK
    To verify OPA Logging to the windows event logs from Determinations-Server:
    Go to the IIS determinations-server application within Server Manager.
    Under Manage Application -> Browse Application click the http link to pull up the local "Available Services" web page that show the wsdl endpoints.
    Select the /determinations-server/server/soap.asmx?wsdl link
    Go to the URL and remove the "?wsdl" from the end of the url and refresh. This will throw the following error into the logs:
    ERROR Oracle.Determinations.Server.DSServlet [(null)] - Invalid get request: /determinations-server/server/soap.asmx
    That error should show up in the windows event log, OR you can get a message explaining why security stopped you in "logs/InfoDSLog.txt" if you used the web.config settings from above.
    http://msdn.microsoft.com/en-us/library/windows/desktop/aa363648(v=vs.85).aspx
    Edited by: Paul Fowler on Feb 21, 2013 9:45 AM

    Thanks for sharing this information Paul.

  • Window.event does not working in Firefox 4.0 and also window.event.ctrlKey ?

    hi,
    I'm using Microsoft virtual earth map 6.2 (bing Map) in my application.On map showing number of images.On Each image there is onClick event that select image if user press left mouse button while holding Ctrl key .For this I wrote java-script function where I'm using Window.event.button (To check mouse button) and window.event. ctrlKey(To check control key) But these both are not working in Firefox 4.0 ,the same is working in Firefox 3.6X version perfectly.
    Thanks

    The same problem is in Firefox 5.0 version too

  • Operations Manager Failed to Access the Windows Event Log and management server is showing warning state

    Hi,
    I am monitoring AD server from SCOM 2012 R2. My management server goes into waning state. When i run Health explorer then it come back in the healthy state but after some time it again goes into warning state. After seeing alert i found that a alert is coming
    again and again i.e.  Operations Manager Failed to Access the Windows Event Log.The description of alert is mention below
    The Windows Event Log Provider is still unable to open the DhcpAdminEvents event log on computer 'nc2vws12ad5.corp.nathcorp.com'.
    The Provider has been unable to open the DhcpAdminEvents event log for 64080 seconds.
    Most recent error details: The RPC server is unavailable.
    Please suggest me how to resolve this so that my management server will again come back in healthy state.
    Thanks
    Abhishek

    Hi Abhishek,
    As i mentioned earlier the Alert resolution says the same points.
    Can you give details on the below ?
    Is there really a log named "Dhcpadminevents" in the MS's Event viewer ?
    Did you recently configure any new alert where you mentioned "Dhcpadminevents"
    as a event log location ?
    If yes then what is the target you selected for the rule / monitor there ?
    Can you post the results for analysis ?
    Gautam.75801

  • While Installation of 11g database creation time error ORA-28056: Writing audit records to Windows Event Log failed Error

    Hi Friends,
    OS = Windows XP 3
    Database = Oracle 11g R2 32 bit
    Processor= intel p4 2.86 Ghz
    Ram = 2 gb
    Virtual memory = 4gb
    I was able to install the oracle 11g successfully, but during installation at the time of database creation I got the following error many times and I ignored it many times... but at 55% finally My installation was hanged nothing was happening after it..... 
    ORA-28056: Writing audit records to Windows Event Log failed Error  and at 55% my Installation got hung,,,, I end the installation and tried to create the database afterward by DBCA but same thing happened....
    Please some one help me out, as i need to install on the same machine .....
    Thanks and Regards

    AAP wrote:
    Thanks Now I am able to Create a database , but with one error,
    When I created a database using DBCA, at the last stage I got this error,
    Database Configuration Assistant : Warning
    Enterprise Manager Configuration Failed due to the Following error Listener is not up or database service is not registered with it.  Start the listener & Registered database service & run EM Configuration Assistant again....
    But when I checked the listener was up.....
    Now what was the problem,  I am able to connect and work through sqlplus,
    But  I didnt got the link of EM and when try to create a new connection in sql developer it is giving error ( Status : failure - Test Failed the Network Adapter could not establish the connection )
    Thanks & Regards
    Creation of the dbcontrol requires a connection via the listener.  When configuring the dbcontrol as part of database creation, it appears that the dbcontrol creation step runs before the dynamic registration of the databsase with the listener is complete.  Now that the database itself is completed and enough time (really, just a minute or two) has passed to allow the instance to register, use dbca or emca to create the dbcontrol.
    Are you able to get a sqlplus connection via the listener (sqlplus scott/tiger@orcl)?  That needs to be the first order of business.

  • Urgent help needed on writing errors in to windows events application logs

    Hi all,
    we have web based application. Whenever there is critical errors encounters in our application we need to write that errors in to windows
    event viewer, application logs. Please help me on how to do this.
    do we have any specific API for this ?
    thanks in advance
    Shivakumar

    You should use WinAPI to do so. Asking in JNI forum (or specialized WinAPI forum) for more details is good idea I think.

  • Illustrator CC crashes on startup(windows event viewer message included)

    Windows event viewer shows like this...
    System
    Provider
    [ Name]
    Application Error
    EventID
    1000
    [ Qualifiers]
    0
    Level
    2
    Task
    100
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2013-12-09T06:35:08.000000000Z
    EventRecordID
    71639
    Channel
    Application
    Computer
    HPNB-dhleeNB
    Security
    EventData
    Illustrator.exe
    17.0.0.260
    52822426
    ntdll.dll
    6.1.7601.18247
    521ea8e7
    c0000374
    000ce753
    a690
    01cef4a8afb2dd09
    C:\Program Files (x86)\Adobe\Adobe Illustrator CC\Support Files\Contents\Windows\Illustrator.exe
    C:\Windows\SysWOW64\ntdll.dll
    0b8a3ab7-609c-11e3-8e0d-005056c00008
    Please help.

    Problem solved.   Refer to below.
    3 posts
    Nov 25, 2013
    2.AlanDrVita, 
    Nov 26, 2013 9:16 AM   in reply to outdoorz
    Report
    I may have been able to resolve my issue. I held shift while opening Illustrator and opened it in a bare bones mode, then closed it and reopened it without getting the error message. Good luck to you.
    Was this helpful? Yes   No 

  • Error in starting nidevldu and nipxirmu services (windows event viewer)

    A computer running Windows XP SP1 and a Visual basic (V6.0) application that I've developped had crashed several times. I've seen lots of errors in the Windows event viewer saying that the nidevldu and nipxirmu services were trying to start (exact french message : Le service nidevldu est en attente de démarrage et Le service nipxirmu est en attente de démarrage). These messages are real errors (not warning or informations).
    I use a 6034E PCI card, Visual basic V6.0 and NI-DAQ 7.4.
    The crashes I've seen may be linked with this problem.
    Is there a solution?

    Hi,
    I think that you are not going to be starting and stopping the devldu service in normal circumstances... due to crashes !
    The firsts steps you have to focus on is to optimize your program in order to avoid crashes, which is not a normal way of work I guess. Then you will be able to avoid these messages!
    Regards,
    David D. - Application Engineer - NI

  • Can't be modify the value of window.event.keyCode in IE 11(Windows 7 Premium) where as in IE 8 (Windows XP) its working fine

    The following is the sample code whcih I have used to check.<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Sample Form</title>
    <script type="text/javascript">
    function keyDownEvent() {
    alert("KD:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KD:"+window.event.keyCode);
    function keyPressEvent() {
    alert("KP:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KP:"+window.event.keyCode);
    </script>
    </head>
    <body>
    <form>
    <input type="text" onkeydown="keyDownEvent()" onkeypress="keyPressEvent()" />
    </form>
    </body>
    </html>
    Kindly post your answers, am waiting for answers...

    This is the TechNet Forum for questions regarding
    Internet Explorer 8, 9, 10, 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.
    For better assistance please ask for help in the MSDN
    IE Development Forums.
    Thanks & Regards,
    Vincenzo Di Russo
    Microsoft® MVP Windows Internet Explorer, Windows & Security Expert - since 2003.
    Moderator in the Microsoft Community and TechNet Forums
    My MVP Profile

  • Overriding error window while using a template to tag Metadata

    We have created a custom panel to tag hard drives of still images and everything is working as expected with the following exceptions: 
    1)  When we select thousands of images on the hard drive to apply a metadata template, we get random error messages that Metadata cannot be applied to image XXXX.  There is nothing different or unique about this image that would make it throw an error.  The error images are always in the middle of a bracket of a sequence of 10 shots.  It might be the first, third or fifth in a sequence, in other words, I cannot identify a pattern.  Out of 4,000 images in the selected group for the template, 200 can back with errors, about 5%.
    2)  It is our hope to let the tagging process run overnight but when Bridge cannot write MD to a file, it displays a window and stops the tagging process until the OK button is hit.  I have not been able to find an "override  error message" check box which would allow the operation to run unattended.  Any way to override this window?  Would writing a script with a "do not show errors" line included work?  Do you happen to have a script like this as I am not an expert script writer.
    Howard

    I have already added my userid before server...
    <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="tcp:q89jcwtry3.database.windows.net,1433;Database=JodoData;User ID=keval-pc@q89jcwtry3;Password=myPassword;Trusted_Connection=False;Encrypt=True;Connection Timeout=30" />   
    <add name="JodoDataEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:q89jcwtry3.database.windows.net;initial catalog=JodoData;integrated security=False;User ID=keval-pc@q89jcwtry3;Password=myPassword;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    I tried with this too,
    <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="tcp:q89jcwtry3.database.windows.net,1433;Database=JodoData;User ID=[email protected];Password=myPassword;Trusted_Connection=False;Encrypt=True;Connection Timeout=30" />   
    <add name="JodoDataEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=tcp:q89jcwtry3.database.windows.net;initial catalog=JodoData;integrated security=False;User ID=[email protected];Password=myPassword;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    Azure itself giving me below connection string, I am just replacing password...
    Server=tcp:q89jcwtry3.database.windows.net,1433;Database=JodoData;User ID=keval-pc@q89jcwtry3;Password={your_password_here};Trusted_Connection=False;Encrypt=True;Connection Timeout=30
    Is this ok, or I need to change somewhere in entity framework connection string ?

  • Cannot open eventlog service on computer '.'. (Windows Event Log service doesn't exist)

    This problem used to be solved after moving a computer object into the appropriate OU and restarting, and if that didn't work, it used to be solved when uninstalling and reinstalling Microsoft FEP (restarts in-between).  Now, the only way to access
    event logs is by logging in as a domain admin, or by accessing event logs through remote manage.
    If a machine object is added to the domain, dropped into the computers container, and restarted, we get this error when going into Computer Management:
    "Cannot open eventlog service on computer '.'."
    The original problem was noticed on our VMs, but I also tried it with a Lenovo Windows 7 build out of the box, added it to our domain, and the problem occurred. When our desktops are built, SCCM's task manager drops it into the appropriate OU immediately,
    so desktops don't have issues.  With VMs, they are dropped into the computers container and restarted, so once this problem occurs, it almost never leaves.  SOMETIMES, removing it from the domain solves the problem, but not always.
    I've tried all of the suggestions I've seen online and none of them have worked, such as cleaning up the policies (through registry, and the appropriate system folders), adding the proper NTFS permissions on the RtBackup folder and %SystemRoot%\System32\winevt\logs, netsh
    winsock reset, cleanboot, etc.
    I did notice that I'm unable to find the NT Service\EventLog user group. I wanted to add it to %systemroot%\system32\winevt\logs, but the group cannot be found on the local computer. Even if that's the problem, why is it missing?
    It doesn't seem like anyone else on the internet gets this exact error.

    Hi Kate!
    Yes, the Windows Event Log service is missing. I had already tried your method (#3), and I did try it again. This is the error I get:
    "The specified service already exists."
    If you check services.msc, it's still not there. If you try to start the Event Viewer, the same error comes up:
    Cannot open eventlog service on computer '.'.
    Hi, 
    Please check for the existence of this key. If not found, create a *.reg file from another machine and import.
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog
    Then, check the issue again.
    If this doesn't work, let's run System file checker tool to repair system:
    Run SFC command in elevated command prompt
    SFC /scannow
    Any error message, please post here to let me know.
    Keep post.
    Kate Li
    TechNet Community Support

  • Connection Timeout Expired in Windows Event Logs

    I just recently installed SharePoint 2013 SP1 on a Windows Server 2008 R2 SP1 server and have been receiving this error message in the Windows Event logs:
    Cannot connect to SQL Server.  <database server name> not found.  Additional error information from SQL Server is included below.
    Connection Timeout Expired.  The timeout period elapsed during the post-login phase.  The connection could have timed out while waiting for server to complete the login process and respond; Or it could have timed out while attempting to create
    multiple active connections.  The duration spent while attempting to connect to this server was - [Pre-Login] initialization=12; handshake=6; [Login] initialization=0; authentication=0; [Post-Login] complete=14000;
    I have never seen this error message before in my life on any prior installation of SharePoint that I have ever done.  It is only occurring on this one particular installation of SharePoint.  The environment is corporate built, so I have no idea
    as to how to troubleshoot or determine the root cause of this error message.
    I looked at the value of the database-connection-timeout in stsadm and it gets back a value of 15, however, I am unable to alter the database connection timeout using stsadm since I either get an "Object reference not sent to an instance of an object"
    error message or "This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database.  To connect this server to the server farm, use the SharePoint
    Products Configuration Wizard, located on the Start menu in Microsoft SharePoint 2010 Products."
    Please advise. 

    What is specification of your SQL server? i think its more CPU, RAM, I/O issue with SQL server.
    under which account you are running the stsadm command?
    check this one
    http://stackoverflow.com/questions/21230927/sql-azure-the-timeout-period-elapsed-during-the-post-login-phase
    may be you fall in this bug
    http://connect.microsoft.com/VisualStudio/feedback/details/821803/connection-timeout-expired-the-timeout-period-elapsed-during-the-post-login-phase
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Windows event coming through via db- put() call (very puzzling)

    We have this problem (https://bugzilla.osafoundation.org/show_bug.cgi?id=11202) where if we run a DEBUG build of chandler after running a RELEASE build on Windows (XP or 2000), running db 4.5.20 or 4.6.21, we're getting a windows event call while inside a db->put() call. This so happens in a somewhat critical section of code where windows events are definitely not expected.
    In no place that we can find are there any calls that we expect to tickle the Windows event loop (no yielding or somesuch). An MSVC stacktrace that doesn't even show any 'db' API to be on the stack at all. Yet, stepping through the python code in the python debugger clearly gets us to this error when stepping over the self._db.put() call which is more or less just a db->put() call in C.
    We think that we've ruled out threading weirdness, only one thread is involved here.
    Our wx engineer seems to remember having seen something about this strange interaction between Berkeley DB and wxWidgets before. Does this ring a bell ? Do you have any clues about what could be going on here ?
    Thanks
    Andi..

    Berkeley DB windows port utilizes Windows' CreateEvent function to implement the lock functionality, which is a fundamental functionality for databases.
    You do not have to protect berkeley db access methods for synchronization explicitly, rather, you should set DB_THREAD flag in the DB_ENV->open and DB->open funciton if the env and db handles are to be accessed by multiple thread of the same process, this way, Berkeley db will handle the synchronization internally

Maybe you are looking for

  • What's Wrong with These Rules?

    I can't see what's wrong with these rules. Does any one see the problem? Passport data is verified if Database provides an exact match for the passport number and date of birth. Photo matching is required if Passport data is verified. Passport photo

  • NullPointerException when doing a getObjectById

    In one circumstance I am getting a NullPointerException when performing a getObjectById. I double checked to be sure that all fields of the object Id are filled properly and that the metadata is mapped properly. This error is with 2.5.0 b2 - Jeff Exc

  • How to setFocus current page?

    Hello! I'm newb soo sorry for my mistakes. As in the title, I need setFocus my current page... Something like getPage? Is it possible? using Acrobat 9.0 pro.. Ty for help!

  • Where to buy altoid cases in sydney

    Hi i was just reading the thread about cases for the zen micro and i thought i would have a go at making the altoid case. Does anyone know where they stock that type of lolly in sydney ? i know you can buy them online at http://www.clorders.com/altoi

  • LOV does not return value to the base page sometimes

    Hi, I have created messageLOV type items. These LOVs do return value to the base page usually. We have a user in Uruguay who is trying to use the page which has the LOVs. He says the LOV takes a long time to return to the main page after he clicks on