0

一个项目在 GraalVM 上运行良好。但是当我尝试将它编译为 nativeimage 并启动它时,它给了我这个错误。

[main] ERROR io.micronaut.runtime.Micronaut - Error starting Micronaut server: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [javax.validation.ValidatorFactory]: null
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [org.hibernate.SessionFactory] could not be loaded: Error instantiating bean of type [javax.validation.ValidatorFactory]: null
        at io.micronaut.context.DefaultBeanContext.initializeContext(DefaultBeanContext.java:1551)
        at io.micronaut.context.DefaultApplicationContext.initializeContext(DefaultApplicationContext.java:219)
        at io.micronaut.context.DefaultBeanContext.readAllBeanDefinitionClasses(DefaultBeanContext.java:2857)
        at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:231)
        at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:165)
        at io.micronaut.runtime.Micronaut.start(Micronaut.java:71)
        at io.micronaut.runtime.Micronaut.run(Micronaut.java:311)
        at io.micronaut.runtime.Micronaut.run(Micronaut.java:297)
        at com.threesixty.gh.kye.Application.main(Application.java:8)
Caused by: io.micronaut.context.exceptions.BeanInstantiationException: Error instantiating bean of type [javax.validation.ValidatorFactory]: null
        at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1972)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2724)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2710)
        at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2382)
        at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2356)
        at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:741)
        at io.micronaut.configuration.hibernate.jpa.JpaConfiguration.getProperties(JpaConfiguration.java:179)
        at io.micronaut.data.hibernate.naming.PhysicalNamingStrategyConfiguration.onCreated(PhysicalNamingStrategyConfiguration.java:51)
        at io.micronaut.data.hibernate.naming.PhysicalNamingStrategyConfiguration.onCreated(PhysicalNamingStrategyConfiguration.java:34)
        at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:2000)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingletonInternal(DefaultBeanContext.java:2724)
        at io.micronaut.context.DefaultBeanContext.createAndRegisterSingleton(DefaultBeanContext.java:2710)
        at io.micronaut.context.DefaultBeanContext.getBeanForDefinition(DefaultBeanContext.java:2382)
        at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2356)
        at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:1282)
        at io.micronaut.context.DefaultBeanContext.findBean(DefaultBeanContext.java:752)
        at io.micronaut.configuration.hibernate.jpa.condition.EntitiesInPackageCondition.matches(EntitiesInPackageCondition.java:54)
        at io.micronaut.context.RequiresCondition.matchesCustomConditions(RequiresCondition.java:356)
        at io.micronaut.context.RequiresCondition.processPostStartRequirements(RequiresCondition.java:219)
        at io.micronaut.context.RequiresCondition.matches(RequiresCondition.java:107)
        at io.micronaut.context.AbstractBeanContextConditional.isEnabled(AbstractBeanContextConditional.java:50)
        at io.micronaut.context.AbstractBeanDefinition.isEnabled(AbstractBeanDefinition.java:68)
        at io.micronaut.context.DefaultBeanContext.lambda$findBeanCandidates$38(DefaultBeanContext.java:1733)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
        at java.util.concurrent.ConcurrentLinkedQueue.forEachFrom(ConcurrentLinkedQueue.java:1037)
        at java.util.concurrent.ConcurrentLinkedQueue$CLQSpliterator.forEachRemaining(Concurren

任何见解将不胜感激

4

0 回答 0