gpt4 book ai didi

java - 编译错误 - 在 IntelliJ IDEA 中复制类

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:31:54 26 4
gpt4 key购买 nike

我正在尝试在 IDEA 中制作项目,但出现编译错误。如何解决这个问题?我在项目中没有重复的类(class)。当我按下 Jump to source 时,它会显示项目目录 target 中的类。

duplicate class: com.kmware.ttk.kladr.model.KladrSchemStreet_

和项目中的所有类一样

想法 11.1.3Ubuntu 12.04JBoss 7

附加代码:

Round 1:
input files: {com.kmware.ttk.kladr.model.KladrSchemBaseShortening_, com.kmware.ttk.kladr.model.KladrStreetShortening_, com.kmware.ttk.kladr.model.KladrSchemAltNames_, com.kmware.ttk.kladr.model.KladrSchem_, com.kmware.ttk.kladr.model.RQObject_, com.kmware.ttk.kladr.model.KladrBuilding_, com.kmware.ttk.kladr.model.KladrSettings_, com.kmware.ttk.kladr.model.KladrCity_, com.kmware.ttk.kladr.model.KladrSchemStreet_, com.kmware.ttk.kladr.model.KladrSchemBuilding_, com.kmware.ttk.kladr.model.KladrStreet_, com.kmware.ttk.kladr.dao.KladrUpdateDAO, com.kmware.ttk.kladr.dao.KladrStreetDAO, com.kmware.ttk.kladr.model.RQObject, com.kmware.ttk.kladr.model.KladrSettings, com.kmware.ttk.kladr.model.KladrBuilding, com.kmware.ttk.kladr.model.KladrSchemBaseShortening, com.kmware.ttk.kladr.model.KladrCity, com.kmware.ttk.kladr.model.KladrSchemStreet, com.kmware.ttk.kladr.model.KladrSchemAltNames, com.kmware.ttk.kladr.model.KladrSchem, com.kmware.ttk.kladr.dao.KladrStreetShorteningDAO, com.kmware.ttk.kladr.dao.BasicKladrDAO, com.kmware.ttk.kladr.dao.KladrBuildingDAO, com.kmware.ttk.kladr.dao.helper.LazyModelProperties, com.kmware.ttk.kladr.model.KladrStreet, com.kmware.ttk.kladr.model.KladrSchemBuilding, com.kmware.ttk.kladr.model.KladrStreetShortening}

annotations: [javax.annotation.Generated, javax.persistence.metamodel.StaticMetamodel, javax.ejb.Stateless, javax.persistence.PersistenceContext, javax.ejb.TransactionAttribute, org.jboss.ejb3.annotation.TransactionTimeout, javax.persistence.MappedSuperclass, javax.persistence.Id, javax.persistence.Column, javax.persistence.Version, java.lang.Override, javax.persistence.Entity, javax.persistence.Table, javax.persistence.GeneratedValue, javax.persistence.Inheritance, javax.validation.constraints.NotNull, org.hibernate.validator.constraints.NotEmpty, javax.validation.constraints.Digits, java.lang.SuppressWarnings]

last round: false

Note: Hibernate JPA 2 Static-Metamodel Generator 1.2.0.Final

Processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor matches [javax.persistence.Entity, javax.persistence.MappedSuperclass] and returns false.

Processor org.hibernate.validator.ap.ConstraintValidationProcessor matches [javax.persistence.PersistenceContext, javax.ejb.TransactionAttribute, javax.persistence.Column, javax.validation.constraints.NotNull, javax.persistence.Table, org.jboss.ejb3.annotation.TransactionTimeout, java.lang.Override, javax.persistence.Id, javax.persistence.Version, javax.persistence.MappedSuperclass, org.hibernate.validator.constraints.NotEmpty, javax.ejb.Stateless, javax.persistence.metamodel.StaticMetamodel, javax.persistence.Entity, javax.validation.constraints.Digits, javax.annotation.Generated, java.lang.SuppressWarnings, javax.persistence.Inheritance, javax.persistence.GeneratedValue] and returns false.

Round 2:

input files: {com.kmware.ttk.kladr.model.KladrSchemStreet_, com.kmware.ttk.kladr.model.KladrSchemBuilding_, com.kmware.ttk.kladr.model.KladrSchemAltNames_, com.kmware.ttk.kladr.model.KladrStreet_, com.kmware.ttk.kladr.model.KladrSchemBaseShortening_, com.kmware.ttk.kladr.model.KladrBuilding_, com.kmware.ttk.kladr.model.KladrCity_, com.kmware.ttk.kladr.model.KladrSchem_, com.kmware.ttk.kladr.model.RQObject_, com.kmware.ttk.kladr.model.KladrStreetShortening_, com.kmware.ttk.kladr.model.KladrSettings_}

annotations: []

Processor org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor matches [] and returns false.

Processor org.hibernate.validator.ap.ConstraintValidationProcessor matches [] and returns false.

Round 3:

input files: {}

last round: true

Compilation completed with 11 errors and 0 warnings

11 errors
0 warnings

/home/kelevra/java/KLADR/kladr/kladr-ejb/target/classes/com/kmware/ttk/kladr/model/KladrSchemStreet_.java
duplicate class: com.kmware.ttk.kladr.model.KladrSchemStreet_

/home/kelevra/java/KLADR/kladr/kladr-ejb/target/classes/com/kmware/ttk/kladr/model/KladrSchemBuilding_.java
duplicate class: com.kmware.ttk.kladr.model.KladrSchemBuilding_

/home/kelevra/java/KLADR/kladr/kladr-ejb/target/classes/com/kmware/ttk/kladr/model/KladrSchemAltNames_.java
duplicate class: com.kmware.ttk.kladr.model.KladrSchemAltNames_

...

还有 8 个类

最佳答案

您是否以某种方式将模块的编译输出添加为依赖项?直接通过 IntelliJ 或通过 Maven。

关于java - 编译错误 - 在 IntelliJ IDEA 中复制类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12913012/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com