-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Illegal reflective access because of partial implementation of ProxyServices? #5326
Comments
Our CDI integration is vendor neutral ATM. It supports both Weld and OpenWebBeans. If we implemented it, then wouldn't that mean CDI is no longer a Server level feature? As an implementation of Since weld Services register at the |
I understand the concern that Jetty should be vendor neutral. Could you confirm that my sample code implemented Jetty CDI integration in the recommended way (i.e. that I made no mistake in interpreting the documentation), considering my three “related questions” in particular? |
@oliviercailloux there are actually a lot of different ways to integrate weld into Jetty! See: https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/jetty-cdi/src/test/java/org/eclipse/jetty/embedded/EmbeddedWeldTest.java Very hard to say what is the preferred. Personally like the So 2nd best is probably I think you code looks close... except I think you have the order wrong: ie add the |
oh yes our documentation does need to catch up a bit with some recent changes to how this is done embedded. |
Thanks for the answer. The point of my issue is that I did my best to follow the instructions as the current (9.4.32-SNAPSHOT) documentation states. If the order is wrong, then the documentation should certainly be updated.
The documentation does indicate a preferred mode, which is the one I (tried to) implement. |
Thanks for the replies. I suppose this bug can be closed, as it does not seem desirable to solve the illegal reflective access on the Jetty side rather than on the WELD side, if I understand correctly. I have voted for the related WELD bug. |
thanks |
Jetty version
9.4.32-SNAPSHOT
Java version
OpenJDK 11
OS type/version
Debian stable
Description
Following the new instructions for setting up CDI with Weld leads to an “illegal reflective access” (according to the log). Looking up the Weld source code, it mentions that the reason could be that “the integrator does not fully implement ProxyServices”. Is this something that jetty can solve, or due to me not having properly understood the instructions for setting up Weld + Jetty?
Details
I built the new version of the doc from source. I used the jetty-snapshot available in maven, contrary to instructions, I hope that is okay.
The log is the following when my application starts.
The full application is here, with the main content here.
The illegal reflective access happens in this class, where the quote above about ProxyServices is taken from.
(I posted this here already, but I figured out that this probably deserves a new issue, I hope this is adequate.)
Possibly related questions
org.jboss.weld.servlet:weld-servlet-core:3.1.5.SP1
as Weld dependency, whereas the documentation mentionsorg.jboss.weld.servlet:weld-servlet
(which seems unmaintained since 2014), is this the recommended dependency to use with jetty embedded?jetty-cdi
Maven dependency, and notcdi-decorate
as documented (which I can’t find in Maven central), is this all right?The text was updated successfully, but these errors were encountered: