提问者:小点点

构建原生映像在从1.7.5到1.8.0的更改夸克版本上中断


当我执行:mvn清洁包-Pnative-Dqukus. native.容器构建=true

我期望:原生形象将被成功构建。

实际:对于夸克版本1.7.5,它按预期工作,但对于1.8.0的版本,它失败并出现一些错误消息。

22:35:07,244 INFO  [org.hib.Version] HHH000412: Hibernate ORM core version 0.0.3-SNAPSHOT
22:35:07,257 INFO  [org.hib.ann.com.Version] HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
22:35:07,317 INFO  [org.hib.dia.Dialect] HHH000400: Using dialect: io.quarkus.hibernate.orm.runtime.dialect.QuarkusPostgreSQL10Dialect
22:35:07,430 INFO  [org.hib.orm.beans] HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
22:35:38,532 INFO  [org.jbo.threads] JBoss Threads version 3.1.1.Final
[kassa-service-0.0.3-SNAPSHOT-runner:27]     (clinit):     740,93 ms,  6,20 GB
[kassa-service-0.0.3-SNAPSHOT-runner:27]   (typeflow):  36.535,89 ms,  6,20 GB
[kassa-service-0.0.3-SNAPSHOT-runner:27]    (objects):  60.944,79 ms,  6,20 GB
[kassa-service-0.0.3-SNAPSHOT-runner:27]   (features):   1.608,81 ms,  6,20 GB
[kassa-service-0.0.3-SNAPSHOT-runner:27]     analysis: 104.453,70 ms,  6,20 GB
Error: Unsupported features in 21 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved field during parsing: **de.lstrobel.quarkus.articles.service.persistence.ArticleKeyEntity.article**. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing field is then reported at run time when it is accessed the first time.
Trace:
        at parsing de.lstrobel.quarkus.articles.service.ArticleService.afterMap(ArticleService.java:31)
Call path from entry point to de.lstrobel.quarkus.articles.service.ArticleService.afterMap(ArticleTO, ArticleEntity):
        at de.lstrobel.quarkus.articles.service.ArticleService.afterMap(ArticleService.java:30)
        at de.lstrobel.quarkus.articles.service.ArticleService_Subclass.afterMap$$superaccessor9(ArticleService_Subclass.zig:1599)
        at de.lstrobel.quarkus.articles.service.ArticleService_Subclass$$function$$9.apply(ArticleService_Subclass$$function$$9.zig:41)
        at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved field during parsing: de.lstrobel.quarkus.articles.service.persistence.ArticleKeyEntity.article. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing field is then reported at run time when it is accessed the first time.
Trace:
        at parsing de.lstrobel.quarkus.articles.service.ArticleService.findByArticleKey(ArticleService.java:56)
Call path from entry point to de.lstrobel.quarkus.articles.service.ArticleService.findByArticleKey(String):
        at de.lstrobel.quarkus.articles.service.ArticleService.findByArticleKey(ArticleService.java:52)
        at de.lstrobel.quarkus.articles.service.ArticleService_Subclass.findByArticleKey$$superaccessor16(ArticleService_Subclass.zig:2398)
        at de.lstrobel.quarkus.articles.service.ArticleService_Subclass$$function$$16.apply(ArticleService_Subclass$$function$$16.zig:33)
        at sun.security.ec.XECParameters$1.get(XECParameters.java:183)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.initializeLazyValue(SystemPropertiesSupport.java:190)
        at com.oracle.svm.core.jdk.SystemPropertiesSupport.getProperty(SystemPropertiesSupport.java:143)
        at com.oracle.svm.core.jdk.Target_java_lang_System.getProperty(JavaLangSubstitutions.java:331)
        at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_System_2_0002egetProperty_00028Ljava_lang_String_2_00029Ljava_lang_String_2(generated:0)

ArticleKeyEntity如下:

@Entity
@Table(name = "article_key", schema = "master_data")
public class ArticleKeyEntity extends KeyEntity {
    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "article_id", nullable = false)
    public ArticleEntity article;
}

ArticleEntity如下:

@Entity
@Table(name = "article", schema = "master_data")
public class ArticleEntity extends BaseEntity {

    @Column(name = "article_number")
    public String articleNumber;

    public String description;

    @Column(name = "long_description")
    public String longDescription;

 ...
    // each article may be identified by different unique keys like numbers barcodes, ....
    @OneToMany(mappedBy = "article", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
    public List<ArticleKeyEntity> articleKeys;
}

我做错了什么?有人能帮我吗?谢谢


共1个答案

匿名用户

已解决:它是一个多模块项目,每个工件中都有实体。META-INF中的“panache-Archive.标记”文件解决了问题。请参阅QUKUS Panache指南。