Last active
September 18, 2016 05:24
-
-
Save fbiville/a49b8328a0dd7257a1e1ea5d95b227fe to your computer and use it in GitHub Desktop.
Neo4j (3.0.4) stored procedure records cannot contain record types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Record { | |
public Record record; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.neo4j.procedure.Procedure; | |
import java.util.stream.Stream; | |
public class StoredProcedure { | |
@Procedure | |
public Stream<Record> proc() { | |
return Stream.empty(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> javac -d output -cp /path/to/neo4j-kernel-3.0.6.jar:. *.java | |
$> cd output && jar cf sproc-test.jar *.class && cd - | |
$> cp /path/to/output/sproc-test.jar $NEO4J_HOME/plugins && $NEO4J_HOME/bin/neo4j restart && tail -f $NEO4J_HOME/logs/*.log | |
[...] | |
==> $NEO4J_HOME/logs/neo4j.log <== | |
2016-09-18 05:19:28.553+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@102051cf' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@102051cf' was successfully initialized, but failed to start. Please see attached cause exception. | |
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@102051cf' was successfully initialized, but failed to start. Please see attached cause exception. | |
at org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68) | |
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217) | |
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:90) | |
at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:67) | |
at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28) | |
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@102051cf' was successfully initialized, but failed to start. Please see attached cause exception. | |
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444) | |
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) | |
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189) | |
... 3 more | |
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, $NEO4J_HOME/data/databases/graph.db | |
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144) | |
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40) | |
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108) | |
at org.neo4j.server.CommunityNeoServer.lambda$static$0(CommunityNeoServer.java:55) | |
at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89) | |
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434) | |
... 5 more | |
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.proc.Procedures@42fc2e2b' was successfully initialized, but failed to start. Please see attached cause exception. | |
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444) | |
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107) | |
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140) | |
... 10 more | |
Caused by: org.neo4j.kernel.api.exceptions.ProcedureException: Field `record` in record `Record` cannot be converted to a Neo4j type: Don't know how to map `class Record` to the Neo4j Type System. | |
Please refer to to the documentation for full details. | |
For your reference, known types are: [boolean, class java.lang.Boolean, class java.lang.Double, class java.lang.Long, class java.lang.Number, class java.lang.Object, class java.lang.String, double, interface java.util.List, interface java.util.Map, interface org.neo4j.graphdb.Node, interface org.neo4j.graphdb.Path, interface org.neo4j.graphdb.Relationship, long] | |
at org.neo4j.kernel.impl.proc.OutputMappers.mapper(OutputMappers.java:207) | |
at org.neo4j.kernel.impl.proc.OutputMappers.mapper(OutputMappers.java:174) | |
at org.neo4j.kernel.impl.proc.ReflectiveProcedureCompiler.compileProcedure(ReflectiveProcedureCompiler.java:106) | |
at org.neo4j.kernel.impl.proc.ReflectiveProcedureCompiler.compile(ReflectiveProcedureCompiler.java:84) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment