weblogic with twitter API

mathewvinoj
@mathewvinoj Vinoj Mathew

I am using weblogic 10.3.4 using twitter4j Api running behind the proxy. I am not sure why I am getting this error. I do have the proxy name,port number, userid and password set in the twiiter4j api. The same code works fine for me in tomcat behind proxy. When I was trying to migrate from tomcat to weblogic i am getting following error. Any help is really appreciated.

Please help me

Thanks for the help
Vinoj

  1. <Net> <BEA-000903> <Failed to communicate with proxy: tmsproxy.tms.toyota.com/80. Will try c
  2. onnection stream.twitter.com/443 now.
  3. weblogic.net.http.HttpUnauthorizedException: Proxy or Server Authentication Required
  4.         at weblogic.net.http.HttpURLConnection.getAuthInfo(HttpURLConnection.java:297)
  5.         at weblogic.net.http.HttpsClient.makeConnectionUsingProxy(HttpsClient.java:440)
  6.         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:351)
  7.         at weblogic.net.http.HttpsClient.New(HttpsClient.java:527)
  8.         at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:239)
  9.         Truncated. see log file for complete stacktrace
  10. > 
  11. Dumping beanImpl -> ejbName map
  12. weblogic.management.j2ee.mejb.MejbBean: Mejb
  13. connect timed out
  14. Relevant discussions can be found on the Internet at:
  15.         http://www.google.co.jp/search?q=944a924a or
  16.         http://www.google.co.jp/search?q=24fd66dc
  17. TwitterException{exceptionCode=[944a924a-24fd66dc 944a924a-24fd66b2], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLim
  18. itStatus=null, version=3.0.4-SNAPSHOT(build: f34757f6d8512eca8028601d9de303e0173d8d42)}
  19.         at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)
  20.         at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
  21.         at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:98)
  22.         at twitter4j.TwitterStreamImpl.getFilterStream(TwitterStreamImpl.java:304)
  23.         at twitter4j.TwitterStreamImpl$7.getStream(TwitterStreamImpl.java:292)
  24.         at twitter4j.TwitterStreamImpl$TwitterStreamConsumer.run(TwitterStreamImpl.java:462)
  25. Caused by: java.net.SocketTimeoutException: connect timed out
  26.         at java.net.PlainSocketImpl.socketConnect(Native Method)
  27.         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  28.         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  29.         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  30.         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  31.         at java.net.Socket.connect(Socket.java:529)
  32.         at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:565)
  33.         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:287)
  34.         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:364)
  35.         at weblogic.net.http.HttpsClient.New(HttpsClient.java:527)
  36.         at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:239)
  37.         at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:255)
  38.         at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java
3 weeks 9 hours ago

Replies

LogicalArthur
@LogicalArthur Arthur Zey

Hi Vinoj:

Without knowing much about your environment or setup, it looks like the problem is with WebLogic.

Are you able to access the Streaming API using the command line (e.g., using a curl command)? You can easily generate OAuth-signed cURL commands by going to https://dev.twitter.com/apps and selecting your application, then going to the "OAuth tool" tab.

Another thing you might try is creating a very basic test app within WebLogic, without any of the customization or complexity in the app that was running in Tomcat. That can help you to discern whether what's causing the error is an incompatibility between your app and WebLogic.

I hope that helps!

5 days 22 hours ago