-
-
Notifications
You must be signed in to change notification settings - Fork 956
Grails 2.4.0: Java 8u40 w/ 2.4.5/2.5 gives $getStaticMetaClass() visibility errors in inheriting controllers #619
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
Comments
I confirm, this error occures. |
8u45 was released recently - can you try upgrading? |
Still happens with 8u45, just tried. |
might be related: jamescookie/quartz-monitor#30 and behavior confirmed. working with jdk 8u31, fails with 8u45... however, i can not see a reason for maybe sth. is going on with groovy-2.4.3 and jdk-8u40+? |
Also seeing this issue with 8u45, with a domain class extending an abstract class in src/groovy |
@jeffbrown @graemerocher do you maybe have any idea what could be the cause of this? at least for me, avoiding jdk 8u40+ is not possible for long. thanks, zyro |
i think i was able to isolate this a bit further. using jdk 8u45 and grails-2.5.0. given the following classes: // src/java/jdktest/JavaClass.java
public class JavaClass {
protected void foo() {}
} // src/groovy/jdktest/GroovyClass.groovy
class GroovyClass extends JavaClass {
@Override
protected void foo() {}
}
@patric42 @bxqgit @jmesterh can you confirm that compilation and subsequent run-app works after manually doing a |
As I wrote in the initial report: Initial compile works, but recompile through the agent seems broken. |
I have same problem as zyro23. Grails 2.5.0, Java 8u45. Only compile that works is the first one following a clean. In my case I have all Groovy code, no Java. But I am extending and abstract base class that is in the Controllers folder. |
I've seen the exact same error, both on Quartz + Quartz Monitor and on my own code - but only when compiling from within grails run-app. When running grails compile, I do not see this kind of behaviour at all - compilation works as expected. |
Same issue here after upgrading to 8u45 |
Java 8u31 and earlier does not have this problem, but Java 8u40 and 45 do. |
I'm new to grails, but yes i found this with 8u40 and 8u45 too - it works on 8u31 |
Since Groovy/Grails behaviour changed with a JDK update, should this be seen as a JDK bug? Or is it a change in JDK that is unavoidable due to security fixes, that Groovy/Grails will have to adapt to somehow? |
Any updates on this issue??? |
Someone please upload an example to Github with steps to reproduce |
here you go: https://github.com/zyro23/grails-core-619 - can reproduce the issue with jdk 8u45 (clean run-app). |
Graeme - others are reporting that this issue also occurs for domain classes (see #682) |
@aclement Thanks for looking into this, any idea when 1.2.4 will be released? |
If you tell me this does address these problems, we can do it pretty quick. |
@aclement - How do I test your jar? I've tried the following in the conf/BuildConfig.groovy
|
It is crude... but I usually download it and replace the one in grails with it (i.e. rename what I download to the same name as the version inside grails). |
I noticed an extra set of quotes in my example - still didn't work, when fixed the quotes. Ok, I'll give the rename a try ... |
Works for me! I say ship it! lol For full disclosure, I just tested my broken case where I do a grails run-app (w/o first compile) which normally reproduces the error, and I also tried modifying a subclass (during grails run-app), which will also reproduce the error. Those two cases are fixed with the latest jar. |
@aclement - is there a unit test for "modify subclass"? There are only 2 open bugs for 2.5.1 and they both appear to be a simple config change for graeme (assuming aclement builds v1.2.4 of springloaded). So 2.5.1 can go live by tomorrow 👍 |
There is - but I doubt there is one for every combination of visibility. |
@aclement - no worries - add them when we find them :) Do you have eta on release of 1.2.4? Also there's another springloaded issue: #599 - I went ahead and tried your 1.2.4 snapshot (w/ Grails 3), and it didn't fix the problem. I didn't think the bug was related to this one, but I tried anyway ... to no avail. |
@aclement - any status on the release (eta) of 1.2.4? |
I believe @aclement plans to release it soon, we are coordinating with him |
Do you have an ETA for Spring Loaded 1.2.4 being released & included in Grails 2.5.1, and for Grails 2.5.1 being released? I'm about to start testing an upgrade from a much older version of Grails, and from Java 7 to Java 8u31. If Grails 2.5.1 will be ready in less than a week or so, then I'll probably wait for it. Otherwise, I'll probably test & release the upgrade to 2.5.0 & 8u31, and then later test & release a subsequent upgrade to 2.5.1 & 8u45. Thanks for all your work on both projects. |
#9136 should fix this. |
Is it fixed?It occures when I use grails 3.0.6 && java 8u45. |
For me, this is fixed in Grails 2.5.1 and Java 8u60. Although I believe --Tim On Tue, 6 Oct 2015 14:15 Kason notifications@github.com wrote:
|
@tnleeuw springloaded-1.2.4.RELEASE.jar |
@Kason That's the same version as in Grails 2.5.1, so this should be Ok. I On Tue, Oct 6, 2015 at 2:24 PM Kason notifications@github.com wrote:
|
@tnleeuw Thanks! It seams that the project cache the old libraries. I create a new project with grails3.06 and copy the source from the old project then run the new project.The problem disappear. |
What if you do "grails clean all" in the old project directory? On Wed, 7 Oct 2015 04:29 Kason notifications@github.com wrote:
|
I did it(
My gradle version is 2.7 |
Sorry, I don't know enough about Gradle & Grails 3 yet to be helpful with --Tim On Wed, Oct 7, 2015 at 7:12 AM Kason notifications@github.com wrote:
|
@tnleeuw Yes.It is too new.I build the old project unsuccessfully with gradle2.7 but successfully with gradle2.4. |
Wondering if newer versions of Grails fix this error with Gradle, though? On Wed, 7 Oct 2015 10:31 Kason notifications@github.com wrote:
|
- this should fix the problem of apache/grails-core#619
Grails 2.4.5/2.5.0 with Java 8u40
Given two controllers:
On clean compile, it works, but if changed and recompiled in dev mode, it gives
| Compiling 1 source files
[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
[groovyc] /.../grails-app/controllers/UserController.groovy: -1: $getStaticMetaClass() in UserController cannot override $getStaticMetaClass in SecureController; attempting to assign weaker access privileges; was public
[groovyc] @ line -1, column -1.
Switching to 8u31, it works again. I tried moving the SecureController to src/groovy, to no avail.
The text was updated successfully, but these errors were encountered: