[InterMine Dev] StackOverflowError in web service call

Julie Sullivan julie at flymine.org
Thu Mar 6 15:54:43 GMT 2014


Hi Joe

This bug has now been fixed, and should be available in the next 
InterMine release:

	https://github.com/intermine/intermine/issues/555

Thank you for pointing this out!
Julie

On 19/02/14 19:06, Joe Carlson wrote:
> Hello,
>
> I’ve seemed to run into a new issue today. I wonder if this behavior has
> been seen before.
>
> I have a very simple query for a protein sequence and I’m use the java
> client library.  On the client side, I see that I have a ServiceException:
>
> ./compile-run.sh phytomine/QueryPSeq.java
> Using classpath
> ./build::./lib/antlr-2.7.6-caching.jar:./lib/commons-codec-1.3.jar:./lib/commons-httpclient-3.0.jar:./lib/commons-lang-2.6.jar:./lib/commons-logging-1.1.1.jar:./lib/intermine-client.jar:./lib/intermine-objectstore.jar:./lib/intermine-pathquery.jar:./lib/json20110106.jar:./lib/log4j.jar:./lib/stax-api-1.0.jar:./lib/stax-ri-1.0.jar
> Protein.primaryIdentifier                       | Protein.sequence.residues
> Exception in thread "main"
> org.intermine.webservice.client.exceptions.ServiceException: Error while
> accessing POST
> http://beta.phytozome.net/phytomine/service/query/results, params:
> {start=[0], query=[<query name="query" model="genomic"
> view="Protein.primaryIdentifier Protein.sequence.residues"
> longDescription="" sortOrder="Protein.primaryIdentifier asc"><constraint
> path="Protein.primaryIdentifier" op="="
> value="Phvul.001G002200.1"/></query>], format=[json]},
> authorization-token: null, content-type:
> application/json;char-set:UTF-8, headers: {InterMine-Version=3.00.00,
> User-Agent=InterMine-WS-Client-Java-0.96 JavaLibrary/3.00.00}
>          at
> org.intermine.webservice.client.util.HttpConnection.checkResponse(HttpConnection.java:217)
>          at
> org.intermine.webservice.client.util.HttpConnection.executeMethod(HttpConnection.java:146)
>          at
> org.intermine.webservice.client.util.HttpConnection.connect(HttpConnection.java:88)
>          at
> org.intermine.webservice.client.core.Service.executeRequest(Service.java:147)
>          at
> org.intermine.webservice.client.services.AbstractQueryService.getRows(AbstractQueryService.java:264)
>          at
> org.intermine.webservice.client.services.QueryService.getRows(QueryService.java:400)
>          at
> org.intermine.webservice.client.services.QueryService.getRows(QueryService.java:83)
>          at
> org.intermine.webservice.client.services.AbstractQueryService.getRowListIterator(AbstractQueryService.java:181)
>          at phytomine.QueryPSeq.main(QueryPSeq.java:50)
> Caused by:
> org.intermine.webservice.client.exceptions.InternalErrorException:
> Service failed. Please contact support.
>          at
> org.intermine.webservice.client.util.HttpConnection.handleErrorResponse(HttpConnection.java:265)
>          at
> org.intermine.webservice.client.util.HttpConnection.checkResponse(HttpConnection.java:215)
>          ... 8 more
>
>
> The tomcat output indicated this is generating a stack overflow error:
>
> 286085 [http-8089-9] ERROR org.intermine.webservice.server.WebService  -
> Service failed by internal error. Request parameters:
> start: 0
> query: <query name="query" model="genomic"
> view="Protein.primaryIdentifier Protein.sequence.residues"
> longDescription="" sortOrder="Protein.primaryIdentifier asc"><constraint
> path="Protein.primaryIdentifier" op="=" value="Phvul.001G002200.1"/></query>
> format: json
> java.lang.StackOverflowError
>          at java.lang.Exception.<init>(Exception.java:77)
>          at
> java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:54)
>          at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
>          at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:597)
>          at org.json.JSONObject.populateMap(JSONObject.java:937)
>          at org.json.JSONObject.<init>(JSONObject.java:272)
>          at org.json.JSONObject.wrap(JSONObject.java:1539)
>          at org.json.JSONObject.populateMap(JSONObject.java:939)
> ...
>
> The problem is specific to JSON output. If I use a GET url and tab format:
>
> wet -q -O /dev/stdout
> "http://beta.phytozome.net/phytomine/service/query/results?query=%3Cquery+name%3D%22%22+model%3D%22genomic%22+view%3D%22Protein.primaryIdentifier+Protein.sequence.residues%22+longDescription%3D%22%22+sortOrder%3D%22Protein.primaryIdentifier+asc%22%3E%3Cconstraint+path%3D%22Protein.primaryIdentifier%22+op%3D%22%3D%22+value%3D%22Phvul.001G002200.1%22%2F%3E%3C%2Fquery%3E&format=tab"
>
> the query returns results. but format=json gives the usual stack
> overflow error.
>
> This is especially mysterious since I thought this had been working in
> the past. Since then I know I’ve re-deployed the web app many times and
> perhaps this may have caused some change that I’ve been unaware of. The
> browser version of the query works quite well.
>
>
> Any ideas? (FYI beta.phytomine.net <http://beta.phytomine.net> is not
> accessible from the outside. I’m afraid you can’t test these urls.)
>
> Thanks,
>
> Joe Carlson
>
>
> _______________________________________________
> dev mailing list
> dev at intermine.org
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>



More information about the dev mailing list