Why do I get ServiceException?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Why do I get ServiceException?

Cheyenne Forbes
I'm getting *com.google.protobuf.ServiceException *when I try:







*        Configuration conf = HBaseConfiguration.create();
try{            Connection connection =
ConnectionFactory.createConnection(conf);            Table table =
connection.getTable(TableName.valueOf(Bytes.toBytes( "users" )));
            MyPB.TestRequest request = *



*MyPB.TestRequest.newBuilder().setId("test_id").build();
            CoprocessorRpcChannel channel =
table.coprocessorService(Bytes.toBytes("test_id"));
    **MyPB.TestService.BlockingInterface
service = *


*MyPB.TestService.newBlockingStub(channel);        LOG.warning("avapnoAVO
9");                        **MyPB.TestResponse response =
service.getTestRes(null, request);*

Regards,

Cheyenne O. Forbes
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why do I get ServiceException?

Ted Yu-3
Your code snippet is formatted in a strange way.
Can you pastebin:

code snippet copied from Eclipse (or text editor of your choice)
complete stack trace for the ServiceException

Which version of hbase are you using ?

Was there any other protobuf jar in the classpath ?

Cheers

On Sun, May 28, 2017 at 10:01 AM, Cheyenne Forbes <
[hidden email]> wrote:

> I'm getting *com.google.protobuf.ServiceException *when I try:
>
>
>
>
>
>
>
> *        Configuration conf = HBaseConfiguration.create();
> try{            Connection connection =
> ConnectionFactory.createConnection(conf);            Table table =
> connection.getTable(TableName.valueOf(Bytes.toBytes( "users" )));
>             MyPB.TestRequest request = *
>
>
>
> *MyPB.TestRequest.newBuilder().setId("test_id").build();
>             CoprocessorRpcChannel channel =
> table.coprocessorService(Bytes.toBytes("test_id"));
>     **MyPB.TestService.BlockingInterface
> service = *
>
>
> *MyPB.TestService.newBlockingStub(channel);        LOG.warning("avapnoAVO
> 9");                        **MyPB.TestResponse response =
> service.getTestRes(null, request);*
>
> Regards,
>
> Cheyenne O. Forbes
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Why do I get ServiceException?

Jerry He
ServiceException  simply means your service call failed for some reason.
For example, the service could not be found on the region server side
because the coprocessor was not registered correctly.
Or the protobuf message / parameter was missing some required field.

Do you see more detailed root cause or message out of the ServiceException?
I guess not.    It does make the debug more frustrating.


Jerry

On Tue, May 30, 2017 at 8:06 AM, Ted Yu <[hidden email]> wrote:

> Your code snippet is formatted in a strange way.
> Can you pastebin:
>
> code snippet copied from Eclipse (or text editor of your choice)
> complete stack trace for the ServiceException
>
> Which version of hbase are you using ?
>
> Was there any other protobuf jar in the classpath ?
>
> Cheers
>
> On Sun, May 28, 2017 at 10:01 AM, Cheyenne Forbes <
> [hidden email]> wrote:
>
> > I'm getting *com.google.protobuf.ServiceException *when I try:
> >
> >
> >
> >
> >
> >
> >
> > *        Configuration conf = HBaseConfiguration.create();
> > try{            Connection connection =
> > ConnectionFactory.createConnection(conf);            Table table =
> > connection.getTable(TableName.valueOf(Bytes.toBytes( "users" )));
> >             MyPB.TestRequest request = *
> >
> >
> >
> > *MyPB.TestRequest.newBuilder().setId("test_id").build();
> >             CoprocessorRpcChannel channel =
> > table.coprocessorService(Bytes.toBytes("test_id"));
> >     **MyPB.TestService.BlockingInterface
> > service = *
> >
> >
> > *MyPB.TestService.newBlockingStub(channel);
> LOG.warning("avapnoAVO
> > 9");                        **MyPB.TestResponse response =
> > service.getTestRes(null, request);*
> >
> > Regards,
> >
> > Cheyenne O. Forbes
> >
>
Loading...