springfox / springfox-grails-integration

SpringFox integration with Grails 3.x
Apache License 2.0
19 stars 12 forks source link

Not working with Grails 3.3.x #75

Open naeemghumman opened 3 years ago

naeemghumman commented 3 years ago

I am trying to integrate Swagger 2 with Grails 3.3.11 (Java 1.8) but getting below exception. Any workaround will be appreciated?

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled. 2021-01-01 17:46:24.214 ERROR --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

An attempt was made to call the method grails.web.mapping.UrlMapping.getConstraints()[Lgrails/validation/ConstrainedProperty; but it does not exist. Its class, grails.web.mapping.UrlMapping, is available from the following locations:

jar:file:/C:/Users/Naeem/.gradle/caches/modules-2/files-2.1/org.grails/grails-web-url-mappings/3.3.11/7e22818ba02ee711adfdbde9dc122b927c0c0b2f/grails-web-url-mappings-3.3.11.jar!/grails/web/mapping/UrlMapping.class

It was loaded from the following location:

file:/C:/Users/Naeem/.gradle/caches/modules-2/files-2.1/org.grails/grails-web-url-mappings/3.3.11/7e22818ba02ee711adfdbde9dc122b927c0c0b2f/grails-web-url-mappings-3.3.11.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of grails.web.mapping.UrlMapping

FAILURE: Build failed with an exception.

BUILD FAILED in 38s Error | Failed to start server (Use --stacktrace to see the full trace)

frafranco commented 3 years ago

I got the same error, the error is inside springfox.documentation.grails.UrlMappings , mapping.getConstraints() do not compile with with version 3.3.11 of Grails (and therefore with grails-web-url-mappings-3.3.11.jar). Any suggestion ? Thanks