com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector not found --- while using Swagger
The stack trace mentions: java.lang.ClassNotFoundException: com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector not found by com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider
and you are excluding the JAXB annotation module:
<exclusion>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
</exclusion>
The exclusion means a dependency is not resolved, and therefore you'll get the ClassNotFoundException
This worked for me:
Steps: 1-Stop domain
2-Remove content of this folder: Glassfish\glassfish\domains\DOMAIN_NAME\osgi-cache\felix
3-In this folder: C:\Glassfish\glassfish\modules Substitute jackson libraries by the 2.4.4 version:
jackson-module-jaxb-annotations-2.4.4
jackson-jaxrs-json-provider-2.4.4
jackson-jaxrs-base-2.4.4
jackson-databind-2.4.4
jackson-annotations-2.4.4
jackson-core-2.4.4
4-Start domain
I hope it helps :-)
I don't know if this applies to 4.1.1 as well, but Glassfish 4.1 was shipped with old Jackson version and that was the cause to the issue you bring above.
To solve it, you'd have to force Glassfish to load Jackson 2.4.5 at least which is the minimum requirement for swagger-core. Upgrading Jackson in GlassFish 4.1 covers this procedure.