Addshutdownhook not working on Windows service

I have a shutdown hook added to perform some jobs before terminate JVM. it's working fine when I run the application in the console - Ctrl-C will call my shutdown thread. However, when I stop the application using the Windows Service I created for my application, the shutdown thread is not called before terminate the JVM. Please help !!!

It won't work on windows.
see http://archives.java.sun.com/cgi-bin/wa?A2=ind0103&L=jini-users&P=40415.
cheers,
David

Similar Messages

  • Web Service Client(Console App) not working on Windows Server 2008 R2 Standard Edition

    I am trying to consume an ASMX Web Service in a console app, its working fine in Windows 7,Windows Server 2012 Standard,Windows Server 2008 R2 DataCenter,Windows Server 2008 R2 Enterprise, But its not working in Windows Server 2008 R2 Standard Edition which
    is the deployment server.
    I tried consuming the ASMX web service using Web Reference and Service Reference as well but its not helping. Its throwing up the following error,
    Message:There is an error in XML document (1, 331491).
    Inner Exception : System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line 1, position 331491.
    The scenario is that i call the web service and it returns me an XML i am not able to receive the XML on Windows Server 2008 R2 Standard Edition.
    Please provide suggestions on this I need to resolve this ASAP.

    Hi,
    This question is better asked here:
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=asmxandxml
    Experts here are more familiar about it and they can give you more efficient suggestion.
    Thank you.

  • Redirect Printer is not working in windows 2008 R2 Server( Server Running as AD and Terminal Service(both role in single server))

    Dear Team
    i need solution from Microsoft for the issue;
    My infrastructure
    - Windows Server 2008 R2 (Role - AD and Terminal Service)- Updated
    - Client Machine running with windows 7 pro (Updated)
    - Client Using RDP Client to connect Windows 2008 Terminal Session
    - All are working fine, but Redirect Printing is not working (Through Windows 7 Pro) ... (HP Laser Jet 1020 plus - attached in Client PC)
    - it is working fine from Windows XP
    - i was done All terminal setting in both end, also try RDP Login with Administrator User, but issue is not resolve;
    What Microsoft can say about the issue;
    Thanks & Regards,
    VIMAL PRAJAPATI | 09824111686

    Have you checked the Print Service log in event viewer?
    Here's How.
    I have the Microsoft XPS driver on my clients, so I use that fact to my advantage below.
    Click Start Button/Administrative Tools/Remote Desktop Services/Remote Desktop Services Manager on the RDSH server
    Click the Sessions tab.  PC’s are listed Under Client Name by their computer name.  Take Note of the corresponding
    ID.  We will use this to locate the Printer information in the Event Log.  
    In the Event Log open Application and Services Logs/Microsoft/Windows/Print Service/Admin/ and Find the Event ID 823 entry that has the corresponding ID from the sessions tab you previously noted.  
    This Event Log Entry is created at Logon and you can only get the session ID when they are logged in.
    This tells you what client printer was mapped for the client.  The name that appears is the name of the Printer that was set on the client when the printer was installed.
    See if you see any errors here.
    If you see Event Id 823 with the following message “The default printer was changed to Microsoft XPS Document Writer,winspool,Ne00:. See the event user data for context information.”  Twice in a row with no other messages in between, and the first occurs
    at the time the user logged in, then their printer was not properly redirected.
    You see the Microsoft XPS driver mapped for each session prior to Easy Print redirecting the client machine’s Default Printer.
    Since your printer is the HP 1020 I would bet the driver on the client does not work with Easyprint.  I would try the  the HP Universal Print Driver or the driver for a printer that is very close, like the HP 1018.
    Thanks,
    Jeremy

  • Application runs but not as a Windows service oracore

    I have a weird problem and I was hoping somebody might be able to help me. I have an application that we developed that uses an Oracle database. The application can be run in user mode(double clicking on the file) or as a Windows service. We have always used the Oracle Database client to connect to the Database in user mode and it has worked. Using the same configuration we were able to run our application as a service and it has always worked. The problem now is that if we use a newer Oracle Client (>= 10.2) it will not work as a service. When I say it doesn't work I mean that the application never starts and the Windows Event Viewer log states an APPCRASH in oracore10.dll or oracore11.dll.
    It doesn't seem to matter which database we use, 10G, 11G, because if we use the 10.1 version of the Oracle Database Client to connect to these databases it works. However if we use any client>=10.2 the application crashes.
    Any suggestions?
    Edited by: 945875 on Jul 11, 2012 1:45 PM

    So I stopped any Oracle windows services that were running, deleted the only oracle directory on the machine, and reinstalled 11.2 client. The same results occur, I can connect to and start my application in user mode but not as a service. I checked the version# of OCI.dll, 1 instance of it on the machine, and it does state that it is version 11.2.0.1. The setup I have is:
    Machine 1: Server 2008 R2
    Oracle 11g database
    Oracle 11g client
    my application
    Machine 2: Windows 7 64-bit
    Oracle 11g client
    my application
    I get the exact same results if I try to run my application on the same machine as the database (machine 1) or across the network (machine 2).
    I've setup the connection using Oracle Client's Net Configuration Assistant, added the Local Net Service Name Configuration, and am using TCP. At the end of the Local Net Service Name Configuration I get "Success" when talking to the database.
    Thank you for any help you might be able to provide.

  • MFA not working on Windows Server 2012 R2

    Been using MFA since PF days.  Deployed it successfully many times but for some reason it's not working with Windows Auth, Terminal Services on a Win 2012 R2 DataCenter box?  The machine was successfully added to my domain PhoneFactor group, I
    can see and add the machine on the master MFA.  Services are running but when I remote in I go right through without MFA stopping me?  Any ideas?
    TIA

    6.3.0 has just been released and 2012 R2 is *still* not supported. What the hell?!?
    "Version 6.3.0 of the Azure Multi-Factor Authentication Server adds the
      following additional functionality:
    * Added one-way SMS functionality for AD FS, RADIUS and User Portal
    * Added .csv file import for OATH tokens
    * Added support to parse phone numbers in E.164 format during import
      From the directory
    * Fixed problem preventing slave servers from performing MFA if the
      master server was unavailable. This problem was found to exist in
      all 6.2.x builds. All customers running 6.2.x should upgrade to 6.3.
    * Fixed directory sync issue for recursive security groups
    * Added additional logging to AD FS adapter
    * Other minor bug fixes and security improvements
    Known Issues:
    * Windows Authentication for Terminal Services is still not supported for
      Windows Server 2012 R2"
    So they added a whole stack of other functionality, but still didn't get around to taking a look at this bug. I'm stunned. Is there any sort of timeline on fixing this, or is 2012 R2 just going to remain unsupported forever?

  • Flash 10.2 not working in Windows 7 IE8 despite 'successful' installation

    Hi there,
    I downloaded flash player to attempt to view flash media on sites such as bbc website and youtube.
    Despite the installation claiming to be successful, I still cannot view video on any sites I have tried.
    (bbc website says I don't have the correct version, youtube says I need to upgrade)
    My system details are as follows:
    Windows 7 Home Premium, 32-bit operating system
    Internet Explorer 8.0.7600.16385IC  (it makes no mention of being 64-bit)
    Flash Player 10.2.152.26
    I have tried following the troubleshooting guides on the adobe website, particularly 'Flash player does not work in Windows 7'
    but I have not managed to fix the problem.
    I've also gone through several threads on this forum, relating to similar problems, but I'm sorry I haven't been able to fix it.
    So far, the stuff I have tried is listed below, but since it has not worked, I assume I have done something incorrectly, missed something,
    or I have not yet found the right solution.
    The Flash Player does not appear on my programs list, but it does show up in the control panel/list of installed programs.
    I don't know how to get flash player to run on its own, so I can't access settings etc. for the hardware acceleration.
    The folder located at C:\Windows\System32\Macromed\Flash contains 5 files:
    Flash10m.ocx; FlashInstall.log ; FlashUtil10m_ActiveX.dll; FlashUtil10m_ActiveX.exe; install.log
    When I visit the adobe page for testing flash player, it does not show me any animation; there is a blank white rectangle with a tiny red 'X' in its top left corner, which I assume should be a box containing the version information if the player had been recognized.
    I have looked at the IE8 'tools/Manage Add-Ons - 'show' All Add Ons, and there is no listing of  'Shockwave  Flash Object'
    although there is a listing of   'shockwave activeX control' which is enabled.
    I've set my IE8 security settings to medium for the categories of 'Trusted Sites' and 'Internet' and I've made sure to set:
    'Download Signed ActiveX Controls' to 'Prompt'  and 'Run ActiveX Controls And Plug-ins' to 'Enable'
    I've tried unintalling the flash player using the specified tool, removing the adobe download tool, and manual re-installation.
    Finally, I tried (with much hesitation) to modify the registry key referred to in the Flash-Killer or 'kill-bit' guidlines.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}
    The key existed, with a Name: compatibility flags  ; Type: REG_DWORD  ; Data: 0x0000400 (1024)
    So I changed the value from 400 to 000 as suggested.
    This is not worked either, despite uninstalling flash player, re-booting and re-installing.
    Finally, I updated the graphics driver for my ATI RADEON HD 5670 card, but aside from scaring me by drastically altering the screen resolution and not allowing me to roll back the driver, it has unfortunately not solved the flash player problem.
    I appreciate that the people with expertise have given loads of help on this problem, I hope I haven't missed something important when following the advice, but I'm pretty stuck, so if anyone can help, I thank you very much.
    thanks,
    pad

    Hi eidnolb,
    unfortunately, the installation of FP 9.0.280 based on running flashplayer9r280_winax.exe has not worked:
    I cannot see the animation / spinning, there is no animation and no box showing the version.
    (I have included a partial screenshot in this message, file name flashplayer_test_screenshot.jpg)
    Therefore, I did not continue with the instructions.
    The control panel list of programs does show 'Adobe Flash Player ActiveX' as being installed, version 9.0.280.0
    There were no messenger utilites listed in the system tray.
    As you advised, the first thing I did was to modify the {D27CDB6E-AE6D-11CF-96B8-444553540000} registry key value from 400 to 000.
    After modifying the value by making it Zero, I re-started the computer.
    Regarding Administrator Account, I looked on ther 'User Accounts' information, and there is only one user, my dad, and he is listed as Administrator.
    Sorry, but I will need to ask for your further advice. In case it is useful, I tried to get a list of all processes that were running on the computer
    (in case some of them inhibit the installation. most of them don't mean anything to me, even when they are given a description by the windows 7 Task Manager Processes List - I have pasted the text file below in this post, since I couldnt see how to attach files.)
    thank you for your help,
    pad2001
    Image Name                     PID Session Name        Session#    Mem Usage
    ========================= ======== ================ =========== ============
    System Idle Process              0 Services                   0         24 K
    System                           4 Services                   0        956 K
    smss.exe                       312 Services                   0        880 K
    csrss.exe                      456 Services                   0      3,328 K
    wininit.exe                    528 Services                   0      3,736 K
    csrss.exe                      536 Console                    1      6,104 K
    winlogon.exe                   592 Console                    1      5,288 K
    services.exe                   632 Services                   0      7,200 K
    lsass.exe                      640 Services                   0      9,380 K
    lsm.exe                        652 Services                   0      3,436 K
    svchost.exe                    760 Services                   0      7,008 K
    svchost.exe                    856 Services                   0      5,832 K
    atiesrxx.exe                   920 Services                   0      3,376 K
    svchost.exe                    988 Services                   0     16,176 K
    svchost.exe                   1028 Services                   0     51,320 K
    svchost.exe                   1068 Services                   0     28,928 K
    audiodg.exe                   1156 Services                   0     15,976 K
    svchost.exe                   1200 Services                   0     12,432 K
    svchost.exe                   1316 Services                   0     11,852 K
    atieclxx.exe                  1408 Console                    1      4,956 K
    wisptis.exe                   1432 Console                    1      6,512 K
    AvastSvc.exe                  1552 Services                   0     22,832 K
    wisptis.exe                   1792 Console                    1      8,360 K
    TabTip.exe                    1804 Console                    1     10,448 K
    dwm.exe                       1892 Console                    1     29,420 K
    explorer.exe                  1940 Console                    1     53,728 K
    RtHDVCpl.exe                   336 Console                    1      8,688 K
    AvastUI.exe                    328 Console                    1      4,060 K
    sidebar.exe                    476 Console                    1     36,108 K
    spoolsv.exe                   2264 Services                   0      9,464 K
    taskhost.exe                  2272 Console                    1      6,072 K
    svchost.exe                   2332 Services                   0     11,252 K
    svchost.exe                   2524 Services                   0     12,836 K
    PsiService_2.exe              2572 Services                   0      3,052 K
    SeaPort.exe                   2616 Services                   0      7,908 K
    WLIDSVC.EXE                   2684 Services                   0      9,104 K
    SearchIndexer.exe             3104 Services                   0     19,096 K
    WUDFHost.exe                  3244 Services                   0      5,468 K
    WLIDSVCM.EXE                  3372 Services                   0      2,644 K
    wmpnetwk.exe                  3452 Services                   0      3,772 K
    notepad.exe                   3600 Console                    1      6,096 K
    svchost.exe                   3876 Services                   0     11,480 K
    iexplore.exe                  2936 Console                    1     29,228 K
    iexplore.exe                  3640 Console                    1     59,180 K
    wltuser.exe                   3704 Console                    1     10,016 K
    dllhost.exe                   2480 Services                   0      5,000 K
    svchost.exe                   2680 Services                   0     21,228 K
    InputPersonalization.exe      3180 Console                    1      1,440 K
    wuauclt.exe                    116 Console                    1      5,516 K
    taskmgr.exe                   3204 Console                    1      9,052 K
    iexplore.exe                  1872 Console                    1    112,188 K
    cmd.exe                       1048 Console                    1      2,936 K
    conhost.exe                   3012 Console                    1      5,200 K
    tasklist.exe                  4300 Console                    1      4,664 K
    WmiPrvSE.exe                  4340 Services                   0      5,352 K

  • ACROBAT XI - DOES NOT WORK WITH WINDOWS VISTA

    WHY DOESN'T THE COMPANY STATE ACROBAT XI PRO DOES NOT WORK WITH WINDOWS VISTA.
    THE COMPANY NEEDS TO WARN PEOPLE.  THE ACROBAT TECH SUPPORT FINALLY FIGURED OUT THAT IT'S NOT COMPATIBLE WITH WINDOWS VISTA.

    The Acrobat website and the box lists the compatible OSs. You want Adobe to list all of the incompatible OSs---going back how far.
    Acrobat XI Pro system requirements
    These system requirements are for Adobe® Acrobat® XI Pro software, v11.0. Because system requirements change with each software update, refer to the Release Notes for your software version for the latest information on supported operating systems and browsers.
    Windows
    1.3GHz or faster processor
    Microsoft® Windows® XP with Service Pack 3 for 32 bit or Service Pack 2 for 64 bit; Windows Server® 2003 R2 (32 bit and 64 bit); Windows Server 2008 or 2008 R2 (32 bit and 64 bit); Windows 7 (32 bit and 64 bit); or Windows 8 (32 bit and 64 bit)
    512MB of RAM (1GB recommended)
    1.85GB of available hard-disk space
    1024x768 screen resolution
    DVD-ROM drive
    Internet Explorer 7, 8, 9, or 10; Firefox Extended Support Release; or Chrome
    Video hardware acceleration (optional)
    Note: For 64-bit versions of Windows Server 2003 R2 and Windows XP (with Service Pack 2), Microsoft Update KB930627 is required.

  • My wifi driver is not working with windows 8.1 in my MBA2013?

    My wifi driver is not working with windows 8.1 in my MBA2013?
    i installed windows 8.1 with bootcamp, everythigs seems to be working fine except the wifi,
    please help me to solve this problem,,
    thanks

    neokenchi wrote:
    hi erabbath,
    Welcome to the Forums.
    If you have the Intel Centrino N2230 Wireless + Bluetooth adapter, can you try to:
    1. Navigate to the Control Panel (large icon view) > Devices and Printers and try to pair a bluetooth device (i.e. Bluetooth Headset) and observe if it gets detected under the device list.
    2. If the Bluetooth Headset is listed but it's not working try toright click on it > choose Properties. On the bluetooth properties Window, go to the Services Tab and check all the appropriate bluetooth services.
    Sample picture
    Let me know your findings.
    Regards
    Thank you very much for your answer,
    I went to Control Panel  > Devices and Printers and i tried to add a new device as the bluetooth doesn't appear this is what i got. By the way the bluetooth was on.
    Link to picture
    And this is what i have on the Bluettoth
    And it search endlessly whereas before the upgrade it was working properly,
    All the drivers are up to date as well as windows updates are all installed
    Thanks in advance for your help
    Regards
    Moderator note; picture(s) totalling >50K converted to link(s) Forum Rules

  • ITunes stopped working after Windows Service Pack 2

    Maybe it's a coincidence, but I've been having all sorts of problems loading the latest iTunes version (64-bit) ever since I downloaded (not by choice) WIndows Service Pack 2.
    iTunes just won't open.
    First it would open and say that the color scheme had been changed by some setting somewhere.
    Then it wouldn't open at all.
    I've fooled around with permissions and compatibility settings -- I've reinstalled the latest iTunes for WIndows 64-bit -- and iTunes just will not load.
    I've seen some evidence online that I'm not alone in this problem, though it's hard to tell.  The solutions I've seen seem to be a bit complicated -- does anyone have any information on this problem or am I going to have to go back to an Apple computer if I want to continue using iTunes???
    Thanks for any help. 
    B
    PS For now I've got to leave on a 4 -hour trip for which I'll have no music thanks to this problem -- so any and all help will be greatly appreciated.

    Roll back the service pack.(uninstall software through control panel.)  Does it work again? 
    Reinstall service pack.  Make sure antivirus and all other software is not running in background.  Reboot.

  • ActiveX control is not working with windows NT

    I've have a stand alone application which uses an activeX control.  The application was compiled using Labview 7.1 on a Windows XP machine.  The application will run without any problems on Windows XP and Windows 2000, however the activeX control will not work with Windows NT 4.0.  The activeX control is registered, and I have also compiled the application on a Windows NT 4.0 machine.  I do not receive any error messages, the application will start but will not communicate with the activeX control.  Does anyone have any suggestions?  

    Hello,
    Have you tired running the VI by itself (not exe) on the NT machine? Make sure you are doing adequate error checking in your code. It could be possible that the application is generating an error which in not handled appropriately. Also which service pack do you have installed on the NT machine? Please look at the release notes for LabVIEW 7.1 here.  
    Regards,
    Chetan K
    Application Engineer

  • Internet Explorer, Chrome, or Firefox are not working in Windows 8

    Internet Explorer, Chrome, or Firefox are not working in Windows 8

    I found this on another forum and it worked for me.
    This problem usually has to do with TCP/IP or Winsock requiring a reset.
    Winsock entries tells Windows 7 how to access your network services. Additionally, your TCP/IP protocol can
    be corrupted. The TCP/IP protocol is a stack of 4 layers that includes several transport layers, but when this stack is corrupt you will constantly have connectivity issues.
    You need Admin access to enter the codes below. Windows button + x, then choose Command Prompt (Admin)
    netsh winsock reset catalog (reset winsock entries)
    netsh int ip reset reset.log hit (reset TCP/IP stack)
    You may have to reinstall Chrome and Firefox or reboot to have the chnage take place.
    Hi,
    This seems to be the only solution to my problem, however this is temporary. Any advice on a more permanent resolution?
    I have also tried  to disable  "Automatically detect settings" under: "Internet Options/Connections/LAN settings/Automatically
    detect settings".
    This has no affect.
    Thanks,

  • NSU not working on Windows Vista

    For your information, NSU will not work on Windows Vista. When it is trying to download the update package, it failed.
    On another, older, Windows XP machine, my update works fine!

    lol ive got vista ultimate & i can download from NSU. Right click NSU --> Properties --> Compatiblilty --> Compatiblilty Mode Select Windows XP Service Pack 2.
    &Disable Antivirus/Firewall.
    There you have NSU working on Vista!
    If you find my post useful then click on
    Kudos!Nokia N96 (v20.050 / RM-247)
    www.shaysoft.net | Competitions!

  • Exporting Crystal Report to HTML is not working in Windows 7

    Hi Sir,
    I am trying to export Crystal Report to HTML format using VB.NET code. Functionality is working fine at Windows XP Environment (Save to Disk, Open an Application and Email Attachment). But the same functionality is not working at Windows 7 Environment (both 32-Bit as well as 64-Bit).
    Below is the code to Exporting Crystal Report to HTML in VB.NET.
    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions
    Dim CrFormatTypeOptions          As New HTMLFormatOptions
    Dim vFormat As Integer
    Dim CrExportOptions As New ExportOptions
    Dim vRdReport As New ReportDocument
    Dim sfd As SaveFileDialog
    Dim vFileName As String = Nothing
    vRdReport = vRptSource
    sfd = New SaveFileDialog
    If Not (vRptPath = "") Then
        sfd.InitialDirectory = vRptPath
    End If
    sfd.Filter = "Webpage, Complete(.htm;.htm)|.htm|Web Archive, Single file(.mht)|.mht|Webpage, HTML only(.htm;.html)|.html"
    If sfd.ShowDialog = DialogResult.OK Then
        ' Set the disk file options.
         CrDiskFileDestinationOptions.DiskFileName = sfd.FileName.ToString()
    Else
         Return
    End If
    CrExportOptions = vRdReport.ExportOptions
    CrFormatTypeOptions.HTMLFileName = vFileName
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLHasPageNavigator = True
    CrFormatTypeOptions.UsePageRange = True
    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = ExportFormatType.HTML32
                        .DestinationOptions = CrDiskFileDestinationOptions.DiskFileName
                        .FormatOptions = CrFormatTypeOptions
    End With
    vRdReport.Export()
    Catch ex As Exception
            MsgBox(ex.ToString)
    End Try
    Code working fine at Windows XP, But it is not woking in Windows 7 environment.
    Please can anyone share your valuable thoughts or ideas reg. this.
    Thanks in Advance
    Deivanayaga Perumal D.

    user13509659 wrote:
    Run this code to reproduce the issue.Which issue?
    It looks like inheritance is broken in the component hierarchy for JFrame in Windows 7 JDK 1.6.0_23-b05. The only thing remotely related to inheritance in your code snippet is the WindowListener, which does little. See camickr's advice about built-in exit management.
    EDIT - using the post title as a clue, I realize you may be talking about the component hierarchy, and whether the contentPane's background is visible through the upper layers. Instead of guessing, I'd prefer you describe your "issue" accurately (observed vs expected behavior).
    Edited by: jduprez on Feb 10, 2011 1:01 PM

  • APPLE mouse & keyboard not working with Windows (Bootcamp)

    I installed Leopard and Windows XP on my Mac Pro. The installation went very smoothly. Only problem I have is that my Apple wireless keyboard and mouse do not work on Windows (frozen) although they work fine on Leopard. I tried a Logitech wireless trackball and it works fine on both Windows and Leopard. Any suggestion?

    Thanks. I upgraded from Tiger and downloaded Bootcamp from Leopard Installation disc ( I did not have a beta version ). I then installed Windows XP SP2 ( brand new, just bought for that purpose ). Wonder if Mac wireless keyboard and mouse are compatible with Window. Everything else work beyond my expectation.

  • Flash player does not work in Windows 8 tiles

    Flash player does not work in Windows 8 start metro tile applications. Flash player also does not work in Windows 8 start tile internet explorer 10 1n windows 8. Flash player does work in Windows 8 desktop internet Explorer 10. I tried all of the recommended fixes suggested by adobe Flash Player Issues/windows 8 page. I have reinstalled Windows 8 operating system.  What should I try next?

    This is a known issue with Flash Pro CC - GM build.
    this crash has been fixed in the update that was released recently. Please update to 13.0.1.808 version and it should fix this.
    Please reply if it still persists after the update.
    -Sujai

Maybe you are looking for