Project

General

Profile

Actions

Bug #406

closed

NullPointerException at start of rich client while doing CardRecognition

Added by Patrik Schwieger over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
High
Assignee:
Target version:
Start date:
10/05/2015
Due date:
% Done:

0%

Estimated time:
Reviewer:
Build Version:
1.1.1-20150724-0916 and 1.1.0-SNAPSHOT-20150129-1515

Description

The start of rich client Fails directly.
The build 1.1.1-20150724-0916 tells me in Dialog window

    Die Anwendung konnte nicht gestartet werden

    null

The logfile Show a NullPointerException as root cause

2015-10-05 13:12:14,434 [main] INFO  o.o.richclient.LogbackConfig:70 - Configured Logback with config file from: C:\Users\Administrator\.openecard\richclient_logback.xml
2015-10-05 13:12:14,451 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource ifd for lang C.
2015-10-05 13:12:14,451 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource ifd for lang de.
2015-10-05 13:12:14,452 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource ifd for lang de_DE.
2015-10-05 13:12:14,452 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource sal for lang C.
2015-10-05 13:12:14,453 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource sal for lang de.
2015-10-05 13:12:14,453 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource sal for lang de_DE.
2015-10-05 13:12:14,456 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource richclient for lang de_DE.
2015-10-05 13:12:14,567 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource addon for lang de_DE.
2015-10-05 13:12:15,013 [main] WARN  org.openecard.common.I18n:152 - Failed to load resource recognition for lang de_DE.
2015-10-05 13:12:15,025 [main] ERROR org.openecard.richclient.RichClient:193 - null
java.lang.NullPointerException: null
    at java.util.Properties$LineReader.readLine(Unknown Source) ~[na:1.7.0_80]
    at java.util.Properties.load0(Unknown Source) ~[na:1.7.0_80]
    at java.util.Properties.load(Unknown Source) ~[na:1.7.0_80]
    at org.openecard.recognition.CardRecognition.<init>(CardRecognition.java:119) ~[richclient-1.1.1-20150724-0916.jar:na]
    at org.openecard.recognition.CardRecognition.<init>(CardRecognition.java:111) ~[richclient-1.1.1-20150724-0916.jar:na]
    at org.openecard.richclient.RichClient.setup(RichClient.java:150) [richclient-1.1.1-20150724-0916.jar:na]
    at org.openecard.richclient.RichClient.main(RichClient.java:105) [richclient-1.1.1-20150724-0916.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_80]
    at org.openecard.versioncheck.MainLoader.main(MainLoader.java:70) [richclient-1.1.1-20150724-0916.jar:na]
2015-10-05 13:12:17,796 [main] ERROR org.openecard.richclient.RichClient:238 - Failed to stop Richclient.
java.lang.NullPointerException: null
    at org.openecard.richclient.RichClient.teardown(RichClient.java:220) [richclient-1.1.1-20150724-0916.jar:na]
    at org.openecard.richclient.RichClient.setup(RichClient.java:203) [richclient-1.1.1-20150724-0916.jar:na]
    at org.openecard.richclient.RichClient.main(RichClient.java:105) [richclient-1.1.1-20150724-0916.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_80]
    at org.openecard.versioncheck.MainLoader.main(MainLoader.java:70) [richclient-1.1.1-20150724-0916.jar:na]

The same NPE I get with old build 1.1.0-SNAPSHOT-20150129-1515 while the much more older Version 1.1.0-rc5 ist working fine

Actions #1

Updated by Tobias Wich over 8 years ago

  • Status changed from New to Feedback
  • Assignee set to Tobias Wich
  • Priority changed from Normal to High
  • Target version set to 1.2.0

Can you give some more information about the environment you are running the app in.
Did you use the bundled-jar-cifs build profile? Because otherwise the config files and the cifs you get the NPE for are missing.

Actions #2

Updated by Patrik Schwieger over 8 years ago

I downloaded the single JAR file (richclient-1.1.1-20150724-0916.jar) only, mentioned in JNPL file: http://jnlp.openecard.org/openecard.jnlp because this was working in past and I'm doing my tests in some restricted environment and I'm using the Client as offline stand alone version.
<!-- <jar href="OpeneCardApp.jar" version="1.1.1-20150724-0916" main="true" />--> ---> this line is commented out
<jar href="richclient-1.1.1-20150724-0916.jar" main="true" />
<jar href="cifs-1.1.1-20150724-0916.jar" download="lazy" />

Edit:
If I need both JAR files richclient & cifs during runtime now, I understand the problem, but need a stand alone version, as any (CIFS) access to outside is blocked.

Nevertheless the NPE should be catched and a proper error message should be displayed (e.g. "missing resources, wrong client code started, ...."). Sometime that indicates, that the downloaded client can not run and another package is required.

Actions #3

Updated by Hans-Martin Haase over 8 years ago

The OpeneCardApp.jar is a comment in the jnlp file.

The required jar files are the richclient-1.1.1-20150724-0916.jar and the cifs-1.1.1-20150724-0916.jar. Both are needed to start the Open eCard App so it is necessary to have both files. Prior versions did not have the cifs[...].jar because the included files were part of the richclient jar.

Your downloaded source is from a link in an jnlp file. An jnlp file is normally used with java webstart which doesn't seem to be appropriate for your setup.

So there are two options i think.

1. Try to copy the cifs jar into the class path (not tested)

or

2. Build a bundled version which contains all required files.
Basic instructions for the required system setup and how to get the code are provided in the wiki https://dev.openecard.org/projects/open-ecard/wiki/Getting_Started

If you have the code you just have to do an

mvn clean install

After the build the richclient jar is available in clients/richclient/target and there the file with the name richclient-{version}-bundle-cifs.jar

Actions #4

Updated by Tobias Wich over 8 years ago

  • Status changed from Feedback to Rejected

A small correction from my side.
In order to build a bundled version the profile I mentioned earlier must be added manually.

mvn -P bundled-jar-cifs clean install

In order to run the JNLP jars the following line works for me.

java -cp cifs-1.1.1-20150724-0916.jar:richclient-1.1.1-20150724-0916.jar org.openecard.richclient.RichClient

When trying to run as a combination of $-cp$ and $-jar$ the $-cp$ seems to be ignored.

By the way, we stopped providing the bundled version as we want everybody to receive upgrades which is the case with JNLP. It should also work offline. If not we should take care of that issue again. However this still needs a connection in the first place to download the jars. For the future I think your best bet is to use a build you did by yourself.

Actions #5

Updated by Patrik Schwieger over 8 years ago

To build my own bundle is no option, for some reason, but your hint about the start with combined classpath works fine

  java -cp cifs-1.1.1-20150724-0916.jar;richclient-1.1.1-20150724-0916.jar org.openecard.richclient.RichClient

This starts the richclient without an exception. :-)

But as an improvement I still suggest to catch the NPE to show a proper error message.

Actions

Also available in: Atom PDF