Skip to content
This repository was archived by the owner on Jun 19, 2019. It is now read-only.

More info on errors? #8

Open
virusman opened this issue Jun 25, 2013 · 1 comment
Open

More info on errors? #8

virusman opened this issue Jun 25, 2013 · 1 comment

Comments

@virusman
Copy link

We're getting random errors in neo4j gremlin plugin. Once in a few days it just returns BadInputException/NullPointerException until we restart neo4j.
Error message and stack trace:

javax.script.ScriptException: java.lang.NullPointerException
["org.neo4j.server.plugin.gremlin.GremlinPlugin.executeScript(GremlinPlugin.java:84)",
"java.lang.reflect.Method.invoke(Method.java:601)",
"org.neo4j.server.plugins.PluginMethod.invoke(PluginMethod.java:57)",
"org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:168)",
"org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:300)",
"org.neo4j.server.rest.web.ExtensionService.invokeGraphDatabaseExtension(ExtensionService.java:122)",
"java.lang.reflect.Method.invoke(Method.java:601)"]

So it just rethrows any errors as BadInputException with no way to access the original stack trace. Is it possible to add output of the original stack trace somewhere?

@virusman
Copy link
Author

It seems like the possible solution is to throw BadPluginInvocationException instead of BadInputException and provide the original exception to the constructor. Neo4j resolves such exceptions as output.badRequest( e.getCause() ), providing the original stack trace:
https://github.com/neo4j/neo4j/blob/2.0/community/server/src/main/java/org/neo4j/server/rest/web/ExtensionService.java#L186

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

No branches or pull requests

1 participant