Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Can't get hbc to build #8

Closed
scumola opened this issue Feb 28, 2013 · 8 comments
Closed

Can't get hbc to build #8

scumola opened this issue Feb 28, 2013 · 8 comments

Comments

@scumola
Copy link

scumola commented Feb 28, 2013

Hey twitter guys! Thanks for the HoseBird! I never got around to getting the fallback stuff working on my own and was hoping that someone would release something like HoseBird to the public. I've been using curl since Oct 2010! :)

I'm trying to get the hbc-example to work. I'd like to connect to the streaming sample endpoint using BasicAuth. I see where I can use OAuth or BasicAuth, so I think that I've got that covered. I've not changed anything from the git repo yet. I'm sort of a noob when it comes to maven, so I may be doing something really simple and stupid here. Here's my build output. Not sure why this is failing.

build output here:
https://gist.github.com/scumola/5060747

CentOS 5.2, java 1.7, mvn 3.0.5

@xsl
Copy link
Contributor

xsl commented Feb 28, 2013

try doing a "mvn compile" (or mvn install) first, and then make that exec call

@scumola
Copy link
Author

scumola commented Feb 28, 2013

Ahh, that worked great! Is there a way to compile it all to a .jar file so I can move it around from machine to machine?

@scumola
Copy link
Author

scumola commented Feb 28, 2013

Does BasicAuth work? I commented-out the OAuth line in hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java and uncommented the BasicAuth line and I'm getting:

Did not receive a message in 5 seconds
Did not receive a message in 5 seconds
[hosebird-client-io-thread-0] INFO com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Done processing, preparing to close connection
[hosebird-client-io-thread-0] INFO com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Establishing a connection
[hosebird-client-io-thread-0] WARN com.twitter.hbc.httpclient.ClientBase - sampleExampleClient Error connecting w/ status code - 401, reason - Unauthorized
Did not receive a message in 5 seconds
Did not receive a message in 5 seconds
Killed

@kevinoliver
Copy link
Contributor

Most likely you need to recompile after that change. I'll update the docs to make this more obvious.

Try running:
mvn compile && mvn exec:java -pl hbc-example

@scumola
Copy link
Author

scumola commented Feb 28, 2013

I had to recompile after making the changes, I guess. I am using the BasicAuth ("username","password); now and I'm getting:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project hbc-example: Compilation failure: Compilation failure:
[ERROR] /root/hbc/hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java:[40,30] error: cannot find symbol
[ERROR] symbol: class BasicAuth
[ERROR] location: class SampleStreamExample
[ERROR] /root/hbc/hbc-example/src/main/java/com/twitter/hbc/example/SampleStreamExample.java:[55,11] error: incompatible types

@scumola
Copy link
Author

scumola commented Feb 28, 2013

Added: import com.twitter.hbc.httpclient.auth.BasicAuth;
Now it compiles! Yea! Thanks!

@kevinoliver
Copy link
Contributor

and did you successfully connect to the api?

@scumola
Copy link
Author

scumola commented Mar 1, 2013

Yea, it's working. I'm getting the stream output now. I'm trying to turn off all of the extra output though or send that to stderr instead of stdout so I can pipe stdout to my app. Also, hitting ctrl-c doesn't really stop and disconnect hbc, but those are different errors than this one. I will close this issue. Thanks for the help!

@scumola scumola closed this as completed Mar 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants