Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java aplication not able to detect card reader sometimes

843851Jul 9 2010 — edited Jul 28 2010
Hi

We have a Java application (jre1.6.0_05.) which runs as window service under "Local System". It tries to detect card reader after every one minute. Normally it is working fine. However on some machines (which can be Windows XP, 2003 Server etc) some times it is not able to detect Card Reader, while other applications (which are not Java based) are able to detect. Sometimes service restart helps in solving the issue, but it reoccurs again after few hours/days.

Below is the exception we get:

javax.smartcardio.CardException: list() failed
at sun.security.smartcardio.PCSCTerminals.list(PCSCTerminals.java:109)
at javax.smartcardio.CardTerminals.list(CardTerminals.java:55)


Below is the code we are using to get list of terminals:
TerminalFactory factory = TerminalFactory.getDefault();

try {

terminals = factory.terminals().list();

} catch (CardException e) {

e.printStackTrace();

}
Any idea what might be causing this random problem?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2010
Added on Jul 9 2010
6 comments
1,701 views