久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <tfoot id='kgPm1'></tfoot>

          <bdo id='kgPm1'></bdo><ul id='kgPm1'></ul>
        <legend id='kgPm1'><style id='kgPm1'><dir id='kgPm1'><q id='kgPm1'></q></dir></style></legend>

      1. <small id='kgPm1'></small><noframes id='kgPm1'>

        <i id='kgPm1'><tr id='kgPm1'><dt id='kgPm1'><q id='kgPm1'><span id='kgPm1'><b id='kgPm1'><form id='kgPm1'><ins id='kgPm1'></ins><ul id='kgPm1'></ul><sub id='kgPm1'></sub></form><legend id='kgPm1'></legend><bdo id='kgPm1'><pre id='kgPm1'><center id='kgPm1'></center></pre></bdo></b><th id='kgPm1'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kgPm1'><tfoot id='kgPm1'></tfoot><dl id='kgPm1'><fieldset id='kgPm1'></fieldset></dl></div>
      2. 簡單的 DynamoDB 請求失敗并出現 ResourceNotFoundExce

        Simple DynamoDB request failing with ResourceNotFoundException(簡單的 DynamoDB 請求失敗并出現 ResourceNotFoundException)
          <bdo id='NJ5fs'></bdo><ul id='NJ5fs'></ul>
              <tbody id='NJ5fs'></tbody>
          1. <tfoot id='NJ5fs'></tfoot>
            <legend id='NJ5fs'><style id='NJ5fs'><dir id='NJ5fs'><q id='NJ5fs'></q></dir></style></legend>
              • <small id='NJ5fs'></small><noframes id='NJ5fs'>

                  <i id='NJ5fs'><tr id='NJ5fs'><dt id='NJ5fs'><q id='NJ5fs'><span id='NJ5fs'><b id='NJ5fs'><form id='NJ5fs'><ins id='NJ5fs'></ins><ul id='NJ5fs'></ul><sub id='NJ5fs'></sub></form><legend id='NJ5fs'></legend><bdo id='NJ5fs'><pre id='NJ5fs'><center id='NJ5fs'></center></pre></bdo></b><th id='NJ5fs'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='NJ5fs'><tfoot id='NJ5fs'></tfoot><dl id='NJ5fs'><fieldset id='NJ5fs'></fieldset></dl></div>

                  本文介紹了簡單的 DynamoDB 請求失敗并出現 ResourceNotFoundException的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我剛剛開始使用 Java SDK (v1.8) 運行 DynamoDB.我使用 AWS 控制臺創建了一個非常簡單的表.我的表有一個主哈希鍵,它是一個字符串(無范圍).我已經將一個項目與其他 4 個屬性值(所有字符串)一起放入表中.

                  I'm just getting up and running with DynamoDB using the Java SDK (v1.8). I've created a very simple table using the AWS console. My table has a primary hash key, which is a String (no range). I've put a single item into the table with 4 other attribute values (all Strings).

                  我正在為表中的該項目發出一個簡單的 Java 請求,但它失敗并出現 ResourceNotFoundException.我絕對肯定我提供的表名是正確的,我用來查詢項目的主哈希鍵的名稱也是正確的.表狀態在 AWS 控制臺中列為 Active,我也可以看到該項目及其值.

                  I'm making a simple Java request for that item in the table, but it's failing with ResourceNotFoundException. I'm absolutely positive that the table name I'm supplying is correct, as is the name of the primary hash key that I'm using to query the item. The table status is listed in the AWS console as Active and I can see the item and its values too.

                  這是我得到的錯誤:

                  Requested resource not found (Service: AmazonDynamoDB; Status Code: 400; Error Code: ResourceNotFoundException; Request ID: ...)
                  

                  我嘗試了以下方法(使用類的 dynamodbv2 版本):

                  I've tried the following (using the dynamodbv2 versions of the classes):

                  Map<String, AttributeValue> key = new HashMap<String, AttributeValue>();
                  key.put(PRIMARY_KEY, new AttributeValue().withS(value));
                  
                  GetItemRequest request = new GetItemRequest()
                      .withTableName(TABLE_NAME)
                      .withKey(key);
                  
                  GetItemResult result = client.getItem(request);
                  

                  我也嘗試過使用所有這些類的舊版本,已棄用,如下所示:

                  I've also tried using the older, deprecated versions of all these classes, like this:

                  GetItemRequest request = new GetItemRequest()
                          .withTableName(TABLE_NAME)
                          .withKey(new Key().withHashKeyElement(new AttributeValue().withS(value)));
                  GetItemResult result = client.getItem(request);
                  

                  ...但結果相同.
                  我對 ResourceNotFoundException 的理解是,它表示引用的表名或屬性無效,事實并非如此.如果表太早處于Creating狀態也可以拋出,但是我的表是Active.

                  ...but it's the same result.
                  My understanding of the ResourceNotFoundException is that it means the table name or attribute referenced is invalid, which is not the case. It can also be thrown if the table is too early in the Creating state, but my table is Active.

                  推薦答案

                  請求失敗,因為我在發出請求之前沒有為客戶端設置區域.默認區域可能是美國東部,而我的表設置在歐洲西部.這修復了它:

                  The request was failing because I wasn't setting the region for the client before making the request. The default region is probably US East and my table is setup in EU West. This fixed it:

                  import com.amazonaws.regions.Region;
                  import com.amazonaws.regions.Regions;
                  
                  client.setRegion(Region.getRegion(Regions.EU_WEST_1));
                  

                  這篇關于簡單的 DynamoDB 請求失敗并出現 ResourceNotFoundException的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                    <bdo id='J4qso'></bdo><ul id='J4qso'></ul>
                      <tbody id='J4qso'></tbody>

                        • <legend id='J4qso'><style id='J4qso'><dir id='J4qso'><q id='J4qso'></q></dir></style></legend>
                            <tfoot id='J4qso'></tfoot>

                            <i id='J4qso'><tr id='J4qso'><dt id='J4qso'><q id='J4qso'><span id='J4qso'><b id='J4qso'><form id='J4qso'><ins id='J4qso'></ins><ul id='J4qso'></ul><sub id='J4qso'></sub></form><legend id='J4qso'></legend><bdo id='J4qso'><pre id='J4qso'><center id='J4qso'></center></pre></bdo></b><th id='J4qso'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='J4qso'><tfoot id='J4qso'></tfoot><dl id='J4qso'><fieldset id='J4qso'></fieldset></dl></div>

                            <small id='J4qso'></small><noframes id='J4qso'>

                            主站蜘蛛池模板: 在线亚洲免费视频 | 成人免费观看视频 | av天天澡天天爽天天av | 国产精品99免费视频 | 久久久久国产 | 久久久久中文字幕 | 欧美九九九 | h片在线免费观看 | 久久这里只有精品首页 | 日韩一区二区在线视频 | 久久久妇女国产精品影视 | 日韩视频在线免费观看 | xx视频在线观看 | 久久中文字幕一区 | 91看片在线| 国产专区在线 | 日韩精品在线一区 | 日韩美女一区二区三区在线观看 | 天天综合网91 | 97精品国产97久久久久久免费 | 91视视频在线观看入口直接观看 | 亚洲精品一区二区在线观看 | 激情五月婷婷综合 | 欧美激情久久久 | 欧美国产一区二区三区 | 亚洲高清av在线 | 综合精品久久久 | 狠狠涩| 99精品国产一区二区青青牛奶 | 欧美福利 | 91免费福利在线 | 国产区精品 | 国产精品一区视频 | 中文字幕高清 | 日本淫视频 | 四虎影院在线观看免费视频 | 成人av网站在线观看 | 美女黄频| 国产精品一区一区三区 | 一级二级三级在线观看 | 精品一区二区三区在线观看 |