2017-11-07 2 views
0

Ich habe die Plugins von graphaware nlp, open-nlp, framework heruntergeladen und die jar-Dateien in das plugins-Verzeichnis kopiert.neo4j - graphaware plugins

Und nach den Schritten in Neo4j, enthalten i die folgenden Zeilen in neo4j.config Datei

dbms.unmanaged_extension_classes=com.graphaware.server=/graphaware 
com.graphaware.runtime.enabled=true 
com.graphaware.module.NLP.2=com.graphaware.nlp.module.NLPBootstrapper 

dies die localhost Nach dem Einfügen: 7474 startet nicht.

Aber wenn ich diese Zeilen kommentieren, startet und funktioniert localhost korrekt, aber enthält die Plugins nicht.

Version: Enterprise 3.1.3

Fehler in LocalLost nach diese Zeilen zu kommentieren:

Failed to invoke procedure `ga.nlp.annotate`: Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: No GraphAware Runtime is registered with the given database 

Fehler in Protokolldatei:

2017-11-07 10:41:03.839+0000 INFO ======== Neo4j 3.1.3 ======== 
2017-11-07 10:41:04.120+0000 INFO Starting... 
SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/usr/share/neo4j/lib/slf4j-nop-1.7.22.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/var/lib/neo4j/plugins/nlp-opennlp-3.1.3.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 
SLF4J: Actual binding is of type [org.slf4j.helpers.NOPLoggerFactory] 
2017-11-07 10:41:04.985+0000 INFO Bolt enabled on localhost:7687. 
2017-11-07 10:41:05.010+0000 INFO Initiating metrics... 
2017-11-07 10:41:07.374+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime enabled, bootstrapping... 
2017-11-07 10:41:07.444+0000 INFO [c.g.r.b.RuntimeKernelExtension] Bootstrapping module with order 2, ID NLP, using com.graphaware.nlp.module.NLPBootstrapper 
2017-11-07 10:41:07.523+0000 INFO Registering module NLP with GraphAware Runtime. 
2017-11-07 10:41:07.523+0000 INFO [c.g.r.b.RuntimeKernelExtension] GraphAware Runtime bootstrapped, starting the Runtime... 
2017-11-07 10:41:21.893+0000 INFO Starting GraphAware... 
2017-11-07 10:41:21.894+0000 INFO Loading module metadata... 
2017-11-07 10:41:21.894+0000 INFO Loading metadata for module NLP 
2017-11-07 10:41:21.946+0000 INFO Module NLP seems to have been registered for the first time. 
2017-11-07 10:41:21.947+0000 INFO Module NLP seems to have been registered for the first time, will try to initialize... 
2017-11-07 10:41:21.947+0000 INFO InitializeUntil set to 9223372036854775807 and it is 1510051281947. Will initialize. 
2017-11-07 10:41:24.709+0000 INFO Started. 
2017-11-07 10:41:24.811+0000 INFO Mounted REST API at: /db/manage 
2017-11-07 10:41:24.823+0000 INFO [c.g.s.f.b.GraphAwareServerBootstrapper] started 
2017-11-07 10:41:24.825+0000 INFO Mounted unmanaged extension [com.graphaware.server] at [/graphaware] 
Exception in thread "GraphAware Starter" java.lang.RuntimeException: Error while initializing model of class: class opennlp.tools.namefind.TokenNameFinderModel 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.loadModel(OpenNLPPipeline.java:503) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.lambda$loadNamedEntitiesFinders$2(OpenNLPPipeline.java:161) 
    at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1691) 
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.loadNamedEntitiesFinders(OpenNLPPipeline.java:158) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.init(OpenNLPPipeline.java:118) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.<init>(OpenNLPPipeline.java:108) 
    at com.graphaware.nlp.processor.opennlp.PipelineBuilder.build(PipelineBuilder.java:79) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPTextProcessor.createPhrasePipeline(OpenNLPTextProcessor.java:106) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPTextProcessor.init(OpenNLPTextProcessor.java:56) 
    at com.graphaware.nlp.processor.TextProcessorsManager.lambda$initiateTextProcessors$0(TextProcessorsManager.java:61) 
    at java.util.HashMap$Values.forEach(HashMap.java:980) 
    at com.graphaware.nlp.processor.TextProcessorsManager.initiateTextProcessors(TextProcessorsManager.java:60) 
    at com.graphaware.nlp.processor.TextProcessorsManager.<init>(TextProcessorsManager.java:37) 
    at com.graphaware.nlp.NLPManager.init(NLPManager.java:95) 
    at com.graphaware.nlp.module.NLPModule.initialize(NLPModule.java:52) 
    at com.graphaware.runtime.manager.ProductionTxDrivenModuleManager.initialize(ProductionTxDrivenModuleManager.java:57) 
    at com.graphaware.runtime.manager.BaseTxDrivenModuleManager.initializeIfAllowed(BaseTxDrivenModuleManager.java:128) 
    at com.graphaware.runtime.manager.BaseTxDrivenModuleManager.handleNoMetadata(BaseTxDrivenModuleManager.java:72) 
    at com.graphaware.runtime.manager.BaseTxDrivenModuleManager.handleNoMetadata(BaseTxDrivenModuleManager.java:39) 
    at com.graphaware.runtime.manager.BaseModuleManager.loadMetadata(BaseModuleManager.java:143) 
    at com.graphaware.runtime.manager.BaseModuleManager.loadMetadata(BaseModuleManager.java:125) 
    at com.graphaware.runtime.TxDrivenRuntime.loadMetadata(TxDrivenRuntime.java:130) 
    at com.graphaware.runtime.ProductionRuntime.loadMetadata(ProductionRuntime.java:80) 
    at com.graphaware.runtime.BaseGraphAwareRuntime.startModules(BaseGraphAwareRuntime.java:154) 
    at com.graphaware.runtime.TxDrivenRuntime.startModules(TxDrivenRuntime.java:146) 
    at com.graphaware.runtime.ProductionRuntime.startModules(ProductionRuntime.java:70) 
    at com.graphaware.runtime.BaseGraphAwareRuntime.start(BaseGraphAwareRuntime.java:134) 
    at com.graphaware.runtime.bootstrap.RuntimeKernelExtension.lambda$start$8(RuntimeKernelExtension.java:117) 
    at java.lang.Thread.run(Thread.java:748) 
