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

Disable jersey2 jsonp/moxy auto discovery #1262

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

mattnelson
Copy link
Contributor

Disable moxy/jsonp autodiscovery as the eureka client usage leverages an explicitly registered message body reader/writer.

When moxy or another json processor(jsonp) are on the classpath, they will be autodiscovered and registered into the transport/application clients which causes errors as those other providers take precedence over the DiscoveryJerseyProvider.

Example stack trace of moxy attempting to handle the request

	at org.eclipse.persistence.jaxb.rs.MOXyJsonProvider.readFrom(MOXyJsonProvider.java:695)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:256)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:235)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)
	at org.glassfish.jersey.spi.ContentEncoder.aroundReadFrom(ContentEncoder.java:127)
	at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)
	at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1085)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
	at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:808)
	at org.glassfish.jersey.client.ClientResponse.readEntity(ClientResponse.java:326)
	at org.glassfish.jersey.client.InboundJaxrsResponse$1.call(InboundJaxrsResponse.java:115)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:419)
	at org.glassfish.jersey.client.InboundJaxrsResponse.runInScopeIfPossible(InboundJaxrsResponse.java:267)
	at org.glassfish.jersey.client.InboundJaxrsResponse.readEntity(InboundJaxrsResponse.java:112)
	at com.netflix.discovery.shared.transport.jersey2.AbstractJersey2EurekaHttpClient.getApplicationsInternal(AbstractJersey2EurekaHttpClient.java:266)

@mattnelson
Copy link
Contributor Author

@troshko111 Could I get review on this?

@troshko111 troshko111 merged commit 1ef3c55 into Netflix:master Dec 20, 2019
@troshko111
Copy link
Contributor

Thanks @mattnelson!

@mattnelson mattnelson deleted the jersey2_json_discovery branch December 20, 2019 17:59
@mattnelson
Copy link
Contributor Author

@troshko111 Do know when this will be released?

@troshko111
Copy link
Contributor

troshko111 commented Jan 3, 2020

I have no problem releasing right now, it seems pretty safe to me. In general, feel free to mention if it's important to release close to the PR merge, more than happy to accomodate.

EDIT 1: kicked off one.
EDIT 2: released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants