Giter VIP home page Giter VIP logo

bidithrift's People

Contributors

joelpm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bidithrift's Issues

null pointer exceptions

Log from the server

java -jar Server/target/BidiMessages.Server-0.9-jar-with-dependencies.jar 10101                                                                       ✹ ✭
2012-10-11 12:29:55,769  INFO main com.joelpm.bidiMessages.server.Server:48 - Server started
2012-10-11 12:30:28,823  INFO pool-2-thread-1 com.joelpm.bidiMessages.server.MessageDistributor:36 - Added client at 127.0.0.1
2012-10-11 12:30:28,841  INFO pool-2-thread-1 com.joelpm.bidiMessages.server.MessageDistributor:66 - Adding message to queue:
Message(clientName:client1, message:Hello there!)
12:30:28.854 [pool-2-thread-1] ERROR o.a.thrift.server.TThreadPoolServer - Error occurred during processing of message.
java.lang.NullPointerException: null
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:34) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_29]
2012-10-11 12:30:35,832  INFO pool-2-thread-2 com.joelpm.bidiMessages.server.MessageDistributor:36 - Added client at 127.0.0.1
2012-10-11 12:30:35,834  INFO pool-2-thread-2 com.joelpm.bidiMessages.server.MessageDistributor:66 - Adding message to queue:
Message(clientName:client1, message:Message 2)
2012-10-11 12:30:35,834  INFO Thread-2 com.joelpm.bidiMessages.server.MessageDistributor:53 - Removing 127.0.0.1 from client list.
12:30:35.835 [pool-2-thread-2] ERROR o.a.thrift.server.TThreadPoolServer - Error occurred during processing of message.
java.lang.NullPointerException: null
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:34) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:176) ~[BidiMessages.Server-0.9-jar-with-dependencies.jar:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_29]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_29]
    at java.lang.Thread.run(Thread.java:680) [na:1.6.0_29]

Log from the client

java -jar Client/target/BidiMessages.Client-0.9-jar-with-dependencies.jar client1 localhost 10101                                                     ✹ ✭
2012-10-11 12:30:28,807  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:42 - Message Sender waiting for connection to be established.
2012-10-11 12:30:28,807  INFO Thread-4 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:42 - Message Receiver waiting for connection to be established.
2012-10-11 12:30:28,814  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:48 - Message Sender notified of connection, resuming execution
2012-10-11 12:30:28,814  INFO Thread-4 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:48 - Message Receiver notified of connection, resuming execution
Got msg: Message(clientName:client1, message:Hello there!)
Exception in thread "Thread-4" java.lang.NullPointerException
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:34)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
    at com.joelpm.bidiMessages.client.MessageReceiver.run(MessageReceiver.java:31)
    at java.lang.Thread.run(Thread.java:680)
2012-10-11 12:30:30,827  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:30 - Message Sender detected a disconnect from the server.
2012-10-11 12:30:30,828  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:42 - Message Sender waiting for connection to be established.
2012-10-11 12:30:35,831  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:48 - Message Sender notified of connection, resuming execution
2012-10-11 12:30:37,836  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:30 - Message Sender detected a disconnect from the server.
2012-10-11 12:30:37,838  INFO Thread-3 com.joelpm.bidiMessages.client.ConnectionRequiredRunnable:42 - Message Sender waiting for connection to be established.

Maven failure

I am unable to get maven to compile the project. Getting the following error on console:
Failed to execute goal on project BidiMessages.Common: Could not resolve dependencies for project com.joelpm:BidiMessages.Common:jar:0.9: Could not find artifact org.apache:thrift:jar:1.0 in Central (http://repo1.maven.org/maven2)

Please advise.

EDIT:
Looks like thrift API and versioning system have both changed since this was written.
Looking at the new API, it seems like doing bidirectional transport might not be straightforward since TServerTransport does not provide the TSocket interface. Am I right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.