Hello all,
I have some problems trying to reset a card. The only method I see is
CardTerminal.reset(SlotChannel).
To get the CardTerminal, I get the CardService first, then the CardChannel
and finallyCardTerminal. (is there any more intelligent and no deprecated
way?)
PassTrhuCardService
ptcs=(PassThruCardService)sc.getCardService(PassThruCardService.class,
true);
CardTerminal cterm=ptcs.getCardChannel().getCardTerminal();
But when calling CardService.getCardChannel() I get this trace error:
[CRITICAL ] opencard.core.event.EventGenerator.updateCards
--- throwable java.lang.NullPointerException:
at jpt.ocf.ControlTarjeta.println(ControlTarjeta.java:490)
at jpt.ocf.ControlTarjeta.resetearTarjeta(ControlTarjeta.java:256)
at
PruebaControlTarjeta$Listener.tarjetaInsertada(PruebaControlTarjeta.java:56)
at jpt.ocf.ControlTarjeta.tarjetaInsertada(ControlTarjeta.java, Compiled
Code)
at jpt.ocf.ControlTarjeta.access$3(ControlTarjeta.java:384)
at jpt.ocf.ControlTarjeta$Listener.cardInserted(ControlTarjeta.java:460)
at opencard.core.event.EventGenerator.updateCards(EventGenerator.java,
Compiled Code)
at
opencard.core.terminal.CardTerminalRegistry.cardInserted(CardTerminalRegistr
y.java:281)
at opencard.core.terminal.CardTerminal.cardInserted(CardTerminal.java:577)
at
com.gemplus.opencard.terminal.GemplusSerialCardTerminal.poll(GemplusSerialCa
rdTerminal.java, Compiled Code)
at opencard.core.event.EventGenerator.run(EventGenerator.java, Compiled
Code)
at java.lang.Thread.run(Thread.java:479)
--- thread Thread[Thread-0,5,main]
--- source class opencard.core.event.EventGenerator
[DEBUG ] opencard.core.event.EventGenerator.updateCards
--- message notified CTListeners
--- thread Thread[Thread-0,5,main]
--- source class opencard.core.event.EventGenerator
...
Could anyone give me a working method to reset a card?
One more thing. In the documentation (OCF1.2) of class CardID, it says
int getSlotID()
Deprecated. use getSlotID() instead
But, of course, getSlotID() is also deprecated because is the same method
:).
Thanks,
Jes�s Pa�l
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.