GReaper / MadridLive

Madrid Live repository
0 stars 0 forks source link

Traza de error que provoca un fallo al recuperar recomendación #81

Closed GReaper closed 10 years ago

GReaper commented 10 years ago
java.lang.NullPointerException\n
\tat ucm.ssii.turismo.utils.JSONUtils.filtrarEntradaJSON(Unknown Source)\n
\tat RecomendadorServlet.jsonOK(Unknown Source)\n
\tat RecomendadorServlet.doPost(Unknown Source)\n
\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:647)\n
\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:728)\n
\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)\n
\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)\n
\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)\n
\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)\n
\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)\n
\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)\n
\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)\n
\tat org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)\n
\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)\n
\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)\n
\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)\n
\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)\n
\tat org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)\n
\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)\n
\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)\n
\tat java.lang.Thread.run(Thread.java:724)\n

Posiblemente se deba a que la función JSONUtils.filtrarEntradaJSON reciba algún String con valor null y eso provoque un fallo.

GReaper commented 10 years ago

Actualizo Agregada sentencia try/catch para tomar la excepción de NullPointerException y devuelta cadena "null" en ese caso. Se ha agregado la comprobación en JSONUtils para evitar posibles problemas similares con otros Servlets. Pendiente testeo.

GReaper commented 10 years ago

Testeado