Search code examples
javahibernatespring-boot

Spring Boot: Export identifier encountered more than once


Following error occures

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException:Export identifier [order_signal] encountered more than once

I have the following classes:

tradingbot.persistence.model.order.TransactionComponent

@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class TransactionComponent {
    @Id
    @GeneratedValue(strategy = GenerationType.TABLE)
    @Column(name = "id", updatable = false, nullable = false)
    protected Long id;

    ...
}

tradingbot.persistence.model.order.OrderSignal

@Entity
@JsonRootName("OrderSignalDAO")
public class OrderSignal extends TransactionComponent {
    ...
}

tradingbot.persistence.model.order.TransferSignal

@Entity(name = "TransferSignal")
public class TransferSignal extends TransactionComponent {
    ....
}

In class OrderSignal there is no other @Id and there is no getter/setter for id in TransactionComponent as well.

Why does this error occures? What does it mean? How to fix it?


Solution

  • I use IntelliJ for development and in my "out" directory were old .class files. Some of the java classes already have been deleted, but somehow not in the "out" directory.

    As solution I deleted the whole "out" directory.