Bartek Andrzejczak
Bartek Andrzejczak

Reputation: 1332

Spring BeanCreationError: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

Is there a way to tell which dependency/annotation is missing in case of this exception?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

I'm using spring-boot 1.5.17.RELEASE and spring-cloud Edgware.SR5, as per start.spring.io. I have spring-boot-starter-web, spring-cloud-starter-config and spring-cloud-starter-eureka included. It's a simple jar that's supposed to be deployed on WildFly alongside Keycloak 4.5.0.Final to register it in Netflix's Eureka instance.

Upvotes: 0

Views: 7087

Answers (1)

Bartek Andrzejczak
Bartek Andrzejczak

Reputation: 1332

I've observed that solution to that problem is always different. Mine was to exclude spring-webmvc from spring-boot-starter-web dependency that I've already had:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

Upvotes: 1

Related Questions