没有方法签名:grails.orm.bootstrap.HibernateDatastoreSpringInitializer [英] No signature of method: grails.orm.bootstrap.HibernateDatastoreSpringInitializer

查看:69
本文介绍了没有方法签名:grails.orm.bootstrap.HibernateDatastoreSpringInitializer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我处于从grails 2.2.4到grails 4.0.8升级过程的中位数,但低于错误.我在Google上进行了搜索,发现 https://github.com/grails/gorm-hibernate5/issue/225 ,但我有gormVersion = gorm.version = 7.0.4.RELEASE;我仍然要从几个小时后面对它.任何帮助表示赞赏!

I am in median of upgrading process from grails 2.2.4 to grails 4.0.8 but getting below error. I searched over google and found https://github.com/grails/gorm-hibernate5/issues/225 but i have gormVersion=gorm.version=7.0.4.RELEASE; Still i am facing it from few hours. Any help appreciated!

build.gradle

build.gradle

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"
    provided "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-ehcache"
    compile "org.hibernate:hibernate-core:5.4.18.Final"
    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.1"
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.2.4"
    testCompile "io.micronaut:micronaut-inject-groovy"
    testCompile "org.grails:grails-gorm-testing-support"
    testCompile "org.mockito:mockito-core"
    testCompile "org.grails:grails-web-testing-support"
    testCompile "org.grails.plugins:geb"
    testCompile "org.seleniumhq.selenium:selenium-remote-driver:3.14.0"
    testCompile "org.seleniumhq.selenium:selenium-api:3.14.0"
    testCompile "org.seleniumhq.selenium:selenium-support:3.14.0"
    testRuntime "org.seleniumhq.selenium:selenium-chrome-driver:3.14.0"
    testRuntime "org.seleniumhq.selenium:selenium-firefox-driver:3.14.0"
    compile "org.grails.plugins:quartz:2.0.13"
    compile "org.quartz-scheduler:quartz:2.2.1"
    compile "org.mongodb.morphia:morphia:0.107"
    compile "org.slf4j:slf4j-api:1.7.30"
    compile "io.netty:netty-all:4.1.60.Final"
    compile "org.jboss.netty:netty:3.2.10.Final"
    compile "com.google.protobuf:protobuf-java:3.15.6"
    compile "org.snmp4j:snmp4j:2.8.6"
    compile "org.ini4j:ini4j:0.5.4"
    compile "net.percederberg.mibble:mibble:2.9.3"
    compile "mysql:mysql-connector-java:8.0.16"
    implementation name: 'protobuf'



}

gradle.properties:

gradle.properties:

grailsVersion=4.0.8
gorm.version=7.0.4.RELEASE
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx1024M

错误快照:

groovy.lang.MissingMethodException: No signature of method: grails.orm.bootstrap.HibernateDatastoreSpringInitializer$_getBeanDefinitions_closure1$_closure3.doCall() is applicable for argument types: (grails.spring.BeanBuilder) values: [grails.spring.BeanBuilder@43dd8f85]
    Possible solutions: doCall(java.lang.Object, java.lang.Object), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:255)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:421)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2330)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2158)
        at org.codehaus.groovy.runtime.dgm$183.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:223)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:70)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at grails.orm.bootstrap.HibernateDatastoreSpringInitializer$_getBeanDefinitions_closure1.doCall(HibernateDatastoreSpringInitializer.groovy:163)
        at grails.orm.bootstrap.HibernateDatastoreSpringInitializer$_getBeanDefinitions_closure1.doCall(HibernateDatastoreSpringInitializer.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:399)
        at grails.plugin.hibernate.HibernateGrailsPlugin$_doWithSpring_closure1.doCall(HibernateGrailsPlugin.groovy:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:399)
        at grails.spring.BeanBuilder.invokeBeanDefiningClosure(BeanBuilder.java:759)
        at grails.spring.BeanBuilder.beans(BeanBuilder.java:588)
        at grails.spring.BeanBuilder.invokeMethod(BeanBuilder.java:531)
        at org.grails.plugins.DefaultGrailsPlugin.doWithRuntimeConfiguration(DefaultGrailsPlugin.java:543)
        at org.grails.plugins.AbstractGrailsPluginManager.doRuntimeConfiguration(AbstractGrailsPluginManager.java:166)
        at grails.boot.config.GrailsApplicationPostProcessor.postProcessBeanDefinitionRegistry(GrailsApplicationPostProcessor.groovy:171)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
        at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:125)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
    Disconnected from the target VM, address: 'localhost:52128', transport: 'socket'
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:99)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:485)
        at grails.boot.GrailsApp.run(GrailsApp.groovy:472)
        at ngpgsems.Application.main(Application.groovy:11)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

推荐答案

您应在 gradle.properties 文件中将 gorm.version = 7.0.8.RELEASE 设置为与项目中的其他依赖项兼容.

You should set gorm.version=7.0.8.RELEASE in your gradle.properties file to be compatible with other dependencies in your project.

https://github.com/jeffbrown/avaneeshkumarshuklaversions 中查看该项目.

此提交使问题消失: https://github.com/jeffbrown/avaneeshkumarshuklaversions/commit/43435abb93422251c4a55c3180946775b3e68137

这篇关于没有方法签名:grails.orm.bootstrap.HibernateDatastoreSpringInitializer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