Problem with live reload Grail 4

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

Problem with live reload Grail 4

Pabel Dionicio Lopez Mena
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/ffbb6e47-54e0-42a8-9ab5-c0472e38fc50o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

Puneet Behl

Hi



The default option is Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is JRebel.


Reference: https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/90494902-b2f8-475d-b850-247c85f7bc86o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

Pabel Dionicio Lopez Mena

ok i will try and let know my experience with this solution

El miércoles, 17 de junio de 2020, 14:24:42 (UTC-4), Puneet Behl escribió:

Hi



The default option is <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;">Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is <a href="https://www.jrebel.com/products/jrebel" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;">JRebel.


Reference: <a href="https://github.com/grails/grails-core/pull/11441" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;">https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/6ae55019-0c6d-4c3c-90be-da5417710919o%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

Pabel Dionicio Lopez Mena
In reply to this post by Puneet Behl
I executed the changes that you mentioned in grails 4.0.1 and they worked for me without problems, but when I use them in grails 4.0.3 I get the following error


2020-06-17 17:10:46.025 ERROR --- [nio-8080-exec-4] o.g.web.errors.GrailsExceptionResolver   : NoSuchFieldException occurred when processing request: [GET] /abacus/registrar_horas_extras
$staticClassInfo$. Stacktrace follows:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abacus.EmpleadosController': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:73)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.lambda$buildPersistenceMetadata$0(PersistenceAnnotationBeanPostProcessor.java:424)
at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:694)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:423)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:407)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)
... 17 common frames omitted
Caused by: java.lang.NoSuchFieldException: $staticClassInfo$
at java.lang.Class.getDeclaredField(Class.java:2070)
... 24 common frames omitted





El miércoles, 17 de junio de 2020, 14:24:42 (UTC-4), Puneet Behl escribió:

Hi



The default option is <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;">Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is <a href="https://www.jrebel.com/products/jrebel" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;">JRebel.


Reference: <a href="https://github.com/grails/grails-core/pull/11441" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;">https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/31e92103-dc89-43cb-9378-5e59718d9e7ao%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

puneet....@gmail.com
Hi

I tried to test reloading with Grails 4.0.3 which seems to work fine. However, I think the above problem could be related to the Groovy version conflict but I am not so sure. 


On Thursday, 18 June 2020 at 02:43:09 UTC+5:30 [hidden email] wrote:
I executed the changes that you mentioned in grails 4.0.1 and they worked for me without problems, but when I use them in grails 4.0.3 I get the following error


2020-06-17 17:10:46.025 ERROR --- [nio-8080-exec-4] o.g.web.errors.GrailsExceptionResolver   : NoSuchFieldException occurred when processing request: [GET] /abacus/registrar_horas_extras
$staticClassInfo$. Stacktrace follows:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abacus.EmpleadosController': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:73)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.lambda$buildPersistenceMetadata$0(PersistenceAnnotationBeanPostProcessor.java:424)
at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:694)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:423)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:407)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)
... 17 common frames omitted
Caused by: java.lang.NoSuchFieldException: $staticClassInfo$
at java.lang.Class.getDeclaredField(Class.java:2070)
... 24 common frames omitted





El miércoles, 17 de junio de 2020, 14:24:42 (UTC-4), Puneet Behl escribió:

Hi



The default option is Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is JRebel.


Reference: https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/e17573a8-ef06-4dc5-b029-77dd3f2394e6n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

Pabel Dionicio Lopez Mena
what version for groovy you used ?
El lunes, 22 de junio de 2020 a las 4:08:59 UTC-4, [hidden email] escribió:
Hi

I tried to test reloading with Grails 4.0.3 which seems to work fine. However, I think the above problem could be related to the Groovy version conflict but I am not so sure. 


On Thursday, 18 June 2020 at 02:43:09 UTC+5:30 [hidden email] wrote:
I executed the changes that you mentioned in grails 4.0.1 and they worked for me without problems, but when I use them in grails 4.0.3 I get the following error


2020-06-17 17:10:46.025 ERROR --- [nio-8080-exec-4] o.g.web.errors.GrailsExceptionResolver   : NoSuchFieldException occurred when processing request: [GET] /abacus/registrar_horas_extras
$staticClassInfo$. Stacktrace follows:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abacus.EmpleadosController': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:73)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.lambda$buildPersistenceMetadata$0(PersistenceAnnotationBeanPostProcessor.java:424)
at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:694)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:423)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:407)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)
... 17 common frames omitted
Caused by: java.lang.NoSuchFieldException: $staticClassInfo$
at java.lang.Class.getDeclaredField(Class.java:2070)
... 24 common frames omitted





