-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
NoSuchMethodError on startup when using WebFlux #12072
Comments
Spent some time with this and I was able to reproduce the error on 6.10.1. On master it looks like the specific springfox errors are resolved via this PR: jhipster/jhipster#764 However, when running from master I get On master it looks like the vuejs blueprint is broken (or not up to date with master) so can't test the exact same scenario. If you want to manually work around the issue on 6.10.1 there are a couple of changes that you can make to get it to boot as expected (though the PR above is a more complete solution)
Add the following in the pom:
Comment out or remove the following in the pom:
|
Can you please create a PR to fix this @joewhite101? |
@mraible yeah. I think the best thing would be to just merge the changes from the PRs i referenced into to the 6.x maintenance branches. I can cherry pick and create the PRs. However, I have one question. What is the 6.x maintenance branch for https://github.com/jhipster/jhipster. Or is 6.x still on master for that? If it is still on master we don't need the first PR below and can just point to the newer version. We need this one: And then we would need this one: |
That's a good question for @pascalgrimaud. |
We don't have v6 branch for jhipster lib, but we can create one, using the last tag release in jhipster/jhipster project |
I created v6.x_maintenance from 3.9.0 tag in jhipster lib project |
@pascalgrimaud The branch should be name 3.9.x_maintenance instead of v6, no? |
indeed, I'm stupid :) can do you it ? it was a pain with phone... otherwise, I'll do it tomorrow |
@joewhite101 : I created this branch in jhipster/jhipster project -> https://github.com/jhipster/jhipster/tree/3.9.x_maintenance But one important thing: the PR jhipster/jhipster#764 can't be merged into 3.9.x_maintenance as it contains some breaking changes. As you mentioned, only dependencies should be updated |
Makes sense. I'll see if I can get the right bits in place to resolve that error. |
Ok @joewhite101 : so I'm waiting your PR before doing a new patch release of JHipster v6.10.4, with a new release of jhipster lib dependencies |
Sounds good. Working on it today. I'm going to change the version in my PR to 3.9.1-SNAPSHOT and update generator-jhipster to point to the same. The 6.10.x maintenance branch is pointed to 3.10.0-SNAPSHOT which I assume is the working version for 7.x. As you pointed out we can't merge those PRs but hopefully it is just a matter of syncing up the springfox versions. |
I've made the changes for this but they need a strong sanity check. The underlying issue here is that the generator-jhipster depends on 3.0.0-SNAPSHOT of springfox and the jhipster project depends on 2.9.2. At some point in the lead-up to the official release of their 3.0.0 release the SNAPSHOT springfox became not compatible the 2.9.2 version which leads to the error above as well as the NoClassDefFoundError in the linked ticket. I couldn't get the two to work together. My earlier note was incomplete in updating the generator only. There were errors and issues in the app. In the two PRs have taken the steps to move the jhipster project up to 3.0.0 and moved the generator to the released version. This seems to work in both the base generator and webflux generator case from the app in this ticket. However, this won't be perfectly compatible because the location of the swagger-ui html changed. I took a look at moving the generator back to 2.x to keep compatibility but generator-jhipster it has been on the 3.0.0-SNAPSHOT since the 6.8 release. There is also new DEBUG message at startup that requires further investigation:
|
After thinking about it trying to move this forward to 3.0.0 is probably too invasive for a minor release. I'll go back and work on seeing if I can get the reactive version to work with 2.10.5. I'll close those PRs. |
Created a new PR to get the springfox versions in sync for jhipster-dependencies and for a reactive app. The PR above resolves the startup issues in the two tickets. The only downside is that the API docs don't render inside the application. As far as I can tell there is no compatible webflux springfox with the 2.x jars. Everything recommends moving to 3.0.0-SNAPSHOT which leads back to the original error, which leads to the closed PRs above. IMO these are a much safer set of changes than in the other closed PRs above moving everything to 3.x springfox. However, slightly less functional for reactive jhipster apps. The root of the issue remains that the 6.x jhipster released reactive pointed to a SNAPSHOT that moved underneath the code so we have to go forward or backward to stable ground. Open to discussion on a better approach in either case though. See also This ticket details the move to 3.0.0-SNAPSHOT. |
IMO there are 3 options:
|
I did the work to integrate Spring Fox 3.0 for reactive. Did something break with its 3.0 release?
… On Oct 11, 2020, at 07:56, Marcelo Shima ***@***.***> wrote:
IMO there are 3 options:
Current PR, fixes the build, but kind of disable springfox for reactive.
Create a jhipster-lib with springfox3 exclusive for reactive.
Update to springfox3 and release jhipster as 6.11.0.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@mraible Yeah, things broke with the 3.0 release and with later versions of the 3.0.0-SNAPSHOT. We were referencing 3.0.0-SNAPSHOT from springfox for reactive. That version from springfox was fixed for a long time (~2018) but as springfox moved towards a formal 3.0 release the SNAPSHOT moved. For option 1 (Current PR, fixes the build, but kind of disable springfox for reactive.) we have the current open PR: Which breaks the API integration in the app but resolves the startup issues. For option 3 (Update to springfox3 and release jhipster as 6.11.0.) |
@joewhite101 I don't think we need to worry about backwards compatibility for WebFlux. We've indicated that it was beta. Let's make it ready for prime time! |
The challenge is that it impacts backwards compatibility for the generator as a whole because we have to update the version in the underlying jhipster-dependencies. That is basically these two PRs (closed): |
I was waiting this ticket to be fixed before doing a new release of generator-jhipster v6.10.4 Later, once it's fixed, I can do another patch release if needed |
I think we just need a call on the desired outcome. Breaking swagger for reactive I think is the best choice. Just need a review and merge on this PR. Reactive is totally broken on 6.10 anyway. Doesn't boot at all (see 2 tickets attached). Might was well restore the ability to boot the app with some reduce functionality. Then if we want springfox 3 for everything on 6.x we can revisit these prs for 6.11 I think they are pretty close but should get a careful review. |
Yes, I was waiting reviews from Webflux experts for #12716 too. So until it's decided to merge it or do some change to this PR, I'm doing v6.10.4 for these 2 importants tickets: |
This issue is stale because it has been open 30 days with no activity. |
Swagger docs need to be checked for Console Error:- |
I think we can safely close this one since it's related to v7-beta. Please re-open if you're still experiencing issues. |
Overview of the issue
On application startup multiple stacktraces are thrown, caused by initializing swagger objects with wrong parameters, leading to NoSuchMethodError.
Stacktraces
Reproduce the error
Just start the newly created application using the provided template or these steps:
Suggest a Fix
I haven't investigated that issue that far for now, but I am interested in using JHipster and webflux. When I am able to fix that issue I'll provide a PR.
Note: The used springfox version 3.0.0-SNAPSHOT can be changed to 3.0.0 as it was released today.
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Environment and Tools
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.2+9, mixed mode)
git version 2.19.0.windows.1
node: v14.5.0
npm: 6.14.5
Docker version 19.03.8, build afacb8b
docker-compose version 1.25.5, build 8a1c60f6
The text was updated successfully, but these errors were encountered: