Sitelet https://github.com/ArcadeData/arcadedb/issues/1357
Skip to content

Error using HTTP POST query with sqlscript #1357

Description

@gramian

ArcadeDB Version:

ArcadeDB Server v23.11.1-SNAPSHOT (build c7e87a2688051ae4d9080da32b6751710bdee2cc/1701288833453/main)

OS and JDK Version:

Running on Mac OS X 12.7 - OpenJDK 64-Bit Server VM 17.0.9 (Homebrew)

Expected behavior

1

Actual behavior

java.lang.NullPointerException: Cannot invoke "com.arcadedb.database.DatabaseInternal.getExecutionPlanCache()" because "db" is null
	at com.arcadedb.query.sql.executor.SelectExecutionPlanner.createExecutionPlan(SelectExecutionPlanner.java:120)
	at com.arcadedb.query.sql.parser.SelectStatement.createExecutionPlan(SelectStatement.java:215)
	at com.arcadedb.query.sql.parser.Statement.createExecutionPlan(Statement.java:100)
	at com.arcadedb.query.sql.SQLScriptQueryEngine.executeInternal(SQLScriptQueryEngine.java:182)
	at com.arcadedb.query.sql.SQLScriptQueryEngine.query(SQLScriptQueryEngine.java:82)
	at com.arcadedb.database.LocalDatabase.query(LocalDatabase.java:1365)
	at com.arcadedb.server.ServerDatabase.query(ServerDatabase.java:489)
	at com.arcadedb.server.http.handler.PostQueryHandler.executeCommand(PostQueryHandler.java:38)
	at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:110)
	at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:99)
	at com.arcadedb.server.http.handler.AbstractServerHttpHandler.handleRequest(AbstractServerHttpHandler.java:127)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
	at java.base/java.lang.Thread.run(Thread.java:840)

Steps to reproduce

curl -X POST http://localhost:2480/api/v1/query/test -d '{ "language": "sqlscript", "command": "Select 1" }' -H "Content-Type: application/json" --user root:arcadedb

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions