Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured. #2526

Closed
younas-bangash opened this issue Oct 14, 2017 · 1 comment
Assignees

Comments

@younas-bangash
Copy link

I use below code in order to perform Face detection

List<AnnotateImageRequest> requests = new ArrayList<>();
       ByteString imgBytes = ByteString.readFrom(new FileInputStream(filePath));
       Image img = Image.newBuilder().setContent(imgBytes).build();
       Feature feat = Feature.newBuilder().setType(FACE_DETECTION).build();
       AnnotateImageRequest request =
               AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();
       requests.add(request);

       try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {
           BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);
           List<AnnotateImageResponse> responses = response.getResponsesList();

           for (AnnotateImageResponse res : responses) {
               if (res.hasError()) {
                   Log.d("Error: %s\n", res.getError().getMessage());
                   return;
               }

               // For full list of available annotations, see http://g.co/cloud/vision/docs
               for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {
                   Log.d("getAngerLikelihood", ""+ annotation.getAngerLikelihood());
                   Log.d("getAngerLikelihood",""+annotation.getJoyLikelihood());
                   Log.d("getAngerLikelihood",""+annotation.getSurpriseLikelihood());
                   Log.d("getAngerLikelihood",""+annotation.getBoundingPoly());
               }
           }
       }

but I am facing the error

java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured.

@sceee
Copy link

sceee commented Oct 15, 2017

@younas-bangash probably a duplicate / similar issue to #2398 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants