Skip to content

Spring 4 incompatibility using springdoc-openapi 1.2.30+ #563

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

Closed
mmateyak opened this issue Apr 13, 2020 · 10 comments
Closed

Spring 4 incompatibility using springdoc-openapi 1.2.30+ #563

mmateyak opened this issue Apr 13, 2020 · 10 comments
Labels
bug Something isn't working

Comments

@mmateyak
Copy link

I have an existing Spring 4 API and have successfully integrated springdoc-openapi to generate the OpenAPI 3 spec in JSON/YAML and also display the Swagger UI using springdoc-openapi 1.2.29 and Spring Boot 15.2.2.RELEASE, however there appear to be various bugs that were fixed and enhancements added in later versions of springdoc-openapi. Unfortunately I am running into various compatibility issues with Spring 4 if I use versions higher than springdoc-openapi 1.2.29.

Is there an availability compatibility matrix for springdoc-openapi and Spring 4? As I read through the springdoc-openapi documentation, I do not see any readme or release notes suggesting there is a Spring 5 requirement, however as noted below there are Spring 5 classes used in the underlying springdoc-openapi once you reach a certain version.

My relevant POM:

<!-- anything over 1.2.33 uses Spring 5 MethodParameter.getParameter()-->
<!-- anything over 1.2.29 uses Spring 5 org.springframework.http.codec.multipart.FilePart -->
<!-- webjars-locator-jboss-vfs is required for running under JBOSS and exposing the swagger-ui -->
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-ui</artifactId>
    <version>1.2.29</version>
</dependency>
<!--  
<dependency>
    <groupId>org.springdoc</groupId>
    <artifactId>springdoc-openapi-security</artifactId>
    <version>1.2.29</version>
</dependency>
-->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot</artifactId>
    <version>1.5.22.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-autoconfigure</artifactId>
    <version>1.5.22.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>webjars-locator-jboss-vfs</artifactId>
    <version>0.1.0</version>
</dependency>

When using springdoc-openapi-ui 1.2.30, it will subsequently bring in springdoc-openapi-common-1.2.30.jar which throw an exception trying to use org.springframework.http.codec.multipart.FilePart. Likewise, using 1.2.34 or higher will throw an exception on MethodParameter.getParameter().

12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1) Caused by: java.lang.NoClassDefFoundError: org/springframework/http/codec/multipart/FilePart
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.core.GenericParameterBuilder.isFile(GenericParameterBuilder.java:271)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.core.GenericParameterBuilder.isFile(GenericParameterBuilder.java:296)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.core.AbstractRequestBuilder.buildParams(AbstractRequestBuilder.java:271)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.core.AbstractRequestBuilder.build(AbstractRequestBuilder.java:174)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:205)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.api.OpenApiResource.calculatePath(OpenApiResource.java:134)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.api.OpenApiResource.getPaths(OpenApiResource.java:99)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.api.AbstractOpenApiResource.getOpenApi(AbstractOpenApiResource.java:124)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springdoc.api.OpenApiResource.openapiJson(OpenApiResource.java:83)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:15:05,003 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at java.lang.reflect.Method.invoke(Method.java:498)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
12:15:05,004 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-1)    ... 61 more

Spring 5 reference: https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/http/codec/multipart/FilePart.html

public interface FilePart
extends Part

Specialization of Part that represents an uploaded file received in a multipart request.

Since:
    5.0

Any suggestions on how to work around this to leverage the bug fixes and enhancements in springdoc-openapi in later versions?

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Apr 13, 2020

@mmateyak,

Can you please test with v1.3.2 of springdoc-openapi ?
The supported has been removed for spring-boot-1, but it has been restored, as there was still project using spring 4/spring-boot-1.
You can consult, the changelog for more details:

@mmateyak
Copy link
Author

