-
Notifications
You must be signed in to change notification settings - Fork 28
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
ClassNotFoundException for registered response writer #62
Comments
As far as I can tell from the provided stack trace ... it seems like the registered writer has no media type assigned an it fails on a log statement:
Nevertheless I have tried to replicate this on my own as I see no problem with the response writer implementation and as usual it works on my machine. So something must be problematic with the setup / or maybe a third library ... hard to tell. Can you create a breakpoint at: |
The value of writer is Class demo.DefaultResponseWriter. The value of type is a MediaType with type "application", subtype "json" and paramaters is empty |
This seem OK, can you debug to the point failing?
…On Fri, 29 May 2020 at 14:16, kevinstier ***@***.***> wrote:
The value of writer is Class demo.DefaultResponseWriter. The value of type
is a MediaType with type "application", subtype "json" and paramaters is
empty
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANSVF3JQOF2IPZF5CFPZVLRT6RTLANCNFSM4NNYEUXA>
.
|
The log in the register method of WriterFactory prints MediaType in a String. This causes a call to toString() on MediaType. This method tries to get an instance for The same exception is thrown when I register the writer as: Do you have an idea what can cause this problem? |
Jap ... this is what I was assuming from the first stack trace ... In my local project I see a reference to: org.glassfish.jersey.core:jersey-common:2.22.2
I assume this is the problem. I will fix this so the project will not be dependent on this library (it probably is not needed). In the mean time if you add this dependency it will probably work. |
This solved the problem! Thank you |
….jar implementation present in final code if not needed.
I have the following response writer:
Which is basically the same as the provided JsonResponseWriter, except for the
@Produces("application/json")
. When I register this writer asI receive the following exception:
The text was updated successfully, but these errors were encountered: