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
Issues with 1.3.1-SNAPSHOT and extraClasspath #274
Comments
Hi, thanks for report. There is a problem in javassist. It is not possible to make proxy of JDK-11 class. I've tried to fix it, the demoproject is starting now, but the extraClassPath is not working since the UrlClassLoader patching mechanism is still failing. You can check the fix at https://github.com/skybber/HotswapAgent/commits/master |
@skybber thanks for the ultra-fast fix! I'll give it a try asap. Is the javassist issue something we should report to them or do you just have to use a different approach for JDK11? Is the |
It looks that the problem has been already reported jboss-javassist/javassist#228. We had to patch UrlClassLoader to be able to accept extraClass path in j9. Let's look at the source: UrlClassLoader keeps URLs in field of class
and there is pretty problem in j11, since the javassist mechanism (which is only allowed in java >=j11) is not able to make proxy on jdk class! Any attempt to make proxy throws exception - javassist ProxyObject class is unknown for JDK classes. May be I'm overlooking something or we could use another machanism in URLClassLoaderHelper.java as you're writting about. Have you some idea ? |
I just re-read this article: https://dzone.com/articles/jdk-11-and-proxies-in-a-world-past-sunmiscunsafe
I'm not an expert on this subject, but it sounds like proxying internal classes can only be done from other internal classes or if the package is explicitly opened via |
I've read this article carefully yesterday. It looks that you're right. We can open it in dcevm as we're opening another packages, but I think it is not good solution since it can bring some problems to end users. |
Problem should be fixed now. Btw I've seen your wicket plugin 👍 , may be we could use it in HotswapAgent. |
@skybber absolutely! Please feel free to include it in HotswapAgent. I'll test your fix asap and will give feedback. |
Could you make, please, initial PR for WicketPlugin? Or where can I get most up-to-date version? |
I'll create a PR. |
Thanks for the great library and your work on JDK11!
I just downloaded the latest JDK11 binaries and tested them with my application and a vanilla Spring Boot starter application (see attachment).
Everything seems to work fine with the default configuration.
If I add anything to
extraClasspath
the application fails to start withClassNotFoundExceptions
:You can easily verify this behavior by uncommenting
extraClasspath
in the attached application and runningcom.example.demo.DemoApplication
.demo.zip
The text was updated successfully, but these errors were encountered: