-
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
Http1FieldPreEncoder not loaded, throws ArrayIndexOutOfBoundsException, prevent initialization #2853
Comments
@janbartel any thoughts? |
@va1erian if you say the problem is intermittent, it sounds like you may have more than one version of the bundle deployed - are you sure you don't have any older jetty bundles deployed? Also, please enable debug logging for PreEncodedHttpField class, as it will print out all the encoders it found. |
Hello, sorry this issue completely slipped out of my mind. You're absolutely right, we had a fragment bundle that we used to fix an obscure OSGi issued that ended up causing this issue. |
Hello,
We are deploying Jetty v9.4.11 on an OSGI environnment. Every once in a while, it appears the Service Loader call in PreEncodedHttpField does not return the HTTP 1.1 impl of PreEncodedHttpField (see the second log line) which make code fails with an ArrayIndexOutOfBoundsException and prevent the initialization of the server.
I really don't know why this happens as Http1FieldPreEncoder is already in the same bundle and the META-INF/services spi config file is here. However I believe this case should be handled better. My suggestion for a fix would be identical to the one mentioned in #1325 and add the elements in the array at the correct index using the index static method.
The text was updated successfully, but these errors were encountered: