-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Working with Windows 11.
- I read an ID card using the example code
try {
final BeIDCard card = beIDCards.getOneBeIDCard();
// -------------------------------------------------------------------------------------------------------
// read identity file, decode it and print something containing card
// holder's first name
// -------------------------------------------------------------------------------------------------------
try {
final byte[] idData = card.readFile(FileType.Identity);
final Identity id = TlvParser.parse(idData, Identity.class);
System.out.println(id.firstName + "'s card");
} catch (final Exception ex) {
// TODO Auto-generated catch block
ex.printStackTrace();
}
// -------------------------------------------------------------------------------------------------------
// wait for removal of the card we've just read.
// -------------------------------------------------------------------------------------------------------
System.out.println("Please remove the card now.");
beIDCards.waitUntilCardRemoved(card);
System.out.println("Thank you.");
} catch (final CancelledException cex) {
System.out.println("Cancelled By User");
}
This works.
2) I pull out the card reader
3) This appears in the logs:
Wed Jan 22 17:03:49 CET 2025 Cannot wait for card terminal changes (no PCSC subsystem?): list() failed
Wed Jan 22 17:03:49 CET 2025 no card readers connected?
Wed Jan 22 17:03:49 CET 2025 cause: SCARD_E_NO_READERS_AVAILABLE
Wed Jan 22 17:03:49 CET 2025 cause type: sun.security.smartcardio.PCSCException
Wed Jan 22 17:03:49 CET 2025 cleared
Wed Jan 22 17:03:49 CET 2025 subsystem not initialized
Wed Jan 22 17:03:49 CET 2025 Smart card service is on failure. Trying to reload the JDK SmartCard service.
Exception in thread "CardAndTerminalManager" java.lang.reflect.InaccessibleObjectException: Unable to make field private static long sun.security.smartcardio.PCSCTerminals.contextId accessible: module java.smartcardio does not "opens sun.security.smartcardio" to unnamed module @1989d2f7
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
at be.fedict.commons.eid.client.impl.CardTerminalsProxy.reloadSmartCardService(CardTerminalsProxy.java:98)
at be.fedict.commons.eid.client.impl.CardTerminalsProxy.doList(CardTerminalsProxy.java:81)
at be.fedict.commons.eid.client.impl.CardTerminalsProxy.list(CardTerminalsProxy.java:58)
at be.fedict.commons.eid.client.CardAndTerminalManager.handlePCSCEvents(CardAndTerminalManager.java:412)
at be.fedict.commons.eid.client.CardAndTerminalManager.run(CardAndTerminalManager.java:395)
at java.base/java.lang.Thread.run(Thread.java:840)
The application is now stuck. Is it possible the reloadSmartCardService solution does not work anymore in Windows 11?
Thank you,
Daan
Metadata
Metadata
Assignees
Labels
No labels