我必须将我的应用程序从webshere迁移到weblogic。当我 在WebLogic上部署我的应用程序的耳朵我得到以下错误:
原因:java.lang.Throwable:替代缺少的类 异常[EclipseLink-7299](Eclipse Persistence Services- 2.6.5.v20170607-b3d05bd)-org.eclipse.persistence.exceptions.ValidationException异常 描述:具有相同名称[idSequence]的注释相互冲突 被发现。第一个 [@ javax.persistence.SequenceGenerator({name = idSequence, 在[class]中找到sequenceName = SEQUENCE_TRANSAZIONI})] it.sia.gestoreposizioni.bo.repository.transazioni.Transazioni]和 第二个[@ javax.persistence.SequenceGenerator({name = idSequence, 在[class]中找到sequenceName = GP_SEQUENCE}) it.sia.gestoreposizioni.bo.repository.soap.SoapUsers]。命名 注释在整个持久性单元中必须是唯一的。
//My java Classes:
@Entity
@Table(name = "GP_TRANSAZIONI")
@NamedQueries({
@NamedQuery(name = "Transazioni.findIdTransazioneByPosizione", query = "SELECT distinct(t.identificativoTransazione) FROM Transazioni t WHERE t.posizione.id = ?1")
})
@SequenceGenerator(sequenceName = "SEQUENCE_TRANSAZIONI", name = "idSequence")
public class Transazioni extends AbstractIdEntity {
...
@Entity
@Table(name = "GP_SOAP_USERS")
@NamedQueries({
@NamedQuery(name = "SoapUsers.authenticate", query = "SELECT su FROM SoapUsers su WHERE su.username = ?1 and su.secret = ?2")
})
@SequenceGenerator(sequenceName = "GP_SEQUENCE", name = "idSequence")
public class SoapUsers extends AbstractIdEntity {
...
@MappedSuperclass
public abstract class AbstractIdEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO, generator = "idSequence")
@Column(name = "OBJ_ID")
private Long id;
...
在Transazioni类和SoapUsers类中,具有相同的序列(idSequence)。这两个类都从定义为idSequence
的AbstractIdEntity继承。