Skip to content

OpenStack throws NullPointerException when connecting #165

Description

@sinharnab

I'm trying to connect OpenStack for access before creating tenant. It gives a NullPointerException from OpenStackClient.request() in the "openstack-client-3.2.1.jar".

The code and the beginning of stack trace are as below:

Keystone keystone = new Keystone("http://192.168.122.15:35357/v2.0");
//access with unscoped token
Access access = keystone.tokens().authenticate(
 new UsernamePassword("admin", "ADMIN_PASS"))
.withTenantName("admin")
.execute();`

The stacktrace is:

[java] java.lang.NullPointerException [java] at com.woorea.openstack.base.client.OpenStackClient.request(OpenStackClient.java:51) [java] at com.woorea.openstack.base.client.OpenStackClient.execute(OpenStackClient.java:66) [java] at com.woorea.openstack.base.client.OpenStackRequest.execute(OpenStackRequest.java:98) [java] at vep.openstack.OpenStackConnector.addUser(OpenStackConnector.java:624)

I looked at the source files of the package and tracing from the stack, the exception occurs while executing the line 51 in com.woorea.openstack.base.client.OpenStackClient: return connector.request(request); The variable 'connector' of type 'OpenStackClientConnector connector' doesn't get initialized (remains null). Is there anything I might need to do to initialize it?

Any help would be highly appreciated. Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions