Java twitter4j 3.0.3-更新状态错误404-仅在生产中发生

Java twitter4j 3.0.3-更新状态错误404-仅在生产中发生,java,twitter,twitter4j,Java,Twitter,Twitter4j,我在使用twitter4j 3.0.3通过web应用程序更新twitter状态时遇到了一个奇怪的错误 当我在dev环境中运行应用程序时,它可以成功地更新状态。但在我将应用程序部署并运行到生产环境之后,它无法更新任何状态 应用程序应该是相同的。我不确定我的生产环境中是否存在网络问题。或者twitter可能只授权一台机器上的一个应用程序(dev)并为其他机器锁定它(prod) 我所知道的是,它会在下面给出错误消息: 2013-12-04 06:18:39 ERROR TwitterServiceIm

我在使用twitter4j 3.0.3通过web应用程序更新twitter状态时遇到了一个奇怪的错误

当我在dev环境中运行应用程序时,它可以成功地更新状态。但在我将应用程序部署并运行到生产环境之后,它无法更新任何状态

应用程序应该是相同的。我不确定我的生产环境中是否存在网络问题。或者twitter可能只授权一台机器上的一个应用程序(dev)并为其他机器锁定它(prod)

我所知道的是,它会在下面给出错误消息:

2013-12-04 06:18:39 ERROR TwitterServiceImpl:68 - 404:The URI requested is invalid or the resource requested, such as a user, does not exists. Also returned when the requested format is not supported by the requested method.
<html><head><title>Apache Tomcat/7.0.40 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 404 - /1.1/statuses/update.json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/1.1/statuses/update.json</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.40</h3></body></html>

Relevant discussions can be found on the Internet at:
    http://www.google.co.jp/search?q=b2b52c28 or
    http://www.google.co.jp/search?q=10981ab8
TwitterException{exceptionCode=[b2b52c28-10981ab8], statusCode=404, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.3}

有什么想法吗?

请确保您输入的密钥正确,时间戳以UTC为单位,并且在我们的几分钟内。

嗨,bububu,谢谢您的回答。但我还是不明白“你的时间戳是UTC的,在我们的几分钟之内”。我的服务器时间现在设置为“Wed Dec 4 23:14:02 PST 2013”,我已经与进行了检查,并且已经同步。不过我对钥匙很有把握。
@Override
public void updateStatus(String message) throws BusinessException {
    try {
        ConfigurationBuilder confbuilder  = new ConfigurationBuilder();
        confbuilder.setOAuthAccessToken(TWITTER_ACCESS_TOKEN)
        .setOAuthAccessTokenSecret(TWITTER_ACCESS_TOKEN_SECRET)
        .setOAuthConsumerKey(TWITTER_CONSUMER_KEY)
        .setOAuthConsumerSecret(TWITTER_CONSUMER_SECRET);
        Twitter twitter = new TwitterFactory(confbuilder.build()).getInstance();

        Status status = twitter.updateStatus(message);
        logger.info("Successfully updated the status to [" + status.getText() + "].");
    } catch (Exception e) {
        logger.error(e);
        throw new BusinessException(e.getMessage());
    }
}