EEXCESS / eexcess

This is the EEXCESS main repository bringing togehter the different sub-projects and providing the documentation in the Wiki. Its the starting point when you want to know more about the project.
http://eexcess.eu/
5 stars 2 forks source link

Use of parameter "ageRange" in a recommendation-query results in crash of the server #11

Open pstoehr opened 8 years ago

pstoehr commented 8 years ago

Adding the parameter "ageRange" : 2 to a working JSON-Query-Object leads to a crash of the PP-Server.

Apache Tomcat/7.0.47 - Error report

HTTP Status 500 -


type Exception report

message

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

exception

java.lang.NullPointerException
    eu.eexcess.insa.Issuer.getRecommendations(Issuer.java:93)
    sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
    com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)

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


Apache Tomcat/7.0.47

Endpoints for query: https://eexcess-dev.joanneum.at/eexcess-privacy-proxy-issuer-1.0-DEV-SNAPSHOT/issuer/recommend https://eexcess-dev.joanneum.at/eexcess-privacy-proxy-issuer-1.0-SNAPSHOT/issuer/recommend

JSON-Object: { "ageRange": 2, "numResults": 10, "contextKeywords": [ { "text": "Geburt" } ], "origin": { "clientType": "Swift-Test-Client", "clientVersion": "0.21", "module": "OS X Prototype", "userID": "PDPS-WS2015" } }

Working Swift-JSON-Object: let jsonObject : [String:AnyObject] = [ "origin":["clientType" : "Swift-Test-Client", "clientVersion" : "0.21", "module" : "OS X Prototype", "userID" : "PDPS-WS2015"], "numResults":10, "contextKeywords": [["text" : "(recommendation.stringValue)"]] ]

Swift-JSON-Object that crashes the server: let jsonObject : [String:AnyObject] = [ "origin":["clientType" : "Swift-Test-Client", "clientVersion" : "0.21", "module" : "OS X Prototype", "userID" : "PDPS-WS2015"], "numResults":10, "ageRange":2, "contextKeywords": [["text" : "(recommendation.stringValue)"]] ]

ThomasCerq commented 8 years ago

I just experienced the same issue. @hziak: where are we on this?

pstoehr commented 8 years ago

Seems to work now, but recommendation for "ageRange" 0 and 1 always return an empty result list no matter what keywords are used.

chseifert commented 8 years ago

age range semantics: 0 - child 1- young adult 2 - adult

Currently there are no sources providing results for age range != 2