Caused by: java.lang.reflect.InvocationTargetException 
    at sun.reflect.GeneratedConstructorAccessor29.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.loadModel(OpenNLPPipeline.java:499) 
    ... 29 more 
Caused by: java.lang.OutOfMemoryError: Java heap space 
    at opennlp.tools.ml.model.AbstractModelReader.getParameters(AbstractModelReader.java:140) 
    at opennlp.tools.ml.maxent.io.GISModelReader.constructModel(GISModelReader.java:78) 
    at opennlp.tools.ml.model.GenericModelReader.constructModel(GenericModelReader.java:62) 
    at opennlp.tools.ml.model.AbstractModelReader.getModel(AbstractModelReader.java:85) 
    at opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:32) 
    at opennlp.tools.util.model.GenericModelSerializer.create(GenericModelSerializer.java:29) 
    at opennlp.tools.util.model.BaseModel.finishLoadingArtifacts(BaseModel.java:309) 
    at opennlp.tools.util.model.BaseModel.loadModel(BaseModel.java:239) 
    at opennlp.tools.util.model.BaseModel.<init>(BaseModel.java:173) 
    at opennlp.tools.namefind.TokenNameFinderModel.<init>(TokenNameFinderModel.java:103) 
    at sun.reflect.GeneratedConstructorAccessor29.newInstance(Unknown Source) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.loadModel(OpenNLPPipeline.java:499) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.lambda$loadNamedEntitiesFinders$2(OpenNLPPipeline.java:161) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline$$Lambda$239/1188677545.accept(Unknown Source) 
    at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1691) 
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.loadNamedEntitiesFinders(OpenNLPPipeline.java:158) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.init(OpenNLPPipeline.java:118) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPPipeline.<init>(OpenNLPPipeline.java:108) 
    at com.graphaware.nlp.processor.opennlp.PipelineBuilder.build(PipelineBuilder.java:79) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPTextProcessor.createPhrasePipeline(OpenNLPTextProcessor.java:106) 
    at com.graphaware.nlp.processor.opennlp.OpenNLPTextProcessor.init(OpenNLPTextProcessor.java:56) 
    at com.graphaware.nlp.processor.TextProcessorsManager.lambda$initiateTextProcessors$0(TextProcessorsManager.java:61) 
    at com.graphaware.nlp.processor.TextProcessorsManager$$Lambda$234/2094381213.accept(Unknown Source) 
    at java.util.HashMap$Values.forEach(HashMap.java:980) 
    at com.graphaware.nlp.processor.TextProcessorsManager.initiateTextProcessors(TextProcessorsManager.java:60) 
    at com.graphaware.nlp.processor.TextProcessorsManager.<init>(TextProcessorsManager.java:37) 
    at com.graphaware.nlp.NLPManager.init(NLPManager.java:95) 
    at com.graphaware.nlp.module.NLPModule.initialize(NLPModule.java:52) 
    at com.graphaware.runtime.manager.ProductionTxDrivenModuleManager.initialize(ProductionTxDrivenModuleManager.java:57) 

mir bitte helfen Sie

Antwort

0

aus haben nicht genügend Speicher für die NLP-Plugins zu laden, daher ist das NLP-Modul nicht registriert und somit nicht verfügbar, sobald die Datenbank gestartet wurde.

Wie in der README des NLP-Plugins angegeben, benötigen Sie mindestens 4 GB Heap, damit die Module ausgeführt werden können. Passen Sie sie in Ihrer neo4j.conf an und starten Sie sie neu.

Verwandte Themen