Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure clear and useful error messages #26

Open
rflprr opened this issue Aug 2, 2017 · 0 comments
Open

Ensure clear and useful error messages #26

rflprr opened this issue Aug 2, 2017 · 0 comments
Assignees

Comments

@rflprr
Copy link
Contributor

rflprr commented Aug 2, 2017

Hey all - got a note about this exception from a user:

Remote: select * from SuperStoreOrders
19:57:24,930  INFO DataWorldStatement:371 - Received input command text:
 select * from SuperStoreOrders
19:57:26,203 ERROR DataWorldStatement:399 - SPARQL Query evaluation failed
HttpException: 400
        at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuery.java:411)
        at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:355)
        at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:292)
        at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execResultSetInner(QueryEngineHTTP.java:359)
        at org.apache.jena.sparql.engine.http.QueryEngineHTTP.execSelect(QueryEngineHTTP.java:351)
        at world.data.jdbc.statements.SqlStatementQueryBuilder.buildResults(SqlStatementQueryBuilder.java:41)
        at world.data.jdbc.statements.SqlStatementQueryBuilder.buildResults(SqlStatementQueryBuilder.java:29)
        at world.data.jdbc.statements.DataWorldStatement.executeQuery(DataWorldStatement.java:394)
        at world.data.jdbc.statements.DataWorldStatement.executeQuery(DataWorldStatement.java:377)
        at org.python.ReL.OracleDatabase.executeQuery(OracleDatabase.java:79)
        at org.python.ReL.PyRelConnection.executeQuery(PyRelConnection.java:206)
        at org.python.ReL.ProcessOracleEESQL.processSQL(ProcessOracleEESQL.java:50)
        at org.python.core.PyTuple.<init>(PyTuple.java:258)
        at org.python.core.PyTuple.<init>(PyTuple.java:90)
        at org.python.pycode._pyx23.f$0(<string>:1)
        at org.python.pycode._pyx23.call_function(<string>)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.Py.runCode(Py.java:1401)
        at org.python.core.__builtin__.eval(__builtin__.java:497)
        at org.python.core.__builtin__.eval(__builtin__.java:508)
        at org.python.core.BuiltinFunctions.__call__(__builtin__.java:86)
        at org.python.core.PyObject.__call__(PyObject.java:479)
        at RestfulRel.methods.internal_methods$py.rest_call$4(/v/filer4b/v41q001/cannata/CarnotDist/CarnotRE/RestfulRel/methods/internal_methods.py:198)
        at RestfulRel.methods.internal_methods$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/CarnotRE/RestfulRel/methods/internal_methods.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
        at org.python.core.PyFunction.__call__(PyFunction.java:482)
        at org.python.core.PyMethod.__call__(PyMethod.java:187)
        at RestfulRel.app$py.rest_call$2(/Users/pcannata/Mine/Carnot/CarnotRE/RestfulRel/app.py:45)
        at RestfulRel.app$py.call_function(/Users/pcannata/Mine/Carnot/CarnotRE/RestfulRel/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyFunction.function___call__(PyFunction.java:471)
        at org.python.core.PyFunction.__call__(PyFunction.java:466)
        at org.python.core.PyFunction.__call__(PyFunction.java:461)
        at org.python.core.PyObject._callextra(PyObject.java:615)
        at flask.app$py.dispatch_request$63(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py:1461)
        at flask.app$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at flask.app$py.full_dispatch_request$64(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py:1481)
        at flask.app$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at flask.app$py.wsgi_app$79(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py:1825)
        at flask.app$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at org.python.core.PyMethod.__call__(PyMethod.java:156)
        at flask.app$py.__call__$81(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py:1836)
        at flask.app$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
        at org.python.core.PyFunction.__call__(PyFunction.java:482)
        at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
        at org.python.core.PyMethod.__call__(PyMethod.java:228)
        at org.python.core.PyMethod.__call__(PyMethod.java:223)
        at org.python.core.PyObjectDerived.__call__(PyObjectDerived.java:1030)
        at org.python.core.PyObject.__call__(PyObject.java:492)
        at org.python.core.PyObject.__call__(PyObject.java:496)
        at werkzeug.serving$py.execute$11(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:190)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at werkzeug.serving$py.run_wsgi$8(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:209)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at werkzeug.serving$py.handle_one_request$15(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:251)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at BaseHTTPServer$py.handle$8(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/BaseHTTPServer.py:352)
        at BaseHTTPServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/BaseHTTPServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:139)
        at werkzeug.serving$py.handle$12(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:224)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at SocketServer$py.__init__$47(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py:659)
        at SocketServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
        at org.python.core.PyFunction.__call__(PyFunction.java:482)
        at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
        at org.python.core.PyMethod.__call__(PyMethod.java:228)
        at org.python.core.PyMethod.__call__(PyMethod.java:223)
        at org.python.core.Deriveds.dispatch__init__(Deriveds.java:19)
        at org.python.core.PyObjectDerived.dispatch__init__(PyObjectDerived.java:1112)
        at org.python.core.PyType.type___call__(PyType.java:1718)
        at org.python.core.PyType.__call__(PyType.java:1701)
        at org.python.core.PyObject.__call__(PyObject.java:510)
        at org.python.core.PyObject.__call__(PyObject.java:514)
        at SocketServer$py.finish_request$13(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py:334)
        at SocketServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at org.python.core.PyMethod.__call__(PyMethod.java:156)
        at SocketServer$py.process_request$11(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py:322)
        at SocketServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
        at org.python.core.PyFunction.__call__(PyFunction.java:434)
        at org.python.core.PyMethod.__call__(PyMethod.java:156)
        at SocketServer$py._handle_request_noblock$8(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py:298)
        at SocketServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at SocketServer$py.serve_forever$5(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py:241)
        at SocketServer$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/SocketServer.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:132)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:139)
        at werkzeug.serving$py.serve_forever$36(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:500)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
        at org.python.core.PyFunction.__call__(PyFunction.java:413)
        at org.python.core.PyMethod.__call__(PyMethod.java:126)
        at werkzeug.serving$py.inner$46(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:656)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:125)
        at org.python.core.PyFunction.__call__(PyFunction.java:403)
        at werkzeug.serving$py.run_simple$44(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py:691)
        at werkzeug.serving$py.call_function(/Users/pcannata/Mine/P4/P4CarnotKE/jython/dist/Lib/werkzeug/serving.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyFunction.function___call__(PyFunction.java:471)
        at org.python.core.PyFunction.__call__(PyFunction.java:466)
        at org.python.core.PyFunction.__call__(PyFunction.java:461)
        at org.python.core.PyObject._callextra(PyObject.java:615)
        at flask.app$py.run$24(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py:777)
        at flask.app$py.call_function(/v/filer4b/v41q001/cannata/CarnotDist/dist/Lib/flask/app.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
        at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
        at org.python.core.PyFunction.__call__(PyFunction.java:482)
        at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
        at org.python.core.PyMethod.__call__(PyMethod.java:228)
        at org.python.pycode._pyx0.f$0(restful_start.py:14)
        at org.python.pycode._pyx0.call_function(restful_start.py)
        at org.python.core.PyTableCode.call(PyTableCode.java:167)
        at org.python.core.PyCode.call(PyCode.java:18)
        at org.python.core.Py.runCode(Py.java:1401)
        at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:296)
        at org.python.util.jython.run(jython.java:362)
        at org.python.util.jython.main(jython.java:142)
exception: Error occurred during SPARQL query evaluation
(('java.lang.NullPointerException',),)  . . .   

He figured out his problem - he needed to use superstoreorders instead of SuperStoreOrders - but the error message here was terrible, we needed to deliver something useful along the lines of "no such table". I'm not sure if this is JDBC behavior, API behavior or (likely) both that needs to be leveled up, but we need to give better context when things go wrong like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants