Wondering if there is a configuration i need for my transaction so that its not read only...
I get an error when creating a node in a procedure. The error is
Caused by: org.neo4j.graphdb.security.AuthorizationViolationException: Write operations are not allowed for READ
transactions.
Test that calls the procedure is -
@Test
public void testLoad() throws Exception {
GraphDatabaseService db = new TestGraphDatabaseFactory().newImpermanentDatabase();
((GraphDatabaseAPI) db).getDependencyResolver().resolveDependency(Procedures.class)
.register(LiveServiceLoad.class);
Result res = db.execute("CALL load.hello()");
}
Procedure that causes error -
@Procedure
public Stream<Output> loadTimeTable() {
try ( Transaction tx = db.beginTx() )
{
Node liveServiceNode = db.createNode(Label.label("LiveService"));