Neo4j-3.0.3でストアドプロシージャを作成するためのサンプルScalaコードはありますか?Neo4j 3.0.3 Scalaのストアドプロシージャ
私は1つの簡単なScalaベースのストアドプロシージャを作成しようとしています。以下は私がのNeo4j-pluginsディレクトリに自分のscala-jarファイルをコピーしてのNeo4jサーバを起動したときに私が取得エラーメッセージです:
================= Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component '[email protected]' 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: Unable to find a usable public no-argument constructor in the class `neoscala`. Please add a valid, public constructor, recompile the class and try again. =================
私が使用しているScalaのクラスがされています。
package neoproc import org.neo4j.graphdb.GraphDatabaseService import org.neo4j.procedure.Procedure; import javax.ws.rs.core.{Context, Response} class neoscala(@Context db: GraphDatabaseService) { @Procedure def alice():String = { String.valueOf(db.execute("MATCH (n:User) return n")); } }