On Windows 8, when card reader is unplugged then plugged, SCARD_E_SERVICE_STOPPED occurs

On Windows 8, the Windows service “Smart card” automatically shuts down when all smart card readers are removed. This service starts again when a card reader is connected.
This is the core reason for the bug described at https://bugs.openjdk.java.net/browse/JDK-8026326 when a card reader is removed, then plugged again:
javax.smartcardio.CardException: list() failed
at sun.security.smartcardio.PCSCTerminals.list(PCSCTerminals.java:109)
at javax.smartcardio.CardTerminals.list(CardTerminals.java:55)
If you have a look in PCSCTerminals.java (http://www.docjar.com/html/api/sun/security/smartcardio/PCSCTerminals.java.html)
   44   // SCARDCONTEXT, currently shared between all threads/terminals
   45   private static long contextId;
The property contextId is statically defined once during class loading for whole JVM.
   56   contextId = SCardEstablishContext(SCARD_SCOPE_USER);
Then, the same value of contextId is used by the method list():
   80   String[] readerNames = SCardListReaders(contextId);
But... on Windows 8, the Windows service Smard Card stops when the OS detects that no any card reader remains connected. This service start again when at least one reader is connected. After a stop and start of this service, the value of contextId becomes valid.  The list() method should call SCardEstablishContext if SCARD_E_SERVICE_STOPPED exception occurs.
Could Oracle apply needed changes in order to solve this bug JDK-8026326 ?
I can provide you with smart card reader if needed...
Best regards,
Rodolphe.

Small correction:
After a stop and start of this service, the value of contextId becomes invalid.

Similar Messages

  • Upgraded to LR 5, but LR 4 still opens when card reader attached.

    I have unchecked the box for "Show import dialogue when memory card is attached" in LR 4 and checked it in LR 5, but LR 4 is still opending every time when I insert a card in my card reader.  Thanks for the help!

    If you are on a Mac, launch Image capture and check that no application is set to launch when a memory card is detected.
    When Lr4 launches does Lr5 launch too?
    What happens if you deselect the option in both cases, then restart the machine?
    Next I would try deletingthe preferences for one or both versions.
    Details on how to do that can be found here:
    http://www.lightroomforums.net/showthread.php?14226-Resetting-(or-Trashing-)-the-Lightroom -Preferences-file

  • Mac Pro 2x2.8 quad will not power on unless I unplug, then plug-in power cable, why?

    It is a 2x2.8 Quad Intel Mac pro, 8GB Ram, 8800 GT Video Card (running dual monitors), 10.6.8, Dual Internal HD (150/250), Single external HD (1TB), Dual Internal Burners (DVD - Stock/Blu-Ray - Pioneer), no PCIe cards installed.
    I installed a brand new power supply thinking that was my issue, but it still does not power on after an extended period (1/2 hour or so) of being shut-off. It also at times will shut itself off after periods of inactivity even though it is set to never go to sleep, nor are the HD's set to sleep when possible.
    One clue to give is that it IS set to restart after power failure. So when I go to press the button to turn the puter on and it is non-responsive, I then unplug and plug the power cable back in to the rear of the puter: it automatically starts-up as if there was a power failure.
    The other possible clue I have is that my bluray burner is connected via SATA cable to one of the 2 open SATA connectors on the Motherboard. It only has issues when the hard drives ARE set to sleep when possible. When they are awoken, the drive is no longer listed as present. Meaning I cannot open the drive drawer. ;(
    I am thoroughly upset about this.
    Benjamin

    It is a 2x2.8 Quad Intel Mac pro, 8GB Ram, 8800 GT Video Card (running dual monitors), 10.6.8, Dual Internal HD (150/250), Single external HD (1TB), Dual Internal Burners (DVD - Stock/Blu-Ray - Pioneer), no PCIe cards installed.
    I installed a brand new power supply thinking that was my issue, but it still does not power on after an extended period (1/2 hour or so) of being shut-off. It also at times will shut itself off after periods of inactivity even though it is set to never go to sleep, nor are the HD's set to sleep when possible.
    One clue to give is that it IS set to restart after power failure. So when I go to press the button to turn the puter on and it is non-responsive, I then unplug and plug the power cable back in to the rear of the puter: it automatically starts-up as if there was a power failure.
    The other possible clue I have is that my bluray burner is connected via SATA cable to one of the 2 open SATA connectors on the Motherboard. It only has issues when the hard drives ARE set to sleep when possible. When they are awoken, the drive is no longer listed as present. Meaning I cannot open the drive drawer. ;(
    I am thoroughly upset about this.
    Benjamin

  • IPhoto by Default opens when card reader is attached?

    I would like to find out how to disable iPhoto from automatically opening when ever a memory card is inserted into the reader.

    Lillanne,
    You can stop this by opening Image Capture in your Applications folder. Go into its Preferences under the General tab and change the: "When a camera is connected, open:" to No Application.
    Hope this helped!
    Sam

  • My iphone 4 won't turn on and when on charge i unplug and plug in it makes noises but it still won't go on.

    i was on settings and i was clicking on a app so i could remove but then it froze well not froze something would pop up and then go when i turned the off button it didnt go off for a while then it went off and my iphone was charging when i clicked the top button it wont go on help??

    Hi iphone44ever,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/ts3281
    Cheers,
    - Judy

  • Bluetooth adapter issue after being unplugged then plugged back in

    I am running 10.7.4, MacBook Pro 2 GHz Intel Core i7, 16 GB Ram, Thunderbolt Display with Apple wired Keyboard and Apple Magic Mouse.
    Initial issue:
    After using the Magic Mouse for a few months I noticed a significant performance issue with the mouse when the internal hard drive would spin up for large data transfers, Time Machine backups, etc.  I spoke with Apple Care and tried a number of things, tried switching the wireless network, all with no sign of a fix in the future.  I paired the mouse with other computers and could never re-create the issue.  I also paired other Bluetooth mice with the laptop and could not re-create the issue.  After doing further research I found a number of people on-line that started to use an external Bluetooth adapter which would bypass the internal one.  After purchasing one from Amazon, the results were immediately superior.  I had plugged the adapter into the underside of my Apple wired keyboard and performance was as expected.
    However, this has led to issue number 2:
    My MacBook Pro will travel with me often therefore requiring me to unplug it from my "desktop" setup which is it plugged into a Thunderbolt Display, and the display has all of the peripheral plugged in including the wired keyboard with the external Bluetooth dongle plugged into it.  When I have had my computer away form the set up for a few hours/days and then come back to plug it in, all external devices work immediately with the exception of the magic mouse.  It will sometimes work fairly quickly, within a minute of plugging into the Thunderbolt display, and sometimes I am unable to make it work at all unless I restart the machine.  This issue has happened with and without the Thuderbolt display.  Any assistance is greatly appreciated.  Thanks!

    Never got a green light.. does that mean no light at all.. or is it flashing amber??
    The series 1 particularly but it happens in series 2 and 3 the TC power supply breaks. Then if you power down and turn it on again it is dead. No light at all. The power supply was on the edge and after powering off does not have the ability to supply start current to the TC so shuts down.. If you plug in after a while the light my flash briefly and go out.. it will not happen again until you wait a few hours for the caps to discharge.
    If you have Apple Care on a computer and the TC is less than 3years old Apple will replace it.. otherwise you are joining a large and ever growing multitude of dead TC owners.
    See repair possibilities or repairer list here.
    http://sites.google.com/site/lapastenague/a-deconstruction-of-routers-and-modems /apple-time-capsule-repair

  • My Iphone 3GS won't connect to itunes, recovery mode won't work, only charges from wall charger when you turn it off then plug it in

    I actually have the phone now in recovery mode, it's got the screen up, and I have it plugged in, and nothing's happening. I know the cable isn't screwed, because I use it to charge all the time.

    Hi dontloseimagination,
    Thanks for visiting Apple Support Communities.
    If your iPhone is not recognized by iTunes, try these steps on your Mac or PC first:
    iOS: Device not recognized in iTunes for Mac OS X
    http://support.apple.com/kb/ts1591
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    You may also find the steps in this article helpful:
    iOS: Troubleshooting USB-related alerts when syncing
    http://support.apple.com/kb/TS5254
    Best,
    Jeremy

  • Unplug , then plug in all the time

    why do I have to do that everyday to get PC to work? THANKS

    I assume that the physical connections you have there is fine, meaning cables are plugged in where they should be.
    I suggest you upgrade the firmware of your linksys router. Go to www.linksys.com/kb search for upgrade firmware answer ID.

  • How do you use a memory card reader on a Macbook?

    I have a Finepix camera and put the memory card into a memory card reader, which I then plugged into my Macbook. A little red light is flashing on the memory card reader but no icon or anything has come up on my Mac screen. Help!?

    oh ok.  Open finder, click on preferences, and make sure external disks is checked under "general"

  • Importing into Lightroom with card reader doesn't show previews

    I am using Lightroom 2.4 with Adobe 5.4 Raw on a Windows XP based laptop -- however the problem I am having also presents on my desktop which also uses Lightroom 2.4 with Adobe 5.4 and Windows XP.  In fact the issue is completely the same on both computers:   When I try to import photos directly into Lightroom using a card reader, the interface opens, but does not show the previews -- and yes, the show preview box is checked.  The preview boxes are there, but they are completely greyed out.  If I use the same card reader but direct it to open into Photoshop Elements it shows the previews and it also shows them in Bridge for CS4. So clearly the problem doesn't lie with the computer or card or cardreader.   It seems only in Lightroom that the previews do not show up.  Adobe raw supports my camera which is set to shoot raw and it also makes a JPG copy, but neither show up.
    I spent more than an hour with a tech trying to get this to work and didn't solve the problem.  I'm hoping that someone has some bright ideas that will help me out.
    Phyllis Perkins

    I tried to respond before, but I think the message didn't go through.  Sorry.  Because my Lightroom hasn't been working the way it is supposed to, I have been doing what you suggest -- saving the photos from my card reader to a file through Bridge -- which does open the previews -- and then importing them to Lightroom.  But it means one extra step and Lightroom's strength is supposed to be work flow, so I would like to get it to work properly.  I think that if the card reader were faulty -- and the problem occurs with several different card readers -- that it wouldn't show the previews in Bridge or even Photoshop Elements, which it does.  So I think there is some problem with Lightroom, not the card reader.  Any other suggestions?  I'd be happy to know about them.  Meanwhile, thanks for your reply.
    P

  • Card reader driver for Satellite M30X-134

    Hello,
    where can I find the flash card reader driver for my M30x-134? None of the support page seems to make it and i cannot find out who is the manufactor.
    Thank you,
    Patrick

    Thank you for your advises. Unfortunately I still cannot find the driver. On the canadian site i was able to download some files called "SD Format" and "SD Driver Set", but Windows XP didn't accept them. I have in mind that this is a 6-in-1 card reader, so it should support more formats then the SD. There are two unknown entries in the Device manager, both are called "PCI FLASH-MEMORY". When i started the notebook for the first time (with OEM Windows XP) the card reader worked. Now i have an own license installed which didn't come with the notebook. Could this be the reason? Does anyoneone know who is the manufactor of the build-in card reader?

  • CAC card reader now works in Mac OS....

    I finally got my CAC card reader to work in MAC OS. I used the scr3310 reader and MAC OS driver.
    Now I need to find a Remote Desktop Connection (RDC) that can use the CAC reader. I have tried both 1.0.3 and 2.0.1 with no success.
    Has anyone successfully used a RDC in MAC OS?
    Thx !!
    Mike

    The MS RDP does not yet implement SmartCard enabling (which really ***** as the MS product seems pretty well done otherwise). I got CAC (via VPN) working using RDESKTOP via the installation procedures posted by TRON in August, 2008 under the topic heading "MS Remote Desktop and smart card reader". TRON's procedure makes the appropriate modification to the CONFIGURE file during the build and uses the OpenSource (SourceForge) implementation of RDESKTOP <rdesktop.sourceforge.net>, aka, <www.rdesktop.org>.
    Here is a recap of TRON's procedure:
    =====================================================
    CARD READER ACTIVATION
    1.) Plug in your card reader
    2.) Open Terminal and run this command:
    sudo pcsctool
    3.) When prompted, enter your admin password. You should see:
    Select the approprate token driver:
    1. commonAccessCard.bundle
    2. GSCISPlugin.bundle
    3. mscMuscleCard.bundle
    4. slbCryptoflex.bundle
    Enter the number:
    4.) Type "1" (without quotes) and press enter, and you should see something like:
    Insert your token in: OmniKey CardMan 3121 00 00
    Token support updated successfully !
    5.) Keep your card reader plugged in and use rdesktop install instructions
    RDESKTOP INSTALL
    1. Make sure Xcode Tools is installed on your computer. It should be on your OS X install disk.
    2. Find out where your X11 libraries are located:
    -From the Finder menu, selct "Go" >> "Go to Folder..."
    -Type (without the quotes) "/usr/X11", and click "Go"
    You should see a bunch of folders. Make sure the "include" and "lib" folders are there. Otherwise you need to find out where the X11 "include" and "lib" folders are located on your computer.
    3. Download rdesktop and place the (unarchived) rdesktop-1.6.0 folder on your Desktop
    4. Open the X11 application (should be in your Utilities folder)
    5. In the X11 window type the following (without the quotes):
    "cd Desktop/rdesktop-1.6.0 && ./configure --enable-smartcard -x-includes=/usr/X11/include -x-libraries=/usr/X11/lib && make && sudo make install"
    4. Hit enter. When prompted, enter your administrator password and hit enter.
    rdesktop should now be installed in the following folder:
    /usr/local/bin
    So, to launch rdesktop with smartcard log in enabled, open the X11 application (or Terminal application) and type the following (without the quotes, and replace your.server.address with the server address):
    "cd /usr/local/bin && ./rdesktop -r scard your.server.address"
    Hit enter and it should launch a new X11 window that will try to access the remote server where you should be prompted for your PIN.
    To explore more options with rdesktop, open X11 and type the following (without quotes):
    "cd /usr/local/bin && ./rdesktop"
    Hit enter and you should get a list of options available to rdesktop.
    =========================================================
    TRON's procedure works. I tried to get it working using the MACPORTS (formerly DarwinPorts) <www.macports.org> implementation of RDESKTOP. It actually uses the same OpenSource implementation, but the build procedures are completely different. The MACPORTS implementation would build properly and run. But I could not get the build to enable SmartCard. I tried modifying the PORTFILE by adding a new variant call that according to SourceForge (ticket#20664) should work:
    variant smartcard description {enables smartcard forwarding} {
    configure.args-append --enable-smartcard
    It probably does work if you can get the CONFIGURE file appropriately. The variant call in the PORTFILE apparently does not do that modification on its own. MACPORTS builds and installs the various software "ports" (including RDESKTOP) by on-the-fly pulling the information form the TAR file into a temporary workspace. So you have to (somehow) make the modification happen as the CONFIGURE file is pulled into temporary workspace. I have not yet figured it out.
    The advantage of the MACPORTS implementation is that there is a simple uninstall script built into all of the software "ports". The SourceForge version of RDESKTOP has no such uninstall capability (that I can find) built in. I would, therefore, prefer to use the much more elegant MACPORTS implementation, which leads to my two questions:
    1. Has anybody found a straightforward procedure to enable SmartCards/CAC during the build of the MACPORTS version of RDESKTOP?
    2. How do I safely and cleanly uninstall the non-MACPORTS <SourceForge.org> version of RDESKTOP?

  • How to authenticate card reader? (urgent !!!)

    hallo everybody,
    we are working on java cards.......But we are aware from establishing secure session in between card reader and card.....
    the things which we knows are 1) when card authenticates the card reader it is "External Auth"
    2) when card reader authenticates the card it is "Enternal Auth."
    please can anyone help me how it takes place? and the what is the actual mechanism takes place
    while authentication?
    * Which keys are used?
    *How computation takes place?
    Any regarding information is invitable.....
    please....Its urgent!

    This is covered in detail in the Global Platform Secure Channel Protocol 01 specifications.
    1. application issues an INIT_UPDATE specifying which keyset to use
    2. Card returns card-cryptogram
    3. application calculates a card-cryptogram to match the card card-cryptogram using shared secret(keyset)
    4. application issues an EX_AUTH with MAC'd data

  • Photo Card Reader

    Could somebody tell me if there is a card reader to suit the Fifth Gen.Ipod here in Aus. or the USA
      Windows ME  

    By card reader do you mean a memory card from a digital camera or the like?
    The closest you could probably get is the usb camera connector.
    I believe there used to be a Belkin card reader for the iPod, but I don't think it's compatible with the newest iPods, so Apple doesn't sell it anymore.

  • Problem writing to SD card in Ricoh card reader

    I have a Gateway 4540GZ laptop with a Ricoh card reader. Whenever I plug in an SD card, it recognizes it as usual. But it won't let me write data in dd, gnome-disks, gparted, caja, et cetera. So I remove it and flip the lock switch to lock, plug it in, and I can't write any files, but I can write data in dd, gnome-disks, and gparted. Thinking it was because I was using an 8GB SDHC card, I swap it for a 2GB SD card and I get the same results. What am I doing wrong?
    Last edited by Bolt473 (2013-11-15 04:19:52)

    Hello!
    I have the same type of problem so I post there.
    I' try to write on a file on the SD card, and if I don't open and close the file on the loop, there's only one line writed.
    Unfortunately, on my application, I have to read the measure and write them on a file quickly than 10 ms and if I open and close the file each time, writing part take too long.
    Is there a tip to resolve this?
    Regards,
    Cédric

Maybe you are looking for