cyberark / conjur-api-java

Java client for the CyberArk Conjur API
Apache License 2.0
17 stars 14 forks source link

NullPointerException returned #41

Closed AndrewCopeland closed 4 years ago

AndrewCopeland commented 4 years ago

NullPointerException is returned if any of the configuration environment variables are not provided. We should return an informative exception with what environment variables are missing.

micahlee commented 4 years ago

This can also be caused when a JAX-RS implementation is not available, as one is not provided in the shaded jar.

The README currently says that Apache CXF is used by default, but we should document that this needs to be obtained and included in the classpath if not using maven.

For example:

java -cp ".:conjur-api-2.1.0-with-dependencies.jar:cxf-core-3.3.5.jar" \
  -DCONJUR_AUTHN_LOGIN=host/my-host \
  -DCONJUR_AUTHN_API_KEY=... \
  -DCONJUR_APPLIANCE_URL=https://conjur.my-company.net \
  -DCONJUR_ACCOUNT=demo \
  Example
AndrewCopeland commented 4 years ago

Resolved in: https://github.com/cyberark/conjur-api-java/pull/43