Test under 1.3.2

	<!-- springdoc-openapi-ui -->
	<!-- anything over 1.2.33 uses Spring 5 MethodParameter.getParameter()-->
	<!-- anything over 1.2.29 uses Spring 5 org.springframework.http.codec.multipart.FilePart -->
	<!-- webjars-locator-jboss-vfs is required for running under JBOSS and exposing the swagger-ui -->
	<dependency>
		<groupId>org.springdoc</groupId>
		<artifactId>springdoc-openapi-ui</artifactId>
		<version>1.3.2</version>
	</dependency>
	<!--  
	<dependency>
		<groupId>org.springdoc</groupId>
		<artifactId>springdoc-openapi-security</artifactId>
		<version>1.2.29</version>
	</dependency>
	-->
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot</artifactId>
		<version>1.5.22.RELEASE</version>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-autoconfigure</artifactId>
		<version>1.5.22.RELEASE</version>
	</dependency>
	<dependency>
		<groupId>org.webjars</groupId>
		<artifactId>webjars-locator-jboss-vfs</artifactId>
		<version>0.1.0</version>
	</dependency>

Result:

12:06:04,925 ERROR [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 109) Context initialization failed: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/bind/Binder
	at org.springdoc.core.SpringDocConfiguration.lambda$springdocBeanFactoryPostProcessor$4(SpringDocConfiguration.java:157) [springdoc-openapi-common-1.3.2.jar:1.3.2]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:281) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:176) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524) [spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) [spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3780) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_241]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_241]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_241]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_241]
	at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_241]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Reliance on org.springframework.boot.context.properties.bind.Binder released in Spring Boot 2.0.0

https://docs.spring.io/spring-boot/docs/current/api/org/springframework/boot/context/properties/bind/Binder.html

SpringDocConfiguration:

import org.springframework.boot.context.properties.bind.BindResult;
import org.springframework.boot.context.properties.bind.Binder;
@Bean
	@Conditional(CacheOrGroupedOpenApiCondition.class)
	BeanFactoryPostProcessor springdocBeanFactoryPostProcessor(Environment environment) {
		return beanFactory -> {
			final BindResult<SpringDocConfigProperties> result = Binder.get(environment)
					.bind(SPRINGDOC_PREFIX, SpringDocConfigProperties.class);
			if (result.isBound()) {
				SpringDocConfigProperties springDocGroupConfig = result.get();
				List<GroupedOpenApi> groupedOpenApis = springDocGroupConfig.getGroupConfigs().stream()
						.map(elt -> {
							GroupedOpenApi.Builder builder = GroupedOpenApi.builder();
							if (!CollectionUtils.isEmpty(elt.getPackagesToScan()))
								builder.packagesToScan(elt.getPackagesToScan().toArray(new String[0]));
							if (!CollectionUtils.isEmpty(elt.getPathsToMatch()))
								builder.pathsToMatch(elt.getPathsToMatch().toArray(new String[0]));
							return builder.setGroup(elt.getGroup()).build();
						})
						.collect(Collectors.toList());
				groupedOpenApis.forEach(elt -> beanFactory.registerSingleton(elt.getGroup(), elt));
			}
			for (String beanName : beanFactory.getBeanNamesForType(OpenAPIBuilder.class))
				beanFactory.getBeanDefinition(beanName).setScope(SCOPE_PROTOTYPE);
			for (String beanName : beanFactory.getBeanNamesForType(OpenAPI.class))
				beanFactory.getBeanDefinition(beanName).setScope(SCOPE_PROTOTYPE);
		};
	}

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Apr 13, 2020

@mmateyak,

The demo app here uses spring-boot-1 without any issues:

Are you enabling cache or using groups ? (It seems to be GroupedOpenApi!)

@mmateyak
Copy link
Author

@bnasslahsen

I haven't checked out the springdoc-openapi-test-app1 project yet to review the effective POM but looking at the parent POM, it has Spring Boot defined as 2.2.6-RELEASE. Any chance that the effective class being sought is acquired through the parent POM when not found in the child POM's resources for Spring Boot?

