Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn ch.qos.logback.classic.Level in Grails 5.1.1 #12291

Closed
fernando88to opened this issue Dec 26, 2021 · 9 comments
Closed

Warn ch.qos.logback.classic.Level in Grails 5.1.1 #12291

fernando88to opened this issue Dec 26, 2021 · 9 comments

Comments

@fernando88to
Copy link

Thanks for reporting an issue for Grails framework, please review the task list below before submitting the
issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/grails) or Slack (http://slack-signup.grails.org). DO NOT use the issue tracker to ask questions.

Steps to Reproduce

`
$ grails create-app Test5
$ cd Test5
$ ./grailsw create-domain-class People
$ ./grailsw generate-all test5.People
$ ./grailsw test-app

Task :compileGroovy
19:17:52.951 [/127.0.0.1:45518 to /127.0.0.1:38925 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.io.service.SoftServiceLoader$Optimizations found
19:17:53.534 [/127.0.0.1:45518 to /127.0.0.1:38925 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.reflect.ClassUtils$Optimizations found
19:17:54.088 [/127.0.0.1:45518 to /127.0.0.1:38925 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.util.EnvironmentPro<======-------> 50% EXECUTING [4s]
:compileTestGroovy
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class grails.util.BuildSettings
@ line 1, column 1.
import grails.util.BuildSettings
^

Script1.groovy: 2: unable to resolve class grails.util.Environment
@ line 2, column 1.
import grails.util.Environment
^

Script1.groovy: 3: unable to resolve class org.springframework.boot.logging.logback.ColorConverter
@ line 3, column 1.
import org.springframework.boot.logging.logback.ColorConverter
^

Script1.groovy: 4: unable to resolve class org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
@ line 4, column 1.
import org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
^

Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.encoder.PatternLayoutEncoder
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
13 errors

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:295)
    at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:914)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
    at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
    at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
    at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:526)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:538)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:570)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:565)
    at groovy.lang.GroovyShell$parse.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
    at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:71)
    at ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
    at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:44)
    at ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43)
    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
    at io.micronaut.core.io.service.SoftServiceLoader.<clinit>(SoftServiceLoader.java:65)
    at io.micronaut.ast.groovy.TypeElementVisitorStart.visit(TypeElementVisitorStart.groovy:61)
    at org.codehaus.groovy.transform.ASTTransformationVisitor.lambda$addPhaseOperationsForGlobalTransforms$4(ASTTransformationVisitor.java:337)
    at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:901)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:671)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:635)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:610)
    at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:262)
    at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:64)
    at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:97)
    at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:76)
    at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkAction.execute(AbstractDaemonCompiler.java:135)
    at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
    at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
    at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
    at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
    at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
    at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:49)
    at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:30)
    at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:85)
    at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:55)
    at org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
    at org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
    at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrap

`

Expected Behaviour

Automated tests ran without warnings.

Actual Behaviour

Some warnings appear

Environment Information

  • Operating System: Ubuntu 20.04.3 LTS
  • Grails Version: 5.1.1
  • JDK Version: openjdk version "11.0.11" 2021-04-20

Example Application

https://github.com/fernando88to/Test5

puneetbehl added a commit to micronaut-projects/micronaut-core that referenced this issue Dec 27, 2021
The problem with the current implementation is that in Grails® framework applicatio (version 5.1.1), the compilation fails because the class `SoftServiceLoader` will try to initialize LOGGER during compilation and result in `MultipleCompilationErrorsException`. Please check grails/grails-core#12291 for more information. In this commit, we are using `java.util.function.Supplier` instead of directly initializing the LOGGER which will make sure it is initialized after compilation.

Fixes #6691 and so grails/grails-core#12291
@puneetbehl
Copy link
Contributor

I think it is happening after updating to Micronaut 3.2.0. I have reported an issue to Micronaut Core and also send a pull-request.

jameskleeh pushed a commit to micronaut-projects/micronaut-core that referenced this issue Jan 3, 2022
…ER (#6692)

The problem with the current implementation is that in Grails® framework applicatio (version 5.1.1), the compilation fails because the class `SoftServiceLoader` will try to initialize LOGGER during compilation and result in `MultipleCompilationErrorsException`. Please check grails/grails-core#12291 for more information. In this commit, we are using `java.util.function.Supplier` instead of directly initializing the LOGGER which will make sure it is initialized after compilation.

Fixes #6691 and so grails/grails-core#12291
@rainboyan
Copy link
Contributor

I build Grails 5.1.2-SNAPSHORT with latest Micronaut 3.2.4, the DEBUG log already exist!

| Running application... 11:03:54.042 [/127.0.0.1:51497 to /127.0.0.1:51493 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.io.service.SoftServiceLoader$Opti11:03:54.418 [/127.0.0.1:51497 to /127.0.0.1:51493 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.reflect.ClassUtils$Optimizations 11:03:54.619 [/127.0.0.1:51497 to /127.0.0.1:51493 workers] DEBUG io.micronaut.core.optim.StaticOptimizations - No optimizations class io.micronaut.core.util.EnvironmentProperties found Grails application running at http://localhost:8080 in environment: development

I add a logger config item below for grails-app/conf/logback.groovy, but there is no effect.

logger 'io.micronaut.core.optim', WARN, ['STDOUT'], false

puneetbehl added a commit to micronaut-projects/micronaut-core that referenced this issue Jan 5, 2022
StaticOptimizations class initializes Logger at compile time which fails in a Grails application (see grails/grails-core#12291). In this commit, I have wrapped the logic to create Logger with a try-catch block which will return a NOPLogger instance in case of error initializing via LoggerFactory.
jameskleeh added a commit to micronaut-projects/micronaut-core that referenced this issue Jan 7, 2022
* Handle Logger initialization exception with returning NOPLogger

StaticOptimizations class initializes Logger at compile time which fails in a Grails application (see grails/grails-core#12291). In this commit, I have wrapped the logic to create Logger with a try-catch block which will return a NOPLogger instance in case of error initializing via LoggerFactory.

* Remove logging from StaticOptimizations class

* Fix unused imports

Co-authored-by: jameskleeh <[email protected]>
@puneetbehl
Copy link
Contributor

This should be resolved with 5.1.2

@mtgleeson
Copy link

I still seem to be getting this error when running via command line after upgrading to Grails 5.1.2.
grails test-app

I don't see the exception if I switch from using logback.groovy to logback.xml.

@brianjohnsen
Copy link

I'm also still seeing the issue in Grails 5.1.2

@mhuebner
Copy link

Also hit by this issue in 5.1.2

@lynchie14
Copy link
Contributor

@puneetbehl Getting this on 5.1.4 now. Seems the change in #12329 to use Environment.getGrailsVersion() still causes the issue due to the static call to getCurrent() when the class is initialized. The culrpit this time seems to be io.micronaut.context.env.AbstractPropertySourceLoader

`> Task :compileTestGroovy
Failed to instantiate [ch.qos.logback.classic.LoggerContext]
Reported exception:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script1.groovy: 1: unable to resolve class grails.util.BuildSettings
@ line 1, column 1.
import grails.util.BuildSettings
^

Script1.groovy: 2: unable to resolve class grails.util.Environment
@ line 2, column 1.
import grails.util.Environment
^

Script1.groovy: 3: unable to resolve class org.springframework.boot.logging.logback.ColorConverter
@ line 3, column 1.
import org.springframework.boot.logging.logback.ColorConverter
^

Script1.groovy: 4: unable to resolve class org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
@ line 4, column 1.
import org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter
^

Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.encoder.PatternLayoutEncoder
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
Script1.groovy: -1: unable to resolve class ch.qos.logback.classic.Level
@ line -1, column -1.
13 errors

at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:292)
at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:914)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:526)
at groovy.lang.GroovyShell.parse(GroovyShell.java:538)
at groovy.lang.GroovyShell.parse(GroovyShell.java:570)
at groovy.lang.GroovyShell.parse(GroovyShell.java:565)
at groovy.lang.GroovyShell$parse.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:71)
at ch.qos.logback.classic.gaffer.GafferConfigurator$run.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
at ch.qos.logback.classic.gaffer.GafferConfigurator.run(GafferConfigurator.groovy:44)
at ch.qos.logback.classic.gaffer.GafferUtil.runGafferConfiguratorOn(GafferUtil.java:43)
at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:67)
at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:417)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:362)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:388)
at io.micronaut.context.env.AbstractPropertySourceLoader.<clinit>(AbstractPropertySourceLoader.java:46)
at grails.util.Metadata$_loadFromDefault_closure1.doCall(Metadata.groovy:133)
at grails.util.Metadata$_loadFromDefault_closure1.call(Metadata.groovy)
at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethods.java:1184)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.withInputStream(ResourceGroovyMethods.java:1897)
at grails.util.Metadata.loadFromDefault(Metadata.groovy:132)
at grails.util.Metadata.<init>(Metadata.groovy:61)
at grails.util.Metadata.getCurrent(Metadata.groovy:118)
at grails.util.Environment.resolveCurrentEnvironment(Environment.java:295)
at grails.util.Environment.cacheCurrentEnvironment(Environment.java:321)
at grails.util.Environment.getCurrent(Environment.java:288)
at grails.util.Environment.<clinit>(Environment.java:132)
at org.grails.compiler.injection.GlobalGrailsClassInjectorTransformation.visit(GlobalGrailsClassInjectorTransformation.groovy:73)
at org.codehaus.groovy.transform.ASTTransformationVisitor.lambda$addPhaseOperationsForGlobalTransforms$4(ASTTransformationVisitor.java:338)
at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:901)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:671)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:635)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:610)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:262)
at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:64)
at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:97)
at org.gradle.api.internal.tasks.compile.GroovyCompilerFactory$DaemonSideCompiler.execute(GroovyCompilerFactory.java:76)
at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkAction.execute(AbstractDaemonCompiler.java:135)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97)
at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:49)
at org.gradle.workers.internal.IsolatedClassloaderWorker.run(IsolatedClassloaderWorker.java:30)
at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:85)
at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:55)
at org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
at org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)

`

@rainboyan
Copy link
Contributor

I created a complete demo app, and reproduced this issue. It's still in Grails 5.1.7.

In this demo app, I downgrade logback to 1.2.8 and use logback.groovy,

./gradlew compileTestGroovy 

The same output as above post by @lynchie14 , related commit: #12329

            if(projectVersion == null) {
                 // projectVersion = GrailsUtil.getGrailsVersion()
                 projectVersion = Environment.getGrailsVersion()
             }

I will submit a PR to fix it.

@frangarcia
Copy link

FYI, this issue seems to be addressed in Grails 5.1.8. Thanks @rainboyan and @puneetbehl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants