Face Detection and Facial Features

פרמיום
Verified
על ידי Imagevision | מְעוּדכָּן 4 days ago | Artificial Intelligence/Machine Learning
פּוֹפּוּלָרִיוּת

8.6 / 10

חֶבִיוֹן

2,142ms

רמת שירות

80%

Health Check

N/A

חזרה לכל הדיונים

Your PHP Version of the API is Broken

Rapid account: Dan Bezdek
dan.bezdek
9 years ago

Hi,

I can easily use the curl and Java version of the API, but the PHP version is broken. When I try to use the PHP version, I keep getting the following in the browser:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 2 column 42 path .nullcom.google.gson.Gson.fromJson(Gson.java:820)com.google.gson.Gson.fromJson(Gson.java:770)com.google.gson.Gson.fromJson(Gson.java:719)com.google.gson.Gson.fromJson(Gson.java:691)com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501)com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60)sun.reflect.GeneratedMethodAccessor177.invoke(UnknownSource)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:622)com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider.null com.google.gson.Gson.fromJson(Gson.java:820) com.google.gson.Gson.fromJson(Gson.java:770) com.google.gson.Gson.fromJson(Gson.java:719) com.google.gson.Gson.fromJson(Gson.java:691) com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501) com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60) sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:622) com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProviderTypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:168)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

com.google.gson.stream.MalformedJsonException: Unterminated object at line 2 column 42 path .nullcom.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1572)com.google.gson.stream.JsonReader.doPeek(JsonReader.java:493)com.google.gson.stream.JsonReader.hasNext(JsonReader.java:416)com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.null com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1572) com.google.gson.stream.JsonReader.doPeek(JsonReader.java:493) com.google.gson.stream.JsonReader.hasNext(JsonReader.java:416) com.google.gson.internal.bind.ReflectiveTypeAdapterFactoryAdapter.read(ReflectiveTypeAdapterFactory.java:177)
com.google.gson.Gson.fromJson(Gson.java:805)
com.google.gson.Gson.fromJson(Gson.java:770)
com.google.gson.Gson.fromJson(Gson.java:719)
com.google.gson.Gson.fromJson(Gson.java:691)
com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501)
com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60)
sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:622)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:168)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Apache Tomcat/6.0.24
" [“body”]=> string(5812) "
HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated object at line 2 column 42 path .nullcom.google.gson.Gson.fromJson(Gson.java:820)com.google.gson.Gson.fromJson(Gson.java:770)com.google.gson.Gson.fromJson(Gson.java:719)com.google.gson.Gson.fromJson(Gson.java:691)com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501)com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60)sun.reflect.GeneratedMethodAccessor177.invoke(UnknownSource)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)java.lang.reflect.Method.invoke(Method.java:622)com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider.null com.google.gson.Gson.fromJson(Gson.java:820) com.google.gson.Gson.fromJson(Gson.java:770) com.google.gson.Gson.fromJson(Gson.java:719) com.google.gson.Gson.fromJson(Gson.java:691) com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501) com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60) sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:622) com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProviderTypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:168)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

com.google.gson.stream.MalformedJsonException: Unterminated object at line 2 column 42 path .nullcom.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1572)com.google.gson.stream.JsonReader.doPeek(JsonReader.java:493)com.google.gson.stream.JsonReader.hasNext(JsonReader.java:416)com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.null com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1572) com.google.gson.stream.JsonReader.doPeek(JsonReader.java:493) com.google.gson.stream.JsonReader.hasNext(JsonReader.java:416) com.google.gson.internal.bind.ReflectiveTypeAdapterFactoryAdapter.read(ReflectiveTypeAdapterFactory.java:177)
com.google.gson.Gson.fromJson(Gson.java:805)
com.google.gson.Gson.fromJson(Gson.java:770)
com.google.gson.Gson.fromJson(Gson.java:719)
com.google.gson.Gson.fromJson(Gson.java:691)
com.imagevisionlabs.ivl.ws.ScanUtils.getIvlFromFormParameterMap(ScanUtils.java:501)
com.imagevisionlabs.ivl.fs.FaceSearchResource.detectFaces(FaceSearchResource.java:60)
sun.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:622)
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:168)
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:70)
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:279)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:86)
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:136)
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:74)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1357)
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1289)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Apache Tomcat/6.0.24

Rapid account: Eyerecognize
eyerecognize Commented 9 years ago

Please send the PHP code you are using so we can help you debug.

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות