We're updating the issue view to help you get more done. 

Query page gives HTTP 500 on very long query strings

Description

When executing a SPARQL query that is very long (e.g. containing a large number of prefixes), the workbench application fails with a HTTP 500 errror. Example (nonsense) query:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 PREFIX dc1: <http://purl.org/dc/elements/1.1/> PREFIX dc2: <http://purl.org/dc/elements/1.1/> PREFIX dc3: <http://purl.org/dc/elements/1.1/> PREFIX dc4: <http://purl.org/dc/elements/1.1/> PREFIX dc5: <http://purl.org/dc/elements/1.1/> PREFIX dc6: <http://purl.org/dc/elements/1.1/> PREFIX dc7: <http://purl.org/dc/elements/1.1/> PREFIX dc8: <http://purl.org/dc/elements/1.1/> PREFIX dc9: <http://purl.org/dc/elements/1.1/> PREFIX dc10: <http://purl.org/dc/elements/1.1/> PREFIX dc11: <http://purl.org/dc/elements/1.1/> PREFIX dc12: <http://purl.org/dc/elements/1.1/> PREFIX dc13: <http://purl.org/dc/elements/1.1/> PREFIX dc14: <http://purl.org/dc/elements/1.1/> PREFIX dc15: <http://purl.org/dc/elements/1.1/> PREFIX dc16: <http://purl.org/dc/elements/1.1/> PREFIX dc17: <http://purl.org/dc/elements/1.1/> PREFIX dc18: <http://purl.org/dc/elements/1.1/> PREFIX dc19: <http://purl.org/dc/elements/1.1/> PREFIX dc20: <http://purl.org/dc/elements/1.1/> PREFIX dc21: <http://purl.org/dc/elements/1.1/> PREFIX dc22: <http://purl.org/dc/elements/1.1/> PREFIX dc23: <http://purl.org/dc/elements/1.1/> PREFIX dc24: <http://purl.org/dc/elements/1.1/> PREFIX dc25: <http://purl.org/dc/elements/1.1/> PREFIX dc26: <http://purl.org/dc/elements/1.1/> PREFIX dc27: <http://purl.org/dc/elements/1.1/> PREFIX dc28: <http://purl.org/dc/elements/1.1/> PREFIX dc29: <http://purl.org/dc/elements/1.1/> PREFIX dc30: <http://purl.org/dc/elements/1.1/> PREFIX dc31: <http://purl.org/dc/elements/1.1/> PREFIX dc32: <http://purl.org/dc/elements/1.1/> PREFIX dc33: <http://purl.org/dc/elements/1.1/> PREFIX dc34: <http://purl.org/dc/elements/1.1/> PREFIX dc35: <http://purl.org/dc/elements/1.1/> PREFIX dc36: <http://purl.org/dc/elements/1.1/> PREFIX dc37: <http://purl.org/dc/elements/1.1/> PREFIX dc38: <http://purl.org/dc/elements/1.1/> PREFIX dc39: <http://purl.org/dc/elements/1.1/> PREFIX dc40: <http://purl.org/dc/elements/1.1/> PREFIX dc41: <http://purl.org/dc/elements/1.1/> PREFIX dc42: <http://purl.org/dc/elements/1.1/> PREFIX dc43: <http://purl.org/dc/elements/1.1/> PREFIX dc44: <http://purl.org/dc/elements/1.1/> PREFIX dc45: <http://purl.org/dc/elements/1.1/> PREFIX dc46: <http://purl.org/dc/elements/1.1/> select * where {?s ?p ?o}

Stacktrace:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 javax.servlet.ServletException: org.openrdf.workbench.exceptions.BadRequestException: Query doPost() is only for 'action=save' or 'action=edit'. org.openrdf.workbench.base.TransformationServlet.service(TransformationServlet.java:104) org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:74) org.openrdf.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:104) org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:211) org.openrdf.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:141) org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:117) org.openrdf.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:125) org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:74) org.openrdf.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:63) root cause org.openrdf.workbench.exceptions.BadRequestException: Query doPost() is only for 'action=save' or 'action=edit'. org.openrdf.workbench.commands.QueryServlet.doPost(QueryServlet.java:146) org.openrdf.workbench.base.TransformationServlet.service(TransformationServlet.java:94) org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:74) org.openrdf.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:104) org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:211) org.openrdf.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:141) org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:117) org.openrdf.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:125) org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:74) org.openrdf.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:63)

Tested on (fairly recent) snapshot build from the master, and reported to occur in the beta2 release as well.

Environment

None

Status

Assignee

Dale W. Visser

Reporter

JeenB

Labels

None

Components

Fix versions

Affects versions

2.7.0-beta2

Priority

Major