Michael
Michael

Reputation: 111

Build error when upgrade spring-cloud-starter-dataflow-server-local to 1.3.0

Previously I was using spring-cloud-starter-dataflow-server-local 1.2.3.RELEASE and it worked perfectly. When I upgrade to 1.3.0.RELEASE, the build failed with the compilation error:

org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'entityManagerFactory' defined in class path resource [org/spr
ingframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: In
vocation of init method failed; nested exception is org.hibernate.AnnotationExce
ption: AttributeConverter and explicit Type cannot be applied to same attribute
[org.springframework.cloud.dataflow.registry.domain.AppRegistration.metadataUri];remove @Type or specify @Convert(disableConversion = true)   

Related MAVEN configurations in my pom.xml:

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.10.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <spring-cloud.version>Dalston.SR4</spring-cloud.version>
        <spring-cloud-dataflow-dependencies.version>1.3.0.RELEASE</spring-cloud-dataflow-dependencies.version>
        <java.version>1.8</java.version>
    </properties>

<dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-dataflow-server-local</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

So any suggestions? Thanks in advance.

Upvotes: 2

Views: 595

Answers (1)

Michael
Michael

Reputation: 111

Solved by adding the dependencis:

<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>5.2.12.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>5.2.12.Final</version>
</dependency>

Upvotes: 3

Related Questions