Swagger 2 + Spring MVC + WAS 8.5.5 throwing java.lang.VerifyError: JVMVRFY013 for AOP classes

42 views
Skip to first unread message

Ranjith Kumar

unread,
Nov 17, 2017, 4:38:58 AM11/17/17
to Swagger
I am new to swagger, and trying to integrate swagger2 with my Spring MVC application which will be deployed into WAS 8.5.5. At the time of application startup, I am getting the below error,

Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint, method=getSourceLocation()Lorg/aspectj/lang/reflect/SourceLocation;, pc=0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:85)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:162)
at org.springframework.aop.aspectj.AspectJAroundAdvice.lazyGetProceedingJoinPoint(AspectJAroundAdvice.java:81)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:68)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)


My swagger configurations are as below,

1. Added swagger dependencies in pom.xml
<!-- Swagger dependencies -->
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger2</artifactId>
    <version>2.2.2</version>
</dependency>
<dependency>
    <groupId>io.springfox</groupId>
    <artifactId>springfox-swagger-ui</artifactId>
    <version>2.2.2</version>
</dependency>


2. Added below annotations to my controller classes/operations
@Api(value="eligibilityController", description="Eligibility services API")
@ApiOperation(value = "eligibilityQuery")

3. Swagger reource configuration in applicationContext.xml
<!-- Swagger configurations START -->
<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/> 
<mvc:resources mapping="/swagger-ui.html" location="classpath:/META-INF/resources/swagger-ui.html"/>

<mvc:default-servlet-handler/>    

<bean id="swagger2Config" class="springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration"/>
<!-- Swagger configurations END -->


4. SwaggerConfig class
@Configuration
@EnableSwagger2
public class SwaggerConfig {

    @Bean
    public Docket api(){
        return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .apis(RequestHandlerSelectors.any())
            .paths(PathSelectors.any())
            .build()
            .apiInfo(apiInfo());
    }

    private ApiInfo apiInfo() {
        return new ApiInfoBuilder()
            .title("ResQPortal")
            .description("Medicare ResQPortal Module")
            .version("1.0")
            //.termsOfServiceUrl("http://terms-of-services.url")
            //.license("LICENSE")
            //.licenseUrl("http://url-to-license.com")
            .build();
    }

}

Any help on this would be greatly appreciated. Thank you.
Reply all
Reply to author
Forward
0 new messages