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

Gretty 2.3.0 JettyScannerManager error #99

Closed
acestars opened this issue Nov 30, 2018 · 5 comments
Closed

Gretty 2.3.0 JettyScannerManager error #99

acestars opened this issue Nov 30, 2018 · 5 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@acestars
Copy link

acestars commented Nov 30, 2018

This is the configuration:

managedClassReload = false
servletContainer = 'tomcat9'
scanInterval=1
scanDir "${projectDir}/src/main"
fastReload "${projectDir}/WebContent"

every I changed the content of WebContent the JettyScannerManager throw error

org.akhikhl.gretty.JettyScannerManager$1@4f2ec1aa failed on '[path_of_directory, path_of_directory/filename]
java.lang.IllegalAccessError: tried to access method org.akhikhl.gretty.scanner.BaseScannerManager.scanFilesChanged(Ljava/util/Collection;)V from class org.akhikhl.gretty.JettyScannerManager$1
	at org.akhikhl.gretty.JettyScannerManager$1.filesChanged(JettyScannerManager.groovy:33)
	at org.eclipse.jetty.util.Scanner.reportBulkChanges(Scanner.java:691)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:551)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
	at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:353)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)

gretty 2.2.0 works properly, no error

@javabrett
Copy link
Member

javabrett commented Nov 30, 2018

Thanks for the report. Which JDK and Gradle are you using, and can you please provide a minimal example project.

@boris-petrov
Copy link
Member

I just noticed the same issue. Could it be related to #95? The new Groovy perhaps outputs some broken bytecode because of the compile error?

@javabrett
Copy link
Member

@boris-petrov an excellent theory. I have some local commits with a fix in the works for that. If we can document a reproducible case for this, it can be tested (might just rely on scanDir or fastReload).

@acestars
Copy link
Author

acestars commented Dec 1, 2018 via email

@javabrett
Copy link
Member

javabrett commented Dec 2, 2018

I can reproduce this also. The problem call is at:

I think this is caused by Groovy bug Statically compiled calls to protected methods of an outerclass' superclass result in IllegalAccessErrors (fixed in Groovy 2.5), together with 3cb2547 which added @CompileStatic to BaseScannerManager as part of #46.

We can either remove that one @CompileStatic or compensate for the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants