I started a project "eidreader", an applet to read the publicly available information (name, birth date, national id,...) on electronic ID cards of different countries and make them accessible to the Javascript code of a web page. Currently supported countries are Estonia and Belgium. The Belgian reader uses some part (the TLV parser) from eid-applet. It still fails due to the following problem.
How to reproduce:
you need a Belgien eID card and a card reader
eid-applet must be in your classPath
open the file applets/eid_test.html in your browser
confirm security warning
Insert your card and click on "Click here after having inserted your eID card"
Result: the Java console then shows the following traceback:
java.lang.RuntimeException: error parsing file: be.fedict.eid.applet.service.Identity
at be.fedict.eid.applet.service.impl.tlv.TlvParser.parse(TlvParser.java:58)
at src.eidreader.BelgianReader.<init>(EIDReader.java:275)
at src.eidreader.EIDReader.readCard(EIDReader.java:447)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sun.applet.PluginAppletSecurityContext$4.run(PluginAppletSecurityContext.java:670)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.PluginAppletSecurityContext.handleMessage(PluginAppletSecurityContext.java:667)
at sun.applet.AppletSecurityContextManager.handleMessage(AppletSecurityContextManager.java:68)
at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:235)
at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:78)
Caused by: java.lang.NumberFormatException: For input string: "01.JUN."
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at be.fedict.eid.applet.service.impl.tlv.DateOfBirthDataConvertor.convert(DateOfBirthDataConvertor.java:54)
at be.fedict.eid.applet.service.impl.tlv.DateOfBirthDataConvertor.convert(DateOfBirthDataConvertor.java:33)
at be.fedict.eid.applet.service.impl.tlv.TlvParser.parseThrowing(TlvParser.java:117)
at be.fedict.eid.applet.service.impl.tlv.TlvParser.parse(TlvParser.java:56)
... 12 more
The source code is here:
Any ideas on what I am doing wrong?
Luc