-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SEVERE: Missing dependency for method public javax.ws.rs.core.Response #1530
Comments
This is a terrible to track down error. Remove your apiParam annotation from the form data Parm |
@fehguy You're wellcome. I fixed my problem. |
Hi all, Tell me why i receiver java.lang.NullPointerException Thanks very much! |
Is @ApiParam not well supported? I noted that it I have one parameter with this annotation, it works, but if I have two parameters with this annotation then I get the error. If I remove @ApiParam annotations, then seems to load fine. And I suppose I can likely do a workaround of using one parameter that is an object that contains the two parameters. |
It is quite supported--by chance is this a FormDataParam? If so there is a problem with apiParam and that annotation |
Thanks for reply. Figured out the problem. I assigned two parameters to be in the body, which is an error, but the editor does not catch the problem, but causes "SEVERE: Missing dependency for method public javax.ws.rs.core.Response" error at run time. Starting to like swagger.io, just wish swagger.io spec was written in a more readable way. BAD:
GOOD: |
Hi all,
I have a problem with upload file.
My code:
@post
@path("/{userId}/avatar")
@consumes(MediaType.MULTIPART_FORM_DATA)
@ApiOperation(value = "Updates users avatar", notes = "Provides means to upload new versions of avatar based on username")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful retrieval of users avatar", response = User.class),
@ApiResponse(code = 404, message = "User with given username does not exist"),
@ApiResponse(code = 500, message = "Internal server error") })
public Response updateUsersAvatar(
@ApiParam(name = "userId", required = true) @PathParam("userId") int userId,
@ApiParam(access = "hidden") @FormDataParam("avatar") InputStream is) {
My pom.xml
4.0.0
Then i run, i receiver
SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for method public javax.ws.rs.core.Response com.sunrise.transport.backend.controller.UserController.updateUsersAvatar(int,java.io.InputStream) at parameter at index 1
SEVERE: Method, public javax.ws.rs.core.Response com.sunrise.transport.backend.controller.UserController.updateUsersAvatar(int,java.io.InputStream), annotated with POST of resource, class com.sunrise.transport.backend.controller.UserController, is not recognized as valid resource method.
[ERROR] unavailable
What's dependency i missing? Thanks all
The text was updated successfully, but these errors were encountered: