Android:使用mapper的dynamoDB查询返回null - 超时

时间:2015-10-31 07:24:30

标签: android amazon-dynamodb

因为我正在尝试两周,如果有人可以帮助我,我会很高兴。我从AsyncTask中执行查询。通过mapper.save写入aws适用于该类和表。我甚至可以从我尝试mapper.load的地方进行表扫描。它的工作原理。但mapper.load不会工作。我的注销指向超时,但是支持说不是吗。

AmazonDynamoDBClient ddbClient = new  AmazonDynamoDBClient(credentialsProvider);
        ddbClient.setEndpoint("dynamodb.eu-west-1.amazonaws.com");
        DynamoDBMapper mapper = new DynamoDBMapper(ddbClient);
        TraceForDB trace = mapper.load(TraceForDB.class, 123);

它返回null,我的logcat说:

    10-31 07:53:20.234    4724-4799/com.example.jan.tracestest D/CognitoCachingCredentialsProvider﹕ Loading credentials from SharedPreferences
10-31 07:53:20.235    4724-4799/com.example.jan.tracestest D/DDBQuery﹕ Loading Message
10-31 07:53:20.251    4724-4799/com.example.jan.tracestest I/System.out﹕ [CDS]rx timeout:15000
10-31 07:53:20.251    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ ssl=0x540395e8 sslWrite buf=0x4109d568 len=1679 write_timeout_millis=0
10-31 07:53:20.251    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Doing SSL_write() with 1679 bytes to go ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.252    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Returned from SSL_write() with result 1679, error code 0 ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.253    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ ssl=0x540395e8 sslRead buf=0x410813f0 len=1,timeo=15000
10-31 07:53:20.253    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Doing SSL_Read() ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.253    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Returned from SSL_Read() with result -1, error code 2 ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.253    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ sslSelect type=READ fd=57 appData=0x5403c7c8 timeout_millis=15000
10-31 07:53:20.295    4724-4730/com.example.jan.tracestest D/jdwp﹕ received file descriptor 46 from ADB
10-31 07:53:20.299    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.301    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.301    4724-4730/com.example.jan.tracestest D/jdwp﹕ handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x40000058, flags=0x0, dataLen=0x8
10-31 07:53:20.302    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.302    4724-4730/com.example.jan.tracestest D/jdwp﹕ handlePacket : cmd=0x1, cmdSet=0xC7, len=0x17, id=0x40000059, flags=0x0, dataLen=0xC
10-31 07:53:20.303    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.303    4724-4730/com.example.jan.tracestest D/jdwp﹕ handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x4000005A, flags=0x0, dataLen=0x8
10-31 07:53:20.304    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.304    4724-4730/com.example.jan.tracestest D/jdwp﹕ handlePacket : cmd=0x1, cmdSet=0xC7, len=0x13, id=0x4000005B, flags=0x0, dataLen=0x8
10-31 07:53:20.305    4724-4730/com.example.jan.tracestest D/jdwp﹕ processIncoming
10-31 07:53:20.305    4724-4730/com.example.jan.tracestest D/jdwp﹕ handlePacket : cmd=0x1, cmdSet=0xC7, len=0x14, id=0x4000005C, flags=0x0, dataLen=0x9
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ sslSelect READ fd=57 appData=0x5403c7c8 timeout_millis=15000 => 1
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Doing SSL_Read() ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Returned from SSL_Read() with result 1, error code 0 ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ ssl=0x540395e8 sslRead buf=0x4150b3b8 len=1,timeo=15000
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Doing SSL_Read() ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Returned from SSL_Read() with result 1, error code 0 ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ ssl=0x540395e8 sslRead buf=0x4150b400 len=1,timeo=15000
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Doing SSL_Read() ssl=0x540395e8, appData=0x5403c7c8
10-31 07:53:20.332    4724-4799/com.example.jan.tracestest D/NativeCrypto﹕ Returned from SSL_Read() with result 1, error code 0 ssl=0x540395e8, appData=0x5403c7c8

1 个答案:

答案 0 :(得分:0)

事实证明,这是mapper类中声明的问题。 id必须是一个长的不长...... ....很容易......