My application does not start with the following error. I am using java jdk 1.8 with grails 4.0.2 and spring security plugin 4.0.0
. here is the error
“谢谢你的帮助”
java.lang.illegalaccesserror:尝试访问方法grails.plugin.springsecurity.springsecuritycoregrailsplugin.createbeanlist(ljava/lang/object;)ljava/lang/object;来自grails.plugin.springsecurity.springsecuritycoregrailsplugin$createbeanlist的类grails.plugin.springsecurity.springsecuritycoregrailsplugin$createbeanlist.callcurrent(未知源),位于org.codehaus.groovy.runtime.callsite.callsitearray.defaultcallcurrent(callsitearray)。java:51)在org.codehaus.groovy.runtime.callsite.abstractcallsite.callcurrent(abstractcallsite。java:171)位于org.codehaus.groovy.runtime.callsite.abstractcallsite.callcurrent(abstractcallsite。java:185)atgrails.plugin.springsecurity.springsecuritycoregrailsplugin.dowithapplicationcontext(springsecuritycoregrailsplugin)。groovy:687)在org.grails.plugins.defaultgrailsplugin.dowithapplicationcontext(defaultgrailsplugin。java:507)位于org.grails.plugins.abstractgrailspluginmanager.dopostprocessing(abstractgrailspluginmanager)。java:223)atgrails.boot.config.grailsapplicationpostprocessor.onapplicationevent(grailsapplicationpostprocessor)。groovy:259)在grails.boot.config.grailsapplicationpostprocessor.onapplicationevent(grailsapplicationpostprocessor.groovy)
atorg.springframework.context.event.simpleapplicationeventmulticaster.doinvokelistener(simpleapplicationeventmulticaster。java:172)位于org.springframework.context.event.simpleapplicationeventmulticaster.invokelistener(simpleapplicationeventmulticaster。java:165)
位于org.springframework.context.event.simpleapplicationeventmulticaster.multicastevent(simpleapplicationeventmulticaster)。java:139)
位于org.springframework.context.support.abstractapplicationcontext.publishevent(abstractapplicationcontext)。java:403)位于org.springframework.context.support.abstractapplicationcontext.publishevent(abstractapplicationcontext)。java:360)位于org.springframework.context.support.abstractapplicationcontext.finishrefresh(abstractapplicationcontext)。java:897) 位于org.springframework.boot.web.servlet.context.servletwebserverapplicationcontext.finishrefresh(servletwebserverapplicationcontext)。java:162)在org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext。java:553)在org.springframework.boot.web.servlet.context.servletwebserverapplicationcontext.refresh(servletwebserverapplicationcontext。java:141)在org.springframework.boot.springapplication.refresh(springapplication。java:747)位于org.springframework.boot.springapplication.refreshcontext(springapplication。java:397)在org.springframework.boot.springapplication.run(springapplication。java:315)在grails.boot.grailsapp.run(grailsapp。groovy:96)
在grails.boot.grailsapp.run(grailsapp。groovy:456)在grails.boot.grailsapp.run(grailsapp。groovy:443)at application.main(应用程序。groovy:11)在sun.reflect.nativemethodaccessorimpl.invoke0(本机方法)在sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl)。java:62)在sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl。java:43)在java.lang.reflect.method.invoke(方法。java:498)在org.springframework.boot.devtools.restart.restartlauncher.run(restartlauncher。java:49) here is the build.gradle file
```
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
maven { url "http://repo.grails.org/grails/plugins/" }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.10"
classpath "gradle.plugin.com.energizedwork.webdriver-binaries:webdriver-binaries-gradle-plugin:1.4"
classpath 'org.grails.plugins:database-migration:3.1.0.RC1'
}
}
version "0.1"
group "Appgrails4"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"com.energizedwork.webdriver-binaries"
apply plugin:"com.bertramlabs.asset-pipeline"
apply plugin:"org.grails.grails-gsp"
repositories {
mavenLocal()
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
maven { url "http://repo.grails.org/grails/plugins/" }
maven { url "https://repo1.maven.org/maven2/"}
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
sourceSets {
main {
resources {
srcDir 'grails-app/migrations'
}
}
}
dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
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-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:events"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.4.0.Final"
compile 'org.grails.plugins:csv:1.0.1'
compile "org.gebish:geb-core:0.9.2"
compile "org.grails.plugins:gsp"
compileOnly "io.micronaut:micronaut-inject-groovy"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "org.glassfish.web:el-impl:2.1.2-b03"
runtime "com.h2database:h2"
runtime "org.apache.tomcat:tomcat-jdbc"
runtime "javax.xml.bind:jaxb-api:2.3.0"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
compile "org.grails.plugins:geb"
compile 'org.grails.plugins:ajax-tags:1.0.0.RC1'
compile "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
compile "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
compile "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
runtime "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testCompile "org.apache.httpcomponents:httpclient:4.3.2"
compile 'org.grails.plugins:spring-security-core:4.0.0'
compile 'org.grails.plugins:gsp:4.0.2'
compile 'joda-time:joda-time:2.10.6'
compile 'commons-io:commons-io:2.6'
compile 'org.grails.plugins:quartz:2.0.13'
compile 'org.quartz-scheduler:quartz:2.2.1'
compile 'org.apache.commons:commons-math3:3.6.1'
compile 'org.grails.plugins:hibernate-search:2.4.0'
runtime "org.postgresql:postgresql:42.2.12"
compile 'org.grails.plugins:mail:3.0.0'
compile 'org.grails.plugins:database-migration:3.1.0.RC1'
compile 'org.liquibase:liquibase-core:3.6.1'
}
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
systemProperties = System.properties
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
webdriverBinaries {
chromedriver "$chromedriverVersion"
geckodriver "$geckodriverVersion"
}
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
testLogging {
events "passed", "skipped", "failed"
exceptionFormat 'full'
}
}
assets {
minifyJs = true
minifyCss = true
}
grails { pathingJar = true }
暂无答案!
目前还没有任何答案,快来回答吧!