Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/rest/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 安装Neo4j REST服务器插件_Java_Rest_Plugins_Amazon Ec2_Neo4j - Fatal编程技术网

Java 安装Neo4j REST服务器插件

Java 安装Neo4j REST服务器插件,java,rest,plugins,amazon-ec2,neo4j,Java,Rest,Plugins,Amazon Ec2,Neo4j,我正在尝试基于以下内容为Neo4j REST服务器创建示例服务器插件 我用neo4j1.7.2ceubuntu12.0464位(ami-f3c8679a)安装了amazonec2实例,它工作正常-我在尝试获取MyEC2DNS:7474/db/data时得到了正确的响应,所以服务器正常 日蚀 创建新的Java项目 创建libs文件夹,并从下载的1.7.2 Neo4j社区版-Neo4j-Community-1.7.2/lib复制所有文件,并将其添加到构建路径 在package com.neo4j.

我正在尝试基于以下内容为Neo4j REST服务器创建示例服务器插件

我用
neo4j1.7.2ceubuntu12.0464位(ami-f3c8679a)
安装了amazonec2实例,它工作正常-我在尝试获取
MyEC2DNS:7474/db/data
时得到了正确的响应,所以服务器正常

日蚀

  • 创建新的Java项目
  • 创建
    libs
    文件夹,并从下载的
    1.7.2 Neo4j社区版
    -
    Neo4j-Community-1.7.2/lib
    复制所有文件,并将其添加到构建路径
  • package com.neo4j.server.plugins.example
    中创建了包含内容的示例类
代码(来自)

当我获取
MyEC2DNS:7474/db/data
时,扩展仍然不可见


想法?我的猜测是,这个插件可能太大了(不需要包含所有这些.jar,但另一种方法是什么——如何将它们放在相对路径中?)。

解决了,除了

定位在Java项目文件夹中并执行jar-cvf get_all.jar*-我得到了~13Mb.jar文件

应该是哪一个

-在Eclipse中转到File-Export-JAR-导出除“lib”文件夹之外的所有内容


然后它工作得很好,当然插件本身只有~100KB。

为了验证,您是否尝试过将neo4j-server-examples.jar放入plugins文件夹并使其工作?
@Description("An extension to the Neo4j Server for getting all nodes or relationships")
public class GetAll extends ServerPlugin {

    @Name("get_all_nodes")
    @Description("Get all nodes from the Neo4j graph database")
    @PluginTarget( GraphDatabaseService.class)
    public Iterable<Node> getAllNodes(@Source GraphDatabaseService graphDb) {
        return GlobalGraphOperations.at(graphDb).getAllNodes();
    }

    @Description("Get all relationships from the Neo4j graph database")
    @PluginTarget(GraphDatabaseService.class)
    public Iterable<Relationship> getAllRelationships(@Source GraphDatabaseService graphDb) {
        return GlobalGraphOperations.at(graphDb).getAllRelationships();
    }
}
Stopping Neo4j server [1718].... done
./bin/neo4j: line 174: ulimit: open files: cannot modify limit: Operation not permitted
Starting Neo4j Server...WARNING: not chaning user
process [1891]... waiting for server to be ready...... OK