Grails 프로젝트에 Neo4j 그래프 데이터베이스를 사용하고 싶습니다. Grails 프로젝트를 새로 만들었습니다. (Intellij Ultimate Edition을 사용하고 있습니다.) 응용 프로그램이 잘 실행됩니다. 내 BuildConfig.groovy에 내가 콘솔에서 다음과 같은 오류가 얻을 프로젝트 업데이트하려고 내가 Neo4j 종속성을 추가하려고하면 ("2.0.0-M02 : neo4j을"컴파일) : 다음은Neo4j GORM 플러그인을 Grails 프로젝트에 추가 할 수 없습니다.
Error |
Resolve error obtaining dependencies: Could not find artifact org.neo4j:neo4j-jdbc:jar:2.0.2 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.neo4j:neo4j-jdbc:jar:2.0.2 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Resolve error obtaining dependencies: Could not find artifact org.neo4j:neo4j-jdbc:jar:2.0.2 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
Error |
Could not find artifact org.neo4j:neo4j-jdbc:jar:2.0.2 in grailsCentral (https://repo.grails.org/grails/plugins)
|Run 'grails dependency-report' for further information.
을 내 BuildConfig.groovy는 :
grails.servlet.version = "3.0" // Change depending on target container compliance (2.5 or 3.0)
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.work.dir = "target/work"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.fork = [
// configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
// compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the test-app JVM, uses the daemon by default
test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
// configure settings for the run-app JVM
run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the run-war JVM
war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
// configure settings for the Console UI JVM
console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
grails.project.dependency.resolver = "maven" // or ivy
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
}
log "error" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
legacyResolve false // whether to do a secondary resolve on plugin installation, not advised and here for backwards compatibility
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
mavenLocal()
grailsCentral()
mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.29'
// runtime 'org.postgresql:postgresql:9.3-1101-jdbc41'
test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
}
plugins {
// plugins for the build system only
build ":tomcat:7.0.55"
// plugins for the compile step
compile ":neo4j:2.0.0-M02"
compile ":scaffolding:2.1.2"
compile ':cache:1.1.8'
compile ":asset-pipeline:1.9.9"
// plugins needed at runtime but not for compilation
runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
runtime ":database-migration:1.4.0"
runtime ":jquery:1.11.1"
// Uncomment these to enable additional asset-pipeline capabilities
//compile ":sass-asset-pipeline:1.9.0"
//compile ":less-asset-pipeline:1.10.0"
//compile ":coffee-asset-pipeline:1.8.0"
//compile ":handlebars-asset-pipeline:1.3.0.3"
}
}
나는 심지어 'Grails의 설치 - 플러그인 neo4j'명령으로 설치하려고하지만이 같은 오류를 얻을. 도움이 될만한 부분이 있습니다. 시간 내 주셔서 감사합니다!
QUICK UPDATE : 나는 의존성을 교체 할 경우 '컴파일 "neo4j : 2.0.0-M02을"' '컴파일 "neo4j : 2.0.0-M01"'함께 잘 작동합니다. 그래서 나는 그것이 최신 버전과 관련이 있다고 생각한다. 누군가가 나에게 그것이 왜 효과가 없는지에 대한 설명을 해주기를 바랍니다.
일부 해결 : Burt Beckwith 덕분에 마침내 이러한 종속성이 작동 할 수있었습니다. 나는 응용 프로그램을 실행할 때 그러나 내가 또 다른 오류가 발생했습니다 :
Error |
2015-01-02 13:25:59,826 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: No bean named 'sessionFactory' is defined
Message: No bean named 'sessionFactory' is defined
Line | Method
->> 104 | postProcessBeanFactory in org.grails.datastore.gorm.plugin.support.PersistenceContextInterceptorAggregator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 262 | run in java.util.concurrent.FutureTask
| 1145 | runWorker . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . in java.lang.Thread
Error |
Forked Grails VM exited with error
종료 : 마지막 오류가 최대 절전 모드 플러그인을 함께 할 수있는 뭔가가 있었다. 나는 그것을 제거하고, Neo4j 만 남겨두고, 앱이 드디어 시작되었습니다. 이것이 의미하는 것은 그것 때문에, BuildConfig.groovy
에 나열된의 repos의 모든 시도하고 그것을 찾을 수 있다는 것입니다 -
제안한 리포지토리 URL을 추가했는데 이제는 다른 오류가 발생합니다. ** 오류를 확인하는 중 오류가 발생했습니다 : grailsCentral **에서 artifact org.neo4j : neo4j-jdbc : zip : 2.0.2를 찾을 수 없습니다. 이제 .zip 파일을 찾을 수 없습니다. 끝이 없습니다 ... – Zan
결국 효과가있었습니다. 나는 의존성을 얻을 수 있었다. 그러나 나는 또 다른 문제를 우연히 발견했다. 지금 내가 응용 프로그램을 실행하려고하면, 그것은 정의되지 않은 일부 'sessionFactory'빈에 대해 불평합니다. – Zan
3 월 5 - 2015 : 현재 jar 버전 2.0.2의 repo URI가 "서버가 요청 URI와 일치하는 것을 찾지 못했습니다." – Nathan