问题描述
我遇到了grailsVersion = 3.3.0.M1和gradleWrapperVersion = 3.0的问题。无论何时运行该项目,我都会收到以下错误消息。
尝试:使用--stacktrace选项来获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。错误|无法启动服务器(使用--stacktrace查看完整跟踪)
完成退出代码1
我试图在build.gradle中升级插件,但错误仍然存在。
我的build.gradle如下
buildscript {
repositories {
mavenLocal()
maven {urlhttps://repo.grails.org/grails/core}
}
依赖项{
classpathorg.grails:grails-gradle-plugin: $ grailsVersion
classpathorg.grails.plugins:hibernate5:6.0.7
classpathorg.grails.plugins:views-gradle:1.1.5
classpath'com.bertramlabs .plugins:asset-pipeline-gradle:2.10.1'
classpathorg.grails.plugins:views-gradle:1.2.0
}}
version0.5 .1grouptest
apply plugin:eclipseapply plugin:ideaapply plugin:warapply plugin:org.grails.grails-web应用插件:org.grails.plugins.views-json
存储库{
mavenLocal()
maven {urlhttps://repo.grails.org/grails / core}
maven {url'http://dl.bintray.com/agorapulse/libs'}}
dependencyManagement {
imports {
mavenBom org.grails:grails-bom:$ grailsVersion
applyMavenExclusions false}
依赖项{
compileorg.springframework.boot:spring-boot-starter -logging
compileorg.springframework.boot:spring-boot-autoconfigure
compileorg.grails:grails-core
compileorg.springframework.boot:spring-boot
编译org.springframework.boot:spring-boot-starter-tomcat
compileorg.grails:grails-plugin-url-mappings
compileorg.springframework.boot: .grails:grails-plugin-rest
compileorg.grails:grails-plugin-codecs
compileorg.grails:grails-plugin-interceptors
compileorg.grails :Grails的-插件-SE rils
compileorg.grails:grails-plugin-datasource
compileorg.grails:grails-plugin-databinding
compileorg.grails:grails-plugin-async
compileorg.grails:grails-web-boot
compileorg.grails:grails-logging
compileorg.grails.plugins:cache
compile org.grails.plugins:hibernate5
compileorg.hibernate:hibernate-core:5.1.2.Final
compileorg.hibernate:hibernate-ehcache:5.1.2.Final
编译org.grails.plugins:views-json:1.2.1
compileorg.grails.plugins:views-json-templates:1.2.1
consoleorg.grails: grails-console
profileorg.grails.profiles:rest-api
runtimecom.h2database:h2
testCompileorg.grails:grails-plugin-testing
testCompileorg.grails.plugins:geb
testCompileorg.grails:grails-datastore-rest-client
testRuntimeorg.seleniumhq.selenium:selenium-htmlunit-driver:2.47。 1
testRuntimenet.sour ceforge.htmlunit:htmlunit:2.18
runtime'mysql:mysql-connector-java:5.1.36'
compile'org.grails.plugins:aws-sdk-s3:2.1。 5'
compile'org.grails.plugins:spring-security-core:3.1.1'
compileorg.grails.plugins:spring-security-rest:2.0.0.M2
compile'com.nayidisha.grails.uploadr:grails3-uploadr:3.1.0'
compile'org.grails.plugins:joda-time:2.0.0'
compile' org.grails.plugins:quartz:2.0.9'
compile'org.grails.plugins:wkhtmltopdf:1.0.0.RC7'
compile'org.grails.plugins:rabbitmq:2.0.0'
compile'org.grails.plugins:excel-import:3.0.0.RC2'
compile'com.bertramlabs.plugins:selfie:1.1.1'
compileorg.grails。插件:swaggydoc-grails3:0.26.0
compileorg.grails:grails-dependencies
ootRun {
jvmArgs(' - Dspring.output.ansi.enabled = always')}
grails {
pathingJar = true}
有没有人遇到过这个问题?如何解决这个问题?
compile'org.grails.plugins:spring- security-core:3.1.1'
不兼容3.3 - 使用
compile'org.grails.plugins:spring-security-core:3.2.0.M1'
另外我建议使用您使用的grails版本的gradle包装器。 3.0是相当古老的。
您可以在这里看到我的3.3.0升级说明
另外3.3.0.M2刚刚发布,一堆修复。
I have a problem with grailsVersion=3.3.0.M1 and gradleWrapperVersion=3.0. Whenever I run the project I get the following error.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error | Failed to start server (Use --stacktrace to see the full trace)
Process finished with exit code 1
I have tried to upgrade my plugins in build.gradle but the error remains the same.
My build.gradle is as follows
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:hibernate5:6.0.7"
classpath "org.grails.plugins:views-gradle:1.1.5"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.10.1'
classpath "org.grails.plugins:views-gradle:1.2.0"
} }
version "0.5.1" group "test"
apply plugin:"eclipse" apply plugin:"idea" apply plugin:"war" apply plugin:"org.grails.grails-web" apply plugin:"org.grails.plugins.views-json"
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
maven { url 'http://dl.bintray.com/agorapulse/libs' } }
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false }
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-codecs"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-datasource"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-async"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.1.2.Final"
compile "org.hibernate:hibernate-ehcache:5.1.2.Final"
compile "org.grails.plugins:views-json:1.2.1"
compile "org.grails.plugins:views-json-templates:1.2.1"
console "org.grails:grails-console"
profile "org.grails.profiles:rest-api"
runtime "com.h2database:h2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-datastore-rest-client"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
runtime 'mysql:mysql-connector-java:5.1.36'
compile 'org.grails.plugins:aws-sdk-s3:2.1.5'
compile 'org.grails.plugins:spring-security-core:3.1.1'
compile "org.grails.plugins:spring-security-rest:2.0.0.M2"
compile 'com.nayidisha.grails.uploadr:grails3-uploadr:3.1.0'
compile 'org.grails.plugins:joda-time:2.0.0'
compile 'org.grails.plugins:quartz:2.0.9'
compile 'org.grails.plugins:wkhtmltopdf:1.0.0.RC7'
compile 'org.grails.plugins:rabbitmq:2.0.0'
compile 'org.grails.plugins:excel-import:3.0.0.RC2'
compile 'com.bertramlabs.plugins:selfie:1.1.1'
compile "org.grails.plugins:swaggydoc-grails3:0.26.0"
compile "org.grails:grails-dependencies"
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always') }
grails {
pathingJar = true }
Has anyone faced this issue? How do I resolve this?
compile 'org.grails.plugins:spring-security-core:3.1.1'
Is not compatible with 3.3 - use
compile 'org.grails.plugins:spring-security-core:3.2.0.M1'
Also I'd suggest using the gradle wrapper that the grails version you use ships with. 3.0 is quite old.
You can see my 3.3.0 Upgrade notes here https://gist.github.com/erichelgeson/72e1b6cb8e1b9428738799368c32133f
Also 3.3.0.M2 was just released today with a bunch of fixes.
这篇关于运行Grails项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!