-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to retrieve current session. Please verify thread has a current session available. #745
Comments
@auhlig With V3, does this guide still apply or should we add an alternate for V3? http://www.openstack4j.com/learn/threads/ |
i use V3,but when i use "Access access = os.getAccess();" it show "- The method getAccess() is undefined for the type |
@jianke221 refer #676 |
@jianke221 your new code will be like
|
i have some question in follow program: but you hava OSClientV3 os as Parameter the token is needed? @vinodborole |
@gondor You're right. Need to refer to the token instead of access. I'll fix the guide during the afternoon. @jianke221 As @vinodborole already pointed out: The Access object exists only within the Identity v2 domain. In v3 please use |
@jianke221: After updating the docs does this work for you? |
Closing this as documentation has been updated. |
I have the same problem , if according to the official network Direct creation,no problem, but create by spring ,will happened, |
when i use openstack4j to upload a file to container by Multi thread,it failed my program as follows:
UploadTaskThread.java:
public class UploadTaskThread implements Runnable, Serializable {
private static final long serialVersionUID = 5833214272850373920L;
}
in main method :
FixThreadPool.getInstance();
the Error information:
Exception in thread "pool-1-thread-242" org.openstack4j.api.exceptions.OS4JException: Unable to retrieve current session. Please verify thread has a current session available.
at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:95)
at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:88)
at org.openstack4j.openstack.internal.BaseOpenStackService.put(BaseOpenStackService.java:58)
at org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl.put(ObjectStorageObjectServiceImpl.java:125)
at org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl.put(ObjectStorageObjectServiceImpl.java:105)
at com.inspur.openstack4j.service.UploadTaskThread.run(UploadTaskThread.java:23)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "pool-1-thread-236" org.openstack4j.api.exceptions.OS4JException: Unable to retrieve current session. Please verify thread has a current session available.
at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:95)
at org.openstack4j.openstack.internal.BaseOpenStackService.builder(BaseOpenStackService.java:88)
at org.openstack4j.openstack.internal.BaseOpenStackService.put(BaseOpenStackService.java:58)
at org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl.put(ObjectStorageObjectServiceImpl.java:125)
at org.openstack4j.openstack.storage.object.internal.ObjectStorageObjectServiceImpl.put(ObjectStorageObjectServiceImpl.java:105)
at com.inspur.openstack4j.service.UploadTaskThread.run(UploadTaskThread.java:23)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered: