0

Seeing this behavior on both the default grails app skeleton and fully developed apps.

versions

Using grails 5.3.2

----with gradle 7.2

JDK (tried 11.0.12-open and 11.0.17-zulu) Running on standard 8080 port and with the tomcat (which I believe comes from spring-boot? in a grails project).

steps

1.Ran grails create-app.

2.Made a simple test controller

package sampleapp

class TestController {
    def hi(){
        render(text:"ChangeMe")
    }    
 }
  1. Commented out spring-devtools in build.gradle for clarity in the terminal output.
  2. Ran "grails run-app";
  3. Changed the text in the controller.

Stackoverflow error

 at java.base/sun.net.util.IPAddressUtil.checkHostString(IPAddressUtil.java:460)
    at java.base/java.net.URLStreamHandler.setURL(URLStreamHandler.java:503)
    at java.base/java.net.URLStreamHandler.parseURL(URLStreamHandler.java:312)
    at java.base/sun.net.www.protocol.file.Handler.parseURL(Handler.java:67)

with terminal repeating

  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2839)
    at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3854)
    at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:219)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:496)
    **at grails.util.Environment.setCurrentReloadError(Environment.groovy:238)**

On non-trivial app this causes the additional error

   Unable to start web server;
   nested exception org.springframework.context.ApplicationContextException:
   Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean.

With spring dev-tools enabled, the app "recovers" and loads changes. However, on non-trivial apps, I'm seeing every reload get slower and slower until eventually we have to kill the app and restart it again. On some windows versions, there have been system crashes.

Anyone else run into this with grails or spring+gradle, or otherwise seen the IPAddressUtil error sequence?

Looking for any advise on making live development less painful (other than complete rewrite of systems to micro services :)

Update:

Got the above error to go away, but the grails run-app command is broken. It fails to compile:

java.lang.NoSuchMethodError: io.micronaut.core.io.service.SoftServiceLoader.firstAvailable()Ljava/util/Optional

./gradlew bootRun seems to work so far.

Guessing there is a dependency/version issue that shows up in our workflow. Haven't tracked it down yet.

user2782001
  • 3,380
  • 3
  • 22
  • 41

0 Answers0