grails 3.1.10 with spring boot using 1.4.0.RELEASE is throwing Failed to instantiate ch.qos.logback

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

grails 3.1.10 with spring boot using 1.4.0.RELEASE is throwing Failed to instantiate ch.qos.logback

Grails Dev Discuss mailing list
HiĀ 

We are upgrading grails version 3.0.9 to 3.1.10 with spring boot 1.4.0.RELEASE and when i try to compile i am getting this error:

Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
java.lang.NoSuchMethodError: ch.qos.logback.core.util.Loader.getResourceOccurrenceCount(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/util/Set;
at ch.qos.logback.classic.util.ContextInitializer.multiplicityWarning(ContextInitializer.java:173)
at ch.qos.logback.classic.util.ContextInitializer.statusOnResourceSearch(ContextInitializer.java:196)
at ch.qos.logback.classic.util.ContextInitializer.getResource(ContextInitializer.java:143)
at ch.qos.logback.classic.util.ContextInitializer.findURLOfDefaultConfigurationFile(ContextInitializer.java:127)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:140)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:119)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:328)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:280)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
at org.apache.commons.logging.LogFactory$getLog.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at ciab.base.Application.<clinit>(Application.groovy)
Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.context.ApplicationContextInitializer : org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:412)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:392)
at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:383)
at org.springframework.boot.SpringApplication.initialize(SpringApplication.java:261)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:237)
at grails.boot.GrailsApp.<init>(GrailsApp.groovy)
at grails.boot.GrailsApp.run(GrailsApp.groovy:374)
at grails.boot.GrailsApp.run(GrailsApp.groovy:363)
at grails.boot.GrailsApp$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at ciab.base.Application.main(Application.groovy:8)
Caused by: java.lang.NoSuchMethodException: org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer.<init>()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetConstructor(ReflectiveInterceptor.java:524)
at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:407)
... 12 more
:ciab-base:bootRun FAILED
:ciab-base:bootRun (Thread[main,5,main]) completed. Took 1.074 secs.


Any idea what went wrong and any fix.

Thanks
Srinivas

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/56fad832-f5ce-43c8-b4d3-115e2e40c9d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: grails 3.1.10 with spring boot using 1.4.0.RELEASE is throwing Failed to instantiate ch.qos.logback

Graeme Rocher-2
Grails 3.1 and Boot 1.4 are not compatible. You will need to use Grails 3.2

On Fri, Aug 19, 2016 at 8:01 AM, 'Srinivasan Thangavelu' via Grails
Dev Discuss <[hidden email]> wrote:

> Hi
>
> We are upgrading grails version 3.0.9 to 3.1.10 with spring boot
> 1.4.0.RELEASE and when i try to compile i am getting this error:
>
> Failed to instantiate [ch.qos.logback.classic.LoggerContext]
> Reported exception:
> java.lang.NoSuchMethodError:
> ch.qos.logback.core.util.Loader.getResourceOccurrenceCount(Ljava/lang/String;Ljava/lang/ClassLoader;)Ljava/util/Set;
> at
> ch.qos.logback.classic.util.ContextInitializer.multiplicityWarning(ContextInitializer.java:173)
> at
> ch.qos.logback.classic.util.ContextInitializer.statusOnResourceSearch(ContextInitializer.java:196)
> at
> ch.qos.logback.classic.util.ContextInitializer.getResource(ContextInitializer.java:143)
> at
> ch.qos.logback.classic.util.ContextInitializer.findURLOfDefaultConfigurationFile(ContextInitializer.java:127)
> at
> ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
> at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
> at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
> at org.slf4j.LoggerFactory.bind(LoggerFactory.java:140)
> at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:119)
> at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:328)
> at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:280)
> at
> org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
> at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:290)
> at org.apache.commons.logging.LogFactory$getLog.call(Unknown Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> at ciab.base.Application.<clinit>(Application.groovy)
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot
> instantiate interface
> org.springframework.context.ApplicationContextInitializer :
> org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer
> at
> org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:412)
> at
> org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:392)
> at
> org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:383)
> at
> org.springframework.boot.SpringApplication.initialize(SpringApplication.java:261)
> at
> org.springframework.boot.SpringApplication.<init>(SpringApplication.java:237)
> at grails.boot.GrailsApp.<init>(GrailsApp.groovy)
> at grails.boot.GrailsApp.run(GrailsApp.groovy:374)
> at grails.boot.GrailsApp.run(GrailsApp.groovy:363)
> at grails.boot.GrailsApp$run.call(Unknown Source)
> at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
> at ciab.base.Application.main(Application.groovy:8)
> Caused by: java.lang.NoSuchMethodException:
> org.springframework.boot.autoconfigure.SharedMetadataReaderFactoryContextInitializer.<init>()
> at java.lang.Class.getConstructor0(Class.java:3082)
> at java.lang.Class.getConstructor(Class.java:1825)
> at
> org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetConstructor(ReflectiveInterceptor.java:524)
> at
> org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:407)
> ... 12 more
> :ciab-base:bootRun FAILED
> :ciab-base:bootRun (Thread[main,5,main]) completed. Took 1.074 secs.
>
>
> Any idea what went wrong and any fix.
>
> Thanks
> Srinivas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/56fad832-f5ce-43c8-b4d3-115e2e40c9d1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/CAO_wNofRMx1cVnPM3Ycm0A5trZWLUduHwi8K2Y-wyO%3D9n8jSbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.