https://github.com/springdoc/springdoc-openapi-demos/blob/master/pom.xml

	<properties>
		<java.version>1.8</java.version>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<swagger-api.version>2.0.8</swagger-api.version>
		<maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
		<maven-jar-plugin.version>3.1.0</maven-jar-plugin.version>
		<maven-resources-plugin.version>3.0.2</maven-resources-plugin.version>
		<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
		<maven-source-plugin.version>3.0.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-war-plugin.version>3.1.0</maven-war-plugin.version>
		<nexus-staging-maven-plugin>1.6.8</nexus-staging-maven-plugin>
		<jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
		<resource.delimiter>@</resource.delimiter>
		<m2e.apt.activation>jdt_apt</m2e.apt.activation>
		<spring-boot.version>2.2.6.RELEASE</spring-boot.version>
		<springdoc.version>1.3.2</springdoc.version>
	</properties>

@bnasslahsen
Copy link
Collaborator

bnasslahsen commented Apr 13, 2020

@mmateyak,

For the demo1, you can look at the child pom, where the version of spring-boot is overriden.

The cause of the issue is confirmed: "org.springframework.boot.context.properties.bind.BindResult" class which has been added on spring-boot 2, related to the cache disable or groups enbaled.

Feature about dynamic groups using application.yml, won't be provided out of the box on spring-boot-1 applications.

Other features will be available as before with the next release v1.3.3;

@mmateyak
Copy link
Author

Thanks @bnasslahsen

Sorry I didn't answer earlier, I wasn't explicitly using groups or caching at the time, so whatever the defaults are is what I was inherently using. Glad you were able to confirm the issue.

Just to be clear, are you saying if I enable cache or disable groups, Spring 4.x + Spring Boot 1.x will work in 1.3.2? And in 1.3.3 (when released) Spring 4.x + Spring Boot 1.x will work with either cache enabled or disabled, but groups won't be supported?

@mmateyak
Copy link
Author

@bnasslahsen

Correction, I did just verify I had springdoc.cache.disabled=true. Changing it to springdoc.cache.disabled=false did allow me to deploy with v1.3.2, however I'm working through a webjars conflict now. Same error whether I have the following in my POM enabled or disabled:

<dependency>
	<groupId>org.webjars</groupId>
	<artifactId>webjars-locator-jboss-vfs</artifactId>
	<version>0.1.0</version>
