Neo4j Gemeinschaft 2.3.3 Linux (Ubuntu 14,04)Neo4j „Keine Abhängigkeit erfüllt Typklasse org.neo4j.kernel.api.index.SchemaIndexProvider“
Der Versuch, eine Java-Anwendung ausführen, die ein Kafka Thema verbraucht, dabei, seine Nachrichten während der Abfrage von Neo4j und schreibt sie in ein anderes Kafka-Thema.
[email protected]:~$ java -jar gradle1-0.1.0.jar localhost:9092 musicgrp raw-events enriched-events bad-events /home/ubuntu/GeoLiteCity.dat
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /home/hduser/neo4jdb2/data/graph.db
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:143)
at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:43)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:129)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:117)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:185)
at music.StreamApp.main(StreamApp.java:40)
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:462)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:112)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:111)
at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:139)
... 6 more
Caused by: org.neo4j.kernel.impl.util.UnsatisfiedDependencyException: No dependency satisfies type class org.neo4j.kernel.api.index.SchemaIndexProvider
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:78)
at org.neo4j.kernel.impl.util.Dependencies.resolveDependency(Dependencies.java:74)
at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:507)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:452)
... 11 more
Das ist mein gradle.build, las ich einige Post über das Halten Neo4j Gläser aus dem Bündel ... von mit --classpath
seine Gläser zeigen ... ich Gradle neu bin, ist dies relevant?
apply plugin: 'java'
apply plugin: 'application'
sourceCompatibility = '1.8'
mainClassName = 'music.StreamApp'
repositories {
mavenCentral()
}
version = '0.1.0'
dependencies {
compile 'org.apache.kafka:kafka-clients:0.9.0.0'
compile 'com.maxmind.geoip:geoip-api:1.2.14'
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.3'
compile 'org.slf4j:slf4j-api:1.7.5'
compile 'org.neo4j:neo4j:2.3.3'
}
jar { // c
manifest {
attributes 'Main-Class': mainClassName
}
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
}
}
Ja, der Hauptindexanbieter lebt in neo4j-lucene-index jar, also stellen Sie sicher, dass er im Klassenpfad enthalten ist –
TEST1: manuell hinzugefügt META-INF/services/org.neo4j.kernel.extension.KernelExtensionFactory unter ./src/main/java; hinzugefügt 'compile 'org.neo4j: neo4j-lucene-index: 2.3.3'' in' dependencies {} 'und' from (' ./src/main/java ') {include' META-INF/services/org. neo4j.kernel.extension.KernelExtensionFactory '} 'in' jar {} '; führe gradle jar. ERGEBNIS: GLEICHER FEHLER. – guzu92
TEST2: TEST1 + Schatten-Plugin, hinzugefügt 'plugins { id 'java' ID 'Anwendung' ID 'com.github.johnrengelman.shadow' Version '1.2.3' }'; Führen Sie Gradle ShadowJar. ERGEBNIS: ERFOLG! – guzu92