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
Packaging 4.0.0 no class def found #1168
Comments
I have a same problem. |
Have you read the release notes? Some classes have been moved. |
Or are you not using these in your code? Are they runtime errors? |
|
I'm not using them in my code at all, If I click through to rest assured classes they are missing the TypeRef and other classes. It's a packaging issue, I saw the shade plugin is being used, something isn't setup right there |
Also if you have a look at the PR I linked in the description the change it would show I'm not using the code directly 😉 |
@timja Thanks for your reply. Yes it indeed feels like something is fishy. Haven't experienced this myself though in any of the projects I've upgraded to 4.0, I wonder why we have different experiences. |
@timja shade is also only used in the |
@timja Also when I browse the |
Are you using the |
No none of the above, the project is public and doesn't require anything special to build it.
is the quickest way to see the issue. all changes are in this commit https://github.com/hmcts/draft-store
|
Also all the build failures can be viewed in the travis logs on the PR: |
Cannot seem to find the travis log, could you post the link here? |
https://travis-ci.com/hmcts/draft-store/builds/111546866
Looks like that's the only build showing the packaging error, the first error was content being removed, the rest of the errors I experienced locally |
Might have found the issue:
For some reason xml-path depends on the old version. Need to investigate, but know I have to pick-up kids from Kindergarten :) |
I'm getting this instead, but I suspect it's related: |
I also got that but forgot to include that in the description |
Are you all using Gradle? I'm not much of an Gradle expert but when running the following command in the
I get:
What does "io.rest-assured:json-path:3.1.1 (selected by rule)" mean? Which rule? |
I also found this answer on stackoverflow. He had a similar problem with elastic search and it turned out that spring-boot dependency management picked another version. Could it be the same thing here? |
The stackoverflow answer, that I linked to above, solved it by doing:
And if I introduce this:
it seem to pickup the correct version. Could you verify that it works? If so it's a gradle configuration issue and not a rest-assured issue. |
Thanks @johanhaleby that's fixed Apologies for not noticing that, and nice stack overflow answer Thanks for spending your time looking at it, much appreciated. Hopefully this issue is useful for anyone else who hits it |
I have the same problem. Have you solved it? |
Yes I was getting that too, if you're using spring and gradle then this will likely be the fix: |
Nope, I just rolled back to 3.x. Haven’t tried again yet. FWIW my issue was using Maven not Gradle. |
Guys! Simply add the following dependency and keep the <dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured-all</artifactId>
<version>4.0.0</version>
</dependency> My scenario: multi-project (module on IntelliJ) with a backend (spring boot) and a test project (using rest-assured) with JDK 12. Spring Boot still using the 3.1.1 version of |
|
After trying to upgrade to 4.0.0 I was hit by a few Class not found exceptions:
From the wiki I should only need this dependency:
That doesn't seem to be enough
I've made it work with:
See:
hmcts/draft-store#293
The text was updated successfully, but these errors were encountered: