twitter / hbc

A Java HTTP client for consuming Twitter's realtime Streaming API
https://developer.twitter.com/en/docs/tweets/filter-realtime/overview
Apache License 2.0
962 stars 373 forks source link

Problems with scala 2.10.2 and HBC | User Streams #82

Closed maciejbak85 closed 11 years ago

maciejbak85 commented 11 years ago

Hi,

guys do You know maybe how to repair issues which I have with new scala version ? 2.10.2, on 2.9.2 works fine not when i run connect() or disconnect() I get exceptions:

SLF4J: Failed toString() invocation on an object of type [com.twitter.hbc.httpclient.ClientBase] java.lang.NoSuchMethodError: scala.Predef$.intWrapper(I)Lscala/runtime/RichInt; at com.twitter.joauth.UrlEncoder$.apply(UrlEncoder.scala:42) at com.twitter.joauth.UrlEncoder.apply(UrlEncoder.scala) at com.twitter.hbc.core.endpoint.BaseEndpoint.addQueryParameter(BaseEndpoint.java:98) at com.twitter.hbc.core.endpoint.DefaultStreamingEndpoint.addDefaultParams(DefaultStreamingEndpoint.java:48) at com.twitter.hbc.core.endpoint.BaseEndpoint.getURI(BaseEndpoint.java:57) at com.twitter.hbc.httpclient.ClientBase.toString(ClientBase.java:336) at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304) at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276) at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230) at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:114) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:468) at ch.qos.logback.classic.Logger.filterAndLog_1(Logger.java:442) at ch.qos.logback.classic.Logger.info(Logger.java:632) at com.twitter.hbc.httpclient.BasicClient.connect(BasicClient.java:111) at com.twitter.hbc.twitter4j.v3.BaseTwitter4jClient.connect(BaseTwitter4jClient.java:58) at com.twitter.hbc.twitter4j.v3.Twitter4jUserstreamClient.connect(Twitter4jUserstreamClient.java:30)

Thanks

kevinoliver commented 11 years ago

One of hbc's dependencies, joauth, is only published against scala 2.9.

Internally we have discussed moving joauth off of scala completely, but haven't had the time. When that happens, we plan to remove hbc's scala dependency.

maciejbak85 commented 11 years ago

Can You tell me when You will do it ? I dont know if its worth to wait or move to some another streams lib.. And for sure , your solution will work for scala 2.10.2 ? Thanks!

kevinoliver commented 11 years ago

As mentioned on the joauth ticket this isn't happening in the next month or two.

kevinoliver commented 10 years ago

Pull Request #95 should solve this by removing the transitive scala dependency.