ruyaoyao / LineAPI4J

LineAPI for Java.
MIT License
31 stars 17 forks source link

send image file had error. #3

Closed winweb closed 8 years ago

winweb commented 9 years ago

I coding like this.

      File initialFile = new File("/Users/555/Desktop/image.jpg");
      InputStream targetStream = new FileInputStream(initialFile);
      System.out.println(someoneContact.sendImage(targetStream));

error output:

java.lang.NullPointerException at org.apache.thrift.protocol.TCompactProtocol.writeString(TCompactProtocol.java:325) at line.thrift.Message$MessageStandardScheme.write(Message.java:1391) at line.thrift.Message$MessageStandardScheme.write(Message.java:1) at line.thrift.Message.write(Message.java:1068) at line.thrift.TalkService$sendMessage_args$sendMessage_argsStandardScheme.write(TalkService.java:28485) at line.thrift.TalkService$sendMessage_args$sendMessage_argsStandardScheme.write(TalkService.java:1) at line.thrift.TalkService$sendMessage_args.write(TalkService.java:28381) at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:63) at line.thrift.TalkService$Client.send_sendMessage(TalkService.java:4687) at line.thrift.TalkService$Client.sendMessage(TalkService.java:4678) at io.cslinmiso.line.api.impl.LineApiImpl.sendMessage(LineApiImpl.java:470) at io.cslinmiso.line.model.LineClient.sendMessage(LineClient.java:486) at io.cslinmiso.line.model.LineBase.sendImage(LineBase.java:203) at io.cslinmiso.LineAPI4J.App.main(App.java:99)

Can you suggest me the this error output ???

ruyaoyao commented 9 years ago

I will have to look into it while I am free. Thanks.

winweb commented 8 years ago

@ruyaoyao Thanks

ruyaoyao commented 8 years ago

I do find out what the problem is, but the latest problem is that we are not able to log in lol.......

Tomas2k commented 8 years ago

I suffer the same problem(NullPointerException) as @winweb when send the images . Could you give some direction? Thanks.

ruyaoyao commented 8 years ago

Sorry for the late reply. The problem was the method, sendImage itself. I haven't got the time to fix it. I will try to fix it around Jan, 2016.

ruyaoyao commented 8 years ago

@winweb , @Tomas2k . The sendImage problem has been resolved. Please let me know if there's any problem. https://goo.gl/u4YYuG

winweb commented 8 years ago

@cslinmiso Thanks for your resolved.

ruyaoyao commented 8 years ago

@winweb Thank you for reporting it. By the way, if you don't mind, may I know where you from?