El miércoles, 17 de junio de 2020, 14:24:42 (UTC-4), Puneet Behl escribió:

Hi



The default option is Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is JRebel.


Reference: https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/85451a0f-8539-48fb-aca6-de4233af4621n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with live reload Grail 4

Puneet Behl
I have tested with the default version shipped with Grails 4.0.3. I am guessing there might be some plugin that is fetching an older version of Groovy. Normally, you would see under Intellij Idea > External Libraries if there are multiple versions of Groovy. Also, it would be great if you could share a sample application. 

On Tuesday, June 23, 2020 at 2:18:27 AM UTC+5:30, [hidden email] wrote:
what version for groovy you used ?
El lunes, 22 de junio de 2020 a las 4:08:59 UTC-4, [hidden email] escribió:
Hi

I tried to test reloading with Grails 4.0.3 which seems to work fine. However, I think the above problem could be related to the Groovy version conflict but I am not so sure. 


On Thursday, 18 June 2020 at 02:43:09 UTC+5:30 [hidden email] wrote:
I executed the changes that you mentioned in grails 4.0.1 and they worked for me without problems, but when I use them in grails 4.0.3 I get the following error


2020-06-17 17:10:46.025 ERROR --- [nio-8080-exec-4] o.g.web.errors.GrailsExceptionResolver   : NoSuchFieldException occurred when processing request: [GET] /abacus/registrar_horas_extras
$staticClassInfo$. Stacktrace follows:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'abacus.EmpleadosController': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1105)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:73)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldException: $staticClassInfo$
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.lambda$buildPersistenceMetadata$0(PersistenceAnnotationBeanPostProcessor.java:424)
at org.springframework.util.ReflectionUtils.doWithLocalFields(ReflectionUtils.java:694)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:423)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:407)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:334)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1076)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:567)
... 17 common frames omitted
Caused by: java.lang.NoSuchFieldException: $staticClassInfo$
at java.lang.Class.getDeclaredField(Class.java:2070)
... 24 common frames omitted





El miércoles, 17 de junio de 2020, 14:24:42 (UTC-4), Puneet Behl escribió:

Hi



The default option is <a href="https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fdocs.spring.io%2Fspring-boot%2Fdocs%2Fcurrent%2Freference%2Fhtml%2Fusing-spring-boot.html%23using-boot-devtools\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH4priPGcgXej2cYBSd40MVe2etAw&#39;;return true;">Spring Boot Developer Tools, which should be faster than a normal restart. You could disable it by removing the following dependency from the classpath. 



 developmentOnly
("org.springframework.boot:spring-boot-devtools")



To add back the option for hot-reloading from Grails 3, add the following in your build.gradle file:



 configurations
{
   agent
 
}

 dependencies
{
    agent
"org.springframework:springloaded:1.2.8.RELEASE"
    runtimeOnly
"io.methvin:directory-watcher:0.9.6" // (Optional) Native OSX file watcher
 
...

 
}


Please note that springloaded only supports JDK8 and is no longer maintained. An alternative, more complete paid solution is <a href="https://www.jrebel.com/products/jrebel" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.jrebel.com%2Fproducts%2Fjrebel\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFGm5AObJLvystwwcUzRyYdBvuQSw&#39;;return true;">JRebel.


Reference: <a href="https://github.com/grails/grails-core/pull/11441" style="background-color:transparent;margin-top:0pt;margin-bottom:0pt;color:rgb(74,110,224)" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fgrails%2Fgrails-core%2Fpull%2F11441\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAFqeqtNIp1Lq1S-HNJ0hQPofUAA&#39;;return true;">https://github.com/grails/grails-core/pull/11441


---

Puneet Behl



On Wednesday, June 17, 2020 at 9:15:14 PM UTC+5:30, Pabel Dionicio Lopez Mena wrote:
how to deactivate the live reload of grails 4 and reactivate the hot reload that was in grails 3, I am having many problems with this given that I can wait a long time for my program to restart for every change I make

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/3497ff85-9bf4-471a-bc0b-5c8534409d2co%40googlegroups.com.