Open benxiaohai1212 opened 9 years ago
OpenStackRequest [endpoint=http://192.168.1.200:35357/v3, method=POST, path=/auth/tokens, headers={Accept=[application/json]}, entity=com.woorea.openstack.base.client.Entity@4ec4396a, returnType=class com.woorea.openstack.keystone.model.Access] OpenStackClientConnector connector; connector.request(request); connector == null How to solve? thank you!!!
Take a look at the solution I posted at https://github.com/woorea/openstack-java-sdk/issues/165.
On Thu, Jan 22, 2015 at 11:14 AM, benxiaohai1212 notifications@github.com wrote:
OpenStackRequest [endpoint=http://192.168.1.200:35357/v3, method=POST, path=/auth/tokens, headers={Accept=[application/json]}, entity=com.woorea.openstack.base.client.Entity@4ec4396a, returnType=class com.woorea.openstack.keystone.model.Access] OpenStackClientConnector connector; connector.request(request); connector == null How to solve? thank you!!!
— Reply to this email directly or view it on GitHub https://github.com/woorea/openstack-java-sdk/issues/179#issuecomment-71046188 .
public static final String KEYSTONE_AUTH_URL = "http://xxx.xxx.xxx.xxx:35357/v3"; public static final String KEYSTONE_USERNAME = "admin"; public static final String KEYSTONE_PASSWORD = "****";
Keystone keystone = new Keystone(ExamplesConfiguration.KEYSTONE_AUTH_URL); //access with unscoped token Access access = keystone.tokens().authenticate( new UsernamePassword(ExamplesConfiguration.KEYSTONE_USERNAME, ExamplesConfiguration.KEYSTONE_PASSWORD)) .execute();
Exception in thread "main" java.lang.NullPointerException at com.woorea.openstack.base.client.OpenStackClient.request(OpenStackClient.java:51) at com.woorea.openstack.base.client.OpenStackClient.execute(OpenStackClient.java:66) at com.woorea.openstack.base.client.OpenStackRequest.execute(OpenStackRequest.java:98) at com.woorea.openstack.examples.keystone.KeystoneCreateTenant.main(KeystoneCreateTenant.java:21)
why?