我使用Payara Micro和maven从Payara服务器将java应用程序从版本5(5.52.0版本)升级到6版本(6.2024.4)。 构建没问题,但我在运行时得到这个:
[WARNING] [Annotation-Framework] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1715772499197] [levelValue: 900]
Failed to handle annotation [ @jakarta.resource.spi.ConfigProperty(ignore=false, description={},
type=java.lang.String.class, defaultValue=“”, supportsDynamicUpdates=false, confidential=false) ]
on class [ com.sun.gjc.spi.ManagedConnectionFactoryImpl ], reason : not a rar bundle context
…
[SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main]
[timeMillis: 1715786136811] [levelValue: 1000] [[
Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001301:
Annotation QualifierInstance {annotationClass=interface org.glassfish.api.admin.RestEndpoints, values=value=[Lorg.glassfish.api.admin.RestEndpoint;@e283976}} is not a qualifier – WELD-001301:
Annotation QualifierInstance {annotationClass=interface org.glassfish.api.admin.RestEndpoints, values=value=[Lorg.glassfish.api.admin.RestEndpoint;@e283976}} is not a qualifier
我在互联网上找不到任何参考资料。有人遇到过这个吗?谢谢!
解决办法: 我错误地将
<scope>provided</scope>
指令放在模块库下,而不是根目录下。
修正后即可使用。