GithubHelp home page GithubHelp logo

nfs-rpc's People

Contributors

bluedavy avatar coderplay avatar jlusdy avatar oleksiys avatar paliwalashish avatar

Watchers

 avatar  avatar

nfs-rpc's Issues

NullPointerException

Hi Davy,

When i using Reflection Type to call method with no arguments, it will be 
thrown NullPointerException. More log info as below.

2012-07-13 17:59:52,874 [main] ERROR code.google.nfs.rpc.protocol.RPCProtocol 
-encode request object error
java.lang.NullPointerException
    at code.google.nfs.rpc.protocol.RPCProtocol.encode(RPCProtocol.java:104)
    at code.google.nfs.rpc.protocol.ProtocolUtils.encode(ProtocolUtils.java:35)
    at code.google.nfs.rpc.netty.serialize.NettyProtocolEncoder.encode(NettyProtocolEncoder.java:22)
    at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:66)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
    at org.jboss.netty.channel.Channels.write(Channels.java:611)
    at org.jboss.netty.channel.Channels.write(Channels.java:578)
    at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
    at code.google.nfs.rpc.netty.client.NettyClient.sendRequest(NettyClient.java:47)
    at code.google.nfs.rpc.client.AbstractClient.invokeSyncIntern(AbstractClient.java:69)
    at code.google.nfs.rpc.client.AbstractClient.invokeSync(AbstractClient.java:55)
    at code.google.nfs.rpc.client.AbstractClientInvocationHandler.invoke(AbstractClientInvocationHandler.java:73)
    at $Proxy0.sayHello(Unknown Source)
    at MyNettyClient.main(MyNettyClient.java:29)
2012-07-13 17:59:52,877 [main] ERROR .nfs.rpc.netty.client.NettyClientHandler 
-catch some exception not IOException
java.lang.NullPointerException
    at code.google.nfs.rpc.protocol.RPCProtocol.encode(RPCProtocol.java:104)
    at code.google.nfs.rpc.protocol.ProtocolUtils.encode(ProtocolUtils.java:35)
    at code.google.nfs.rpc.netty.serialize.NettyProtocolEncoder.encode(NettyProtocolEncoder.java:22)
    at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:66)
    at org.jboss.netty.channel.Channels.write(Channels.java:611)
    at org.jboss.netty.channel.Channels.write(Channels.java:578)
    at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
    at code.google.nfs.rpc.netty.client.NettyClient.sendRequest(NettyClient.java:47)
    at code.google.nfs.rpc.client.AbstractClient.invokeSyncIntern(AbstractClient.java:69)
    at code.google.nfs.rpc.client.AbstractClient.invokeSync(AbstractClient.java:55)
    at code.google.nfs.rpc.client.AbstractClientInvocationHandler.invoke(AbstractClientInvocationHandler.java:73)
    at $Proxy0.sayHello(Unknown Source)
    at MyNettyClient.main(MyNettyClient.java:29)

--------------------------------------------------------------
I have temporarily fixed this issue by adding a NULL checking as below you can 
see.

Object[] requestObjects = wrapper.getRequestObjects();
                if(requestObjects!=null){
                    for (Object requestArg : requestObjects) {
                        byte[] requestArgByte = Codecs.getEncoder(wrapper.getCodecType()).encode(requestArg);
                        requestArgs.add(requestArgByte);
                        requestArgsLen += requestArgByte.length;
                    }
                }


Original issue reported on code.google.com by [email protected] on 13 Jul 2012 at 10:20

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.