</dependency>
15:04:09,043 WARN  [org.springframework.web.servlet.resource.WebJarsResourceResolver] (ajp-localhost/127.0.0.1:8009-2) WebJar version conflict for "swagger-ui/index.html": org.webjars.MultipleMatchesException: Multiple matches found for /index.html. Please provide a more specific path, for example by including a version number.
	at org.webjars.WebJarAssetLocator.throwMultipleMatchesException(WebJarAssetLocator.java:182) [webjars-locator-core-0.41.jar:]
	at org.webjars.WebJarAssetLocator.getFullPath(WebJarAssetLocator.java:238) [webjars-locator-core-0.41.jar:]
	at org.springframework.web.servlet.resource.WebJarsResourceResolver.findWebJarResourcePath(WebJarsResourceResolver.java:108) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.resource.WebJarsResourceResolver.resolveResourceInternal(WebJarsResourceResolver.java:79) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.resource.AbstractResourceResolver.resolveResource(AbstractResourceResolver.java:46) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.resource.DefaultResourceResolverChain.resolveResource(DefaultResourceResolverChain.java:57) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.getResource(ResourceHttpRequestHandler.java:428) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:329) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) [spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

I'll keep working through the issue, but if you have any ideas, please let me know. Thanks!

@mmateyak
Copy link
Author

mmateyak commented Apr 13, 2020

@bnasslahsen

OK, with the following I am able to deploy with 1.3.2 but am back to the original issue of java.lang.NoClassDefFoundError: org/springframework/http/codec/multipart/FilePart

Properties:

# Enable/Disable the /v3/api-docs enpoint
springdoc.api-docs.enabled=true

# Disabling the swagger-ui
springdoc.swagger-ui.enabled=true

# Enable filtering
springdoc.swagger-ui.filter=true

# Sorting
springdoc.swagger-ui.operationsSorter=alpha
springdoc.swagger-ui.tagsSorter=alpha

springdoc.override-with-generic-response=false

springdoc.api-docs.resolve-schema-properties=false

springdoc.cache.disabled=false

POM:

<!-- springdoc-openapi-ui -->
	<!-- anything over 1.2.33 uses Spring 5 MethodParameter.getParameter()-->
	<!-- anything over 1.2.29 uses Spring 5 org.springframework.http.codec.multipart.FilePart -->
	<!-- webjars-locator-jboss-vfs is required for running under JBOSS and exposing the swagger-ui -->
	<dependency>
		<groupId>org.springdoc</groupId>
		<artifactId>springdoc-openapi-ui</artifactId>
		<version>1.3.2</version>
		<exclusions>
			<exclusion>
				<groupId>org.webjars</groupId>
				<artifactId>webjars-locator-core</artifactId>
			</exclusion>
		</exclusions>
	</dependency>
	<!--  
	<dependency>
		<groupId>org.springdoc</groupId>
		<artifactId>springdoc-openapi-security</artifactId>
		<version>1.2.29</version>
	</dependency>
	-->
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot</artifactId>
		<version>1.5.22.RELEASE</version>
	</dependency>
	<dependency>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-autoconfigure</artifactId>
		<version>1.5.22.RELEASE</version>
	</dependency>
	<dependency>
		<groupId>org.webjars</groupId>
		<artifactId>webjars-locator-jboss-vfs</artifactId>
		<version>0.1.0</version>
	</dependency>
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) Caused by: java.lang.NoClassDefFoundError: org/springframework/http/codec/multipart/FilePart
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.core.GenericParameterBuilder.isFile(GenericParameterBuilder.java:269)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.core.GenericParameterBuilder.isFile(GenericParameterBuilder.java:234)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.core.AbstractRequestBuilder.buildParams(AbstractRequestBuilder.java:296)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.core.AbstractRequestBuilder.build(AbstractRequestBuilder.java:190)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.api.AbstractOpenApiResource.calculatePath(AbstractOpenApiResource.java:217)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.webmvc.api.OpenApiResource.calculatePath(OpenApiResource.java:142)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.webmvc.api.OpenApiResource.getPaths(OpenApiResource.java:108)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.api.AbstractOpenApiResource.getOpenApi(AbstractOpenApiResource.java:140)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springdoc.webmvc.api.OpenApiResource.openapiJson(OpenApiResource.java:92)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at java.lang.reflect.Method.invoke(Method.java:498)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
15:20:49,300 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
15:20:49,301 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
15:20:49,301 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
15:20:49,301 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
15:20:49,301 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
15:20:49,301 ERROR [stderr] (ajp-localhost/127.0.0.1:8009-3) 	... 61 more

@bnasslahsen
Copy link
Collaborator

@mmateyak ,

I can see the the line code that causes this issue.
You can validate the changes locally, with the last snapshot version, which is deployed to maven central v1.3.3-SNAPSHOT.

You can set temporarly the repositories section on your pom.xml our settings.xml, if you want to test:

	 <repositories>
       <repository>
         <id>snapshots-repo</id>
         <url>https://oss.sonatype.org/content/repositories/snapshots</url>
         <releases><enabled>false</enabled></releases>
         <snapshots><enabled>true</enabled></snapshots>
       </repository>
     </repositories>

@mmateyak
Copy link
Author

@bnasslahsen

Great, 1.3.3-SNAPSHOT got me past that error, have to review other aspects of Springdoc and Swagger, but the /v3/api-docs and /swagger-ui.html endpoints are loading now. Thanks for the extremely fast turnaround!

@bnasslahsen bnasslahsen added the bug Something isn't working label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants