question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

latest springfox-swagger2 + springfox-swagger-ui throws class not found exception

See original GitHub issue
  • What version of the library are you using? Is it the latest version?
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>2.8.0</version>
</dependency>
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.8.0</version>
</dependency>

What kind of issue is this? Bug report

I use Spring Boot 2.0.1.RELEASE + Jersey (spring-boot-starter-jersey). The application works fine but after I add @EnableSwagger2 annotation to Application.java I get a java.lang.ClassNotFoundException: org.springframework.web.servlet.HandlerMapping exception.

Demo project to demonstrate the issue: https://github.com/zappee/swagger-bug

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
benjaminkomencommented, Aug 18, 2018

I have the same issue. with springfox 2.9.2

1reaction
dilipkrishcommented, Apr 17, 2018

Spring boot 2.x isnt officially supported yet. But thanks for reporting this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caused by: java.lang.ClassNotFoundException: springfox ...
I got 4.3 paragraph in the tutorial above and when I run my application, I got some errors. This I added to my...
Read more >
I can't run any version of swagger-fox. Spring Boot 2.4.2 + JDK ...
Removing version tag from springfox-swagger2 & springfox-swagger-ui dependencies ... Spring Boot fails to run maven-surefire-plugin ClassNotFoundException ...
Read more >
How to fix java.lang. ClassNotFoundException: org ... - Crunchify
I have been running Spring MVC projects since last ~8 years and ... How to fix ClassNotFoundException org.springframework.web.servlet.
Read more >
Caused By: Java.Lang.Classnotfoundexception - ADocLib
6 springstarterhateoas and springfox swagger2 and swagger UI . Docket; import springfox.documentation.swagger2.annotations. Files\Java\jdk1.8.0171\jre\lib\ ...
Read more >
Springfox Reference Documentation - GitHub Pages
Specifically remove springfox-swagger2 and springfox-swagger-ui ... protected void configure(HttpSecurity http) throws Exception { http.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found