NoClassDefFoundError: jakarta/annotation/PostConstruct lors de la construction du BlobStore context

Request description

jClouds non fonctionnel sur la version 6.1

Steps to reproduce

This request concerns an up-to-date Simplicité instance
and these are the steps to reproduce it:

Les instructions suivantes induisent l’exception com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: jakarta/annotation/PostConstruct ci-dessous :

this.blobStoreContext = ContextBuilder.newBuilder(this.config.getString("provider"))
						.credentials(this.config.getString("identity"), credentialSupplier.get().credential)
						.buildView(BlobStoreContext.class);

Traces de l’exception :

2024-09-14 15:23:16,012|SIMPLICITE|ERROR||http://bca-71077-app-857dc75996-h6s6z:8080||ERROR|system|com.simplicite.util.ObjectHooks|postLoad||Event: Error in the hook postLoad of object GcsDocument
    com.google.common.util.concurrent.ExecutionError: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: jakarta/annotation/PostConstruct
     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2085)
     at com.google.common.cache.LocalCache.get(LocalCache.java:4019)
     at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4042)
     at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5024)
     at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5031)
     at com.google.inject.internal.FailableCache.get(FailableCache.java:61)
     at com.google.inject.internal.ConstructorInjectorStore.get(ConstructorInjectorStore.java:53)
     at com.google.inject.internal.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:152)
     at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:607)
     at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:990)
     at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:902)
     at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:302)
     at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:225)
     at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:996)
     at com.google.inject.internal.FactoryProxy.notify(FactoryProxy.java:48)
     at com.google.inject.internal.InjectorImpl.lambda$createJustInTimeBinding$0(InjectorImpl.java:988)
     at com.google.inject.internal.InjectorImpl.createImplementedByBinding(InjectorImpl.java:854)
     at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:726)
     at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:982)
     at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:902)
     at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:302)
     at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:225)
     at com.google.inject.internal.InjectorImpl.createParameterInjector(InjectorImpl.java:1083)
     at com.google.inject.internal.InjectorImpl.getParametersInjectors(InjectorImpl.java:1070)
     at com.google.inject.internal.ProviderMethod.initialize(ProviderMethod.java:164)
     at com.google.inject.internal.InternalProviderInstanceBindingImpl.initialize(InternalProviderInstanceBindingImpl.java:64)
     at com.google.inject.internal.InjectorImpl.initializeBinding(InjectorImpl.java:593)
     at com.google.inject.internal.AbstractBindingProcessor$Processor.initializeBinding(AbstractBindingProcessor.java:176)
     at com.google.inject.internal.AbstractBindingProcessor$Processor.lambda$scheduleInitialization$0(AbstractBindingProcessor.java:163)
     at com.google.inject.internal.ProcessedBindingData.initializeBindings(ProcessedBindingData.java:49)
     at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:126)
     at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
     at com.google.inject.Guice.createInjector(Guice.java:87)
     at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:405)
     at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:328)
     at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:615)
     at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:595)
     at com.simplicite.objects.RenaultGCS.GcsDocument.postLoad(GcsDocument.java:80)
     at com.simplicite.util.ObjectHooks.lambda$postLoad$1(ObjectHooks.java:309)
     at com.simplicite.util.ObjectHooks$Wrapper.call(ObjectHooks.java:100)
     at com.simplicite.util.ObjectHooks.postLoad(ObjectHooks.java:307)
     at com.simplicite.util.engine.ObjectLoader.load(ObjectLoader.java:101)
     at com.simplicite.util.engine.ObjectDirect.init(ObjectDirect.java:50)
     at com.simplicite.util.ObjectDB.init(ObjectDB.java:256)
     at com.simplicite.util.ObjectDB.load(ObjectDB.java:234)
     at com.simplicite.util.ObjectService.load(ObjectService.java:26)
     at com.simplicite.util.engine.CoreCache.instantiateObject(CoreCache.java:4948)
     at com.simplicite.util.engine.CoreCache.getObject(CoreCache.java:4879)
     at com.simplicite.util.engine.GrantManager.getObject(GrantManager.java:86)
     at com.simplicite.util.engine.GrantDirect.getObject(GrantDirect.java:637)
     at com.simplicite.util.Grant.getObject(Grant.java:2053)
     at com.simplicite.util.GrantCore.getMainObject(GrantCore.java:4319)
     at com.simplicite.util.Constraint.generateScript(Constraint.java:843)
     at com.simplicite.util.Constraint.generateScript(Constraint.java:805)
     at com.simplicite.util.ObjectDB.setConstraint(ObjectDB.java:1651)
     at com.simplicite.util.engine.ObjectLoader.loadConstraints(ObjectLoader.java:2630)
     at com.simplicite.util.engine.ObjectLoader.loadFromDB(ObjectLoader.java:976)
     at com.simplicite.util.engine.ObjectLoader.getClone(ObjectLoader.java:124)
     at com.simplicite.util.engine.ObjectLoader.load(ObjectLoader.java:86)
     at com.simplicite.util.engine.ObjectDirect.init(ObjectDirect.java:50)
     at com.simplicite.util.ObjectDB.init(ObjectDB.java:256)
     at com.simplicite.util.ObjectDB.load(ObjectDB.java:234)
     at com.simplicite.util.ObjectService.load(ObjectService.java:26)
     at com.simplicite.util.engine.CoreCache.instantiateObject(CoreCache.java:4948)
     at com.simplicite.util.engine.CoreCache.getObject(CoreCache.java:4879)
     at com.simplicite.util.engine.GrantManager.getObject(GrantManager.java:86)
     at com.simplicite.util.engine.GrantDirect.getObject(GrantDirect.java:637)
     at com.simplicite.util.Grant.getObject(Grant.java:2053)
     at com.simplicite.webapp.ObjectJson.borrowObject(ObjectJson.java:103)
     at com.simplicite.webapp.ObjectJson.metadata(ObjectJson.java:152)
     at com.simplicite.webapp.tools.JSONServletTool.businessObjectService(JSONServletTool.java:563)
     at com.simplicite.webapp.servlets.AbstractJSONServlet.process(AbstractJSONServlet.java:155)
     at com.simplicite.webapp.servlets.AbstractJSONServlet.service(AbstractJSONServlet.java:129)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:199)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
     at com.simplicite.webapp.filters.HTTPHeadersFilter.doFilter(HTTPHeadersFilter.java:39)
     at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
     at com.simplicite.webapp.filters.AuthMethodFilter.doFilter(AuthMethodFilter.java:222)
     at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
     at com.simplicite.webapp.filters.RewriteFilter.doFilter(RewriteFilter.java:68)
     at com.simplicite.webapp.filters.AbstractFilter.doFilter(AbstractFilter.java:49)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:168)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:156)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:383)
     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:936)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
     at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
     at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
     at java.base/java.lang.Thread.run(Thread.java:1583)
    Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: jakarta/annotation/PostConstruct
     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2085)
     at com.google.common.cache.LocalCache.get(LocalCache.java:4019)
     at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4042)
     at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5024)
     at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5031)
     at com.google.inject.internal.FailableCache.get(FailableCache.java:61)
     at com.google.inject.internal.MembersInjectorStore.get(MembersInjectorStore.java:69)
     at com.google.inject.internal.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:79)
     at com.google.inject.internal.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
     at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:37)
     at com.google.inject.internal.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
     at com.google.inject.internal.FailableCache$1.load(FailableCache.java:48)
     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3576)
     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2318)
     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2191)
     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2081)
     ... 107 more
    Caused by: java.lang.NoClassDefFoundError: jakarta/annotation/PostConstruct
     at org.jclouds.lifecycle.config.LifeCycleModule$3.apply(LifeCycleModule.java:104)
     at org.jclouds.lifecycle.config.LifeCycleModule$3.apply(LifeCycleModule.java:102)
     at com.google.common.collect.Iterators$5.computeNext(Iterators.java:673)
     at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
     at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
     at org.jclouds.lifecycle.config.LifeCycleModule$4.hear(LifeCycleModule.java:112)
     at com.google.inject.internal.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:107)
     at com.google.inject.internal.MembersInjectorStore.access$000(MembersInjectorStore.java:40)
     at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:49)
     at com.google.inject.internal.MembersInjectorStore$1.create(MembersInjectorStore.java:45)
     at com.google.inject.internal.FailableCache$1.load(FailableCache.java:48)
     at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3576)
     at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2318)
     at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2191)
     at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2081)
     ... 122 more
    Caused by: java.lang.ClassNotFoundException: jakarta.annotation.PostConstruct
     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
     at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1120)
     ... 137 more

Technical information

Instance /health

[Platform]
Status=OK
Version=6.1.6
BuiltOn=2024-09-13 16:21
Git=6.1/dfa6a2c301a0b79b7667cb2f921b3c5a38f0d51c
Encoding=UTF-8
EndpointIP=100.88.210.138
EndpointURL=http://bca-71077-app-857dc75996-h6s6z:8080
TimeZone=Europe/Paris
SystemDate=2024-09-14 15:25:01

[Application]
ApplicationVersion=1.0.0
ContextPath=
ContextURL=https://bcsi-legal-app.ext.gke2.dev.gcp.renault.com
ActiveSessions=1
TotalUsers=8852
EnabledUsers=1643
LastLoginDate=2024-09-14 15:22:50

[Server]
ServerInfo=Apache Tomcat/9.0.94
ServerType=WEB
ServerActiveSessions=11
ServerSessionTimeout=30
CronStarted=true

[OS]
Name=Linux
Architecture=amd64
Version=6.1.90+
DockerImageName=almalinux9
SystemEncoding=UTF-8

[JavaVM]
Version=21.0.4
Vendor=Eclipse Adoptium
VMName=OpenJDK 64-Bit Server VM
VMVersion=21.0.4+7-LTS
ScriptEngine=rhino
ScriptEngineVersion=Rhino 1.7.13 2020 09 02
HeapFree=202830
HeapSize=834560
HeapMaxSize=2068480
TotalFreeSize=1436750

[Cache]
ObjectCache=448
ObjectCacheMax=10000
ObjectCacheRatio=4
ProcessCache=9
ProcessCacheMax=10000
ProcessCacheRatio=0
APIGrantCache=0
APIGrantCacheMax=1000
APIGrantRatio=0

[Database]
Vendor=3
VendorName=postgresql
ProductName=PostgreSQL
ProductVersion=15.7
DriverName=PostgreSQL JDBC Driver
DriverVersion=42.7.4
DBDate=2024-09-14 15:25:01
DBDateOffset=0
DBPatchLevel=6;P01;bc60e9308ea47874d03234a2a565bea9;6
UsingBLOBs=true

[Healthcheck]
Date=2024-09-14 15:25:01
ElapsedTime=20
Simplicité logs
NA
Browser logs
NA
Other relevant information

NA

Nous allons vérifier les dépendances et faire quelques tests, et on te tiens au courant

1 Like

La lib des annotations Jakarta était dans la liste de libs “compile” qui ne sont pas packagées dans la webapp.

Ca ne posait pas de pb avec la version 2.5.0 de JClouds mais visiblement c’est pas le cas avec la version 2.6.0 qu’on a upgradée en 6.1+

Bref on l’a ajoutée au packaging. est-ce que ça peut attendre la prochaine revision 6.1.7 prevue pour la fin de la semaine ?

1 Like

Bonjour David, merci beaucoup pour ton retour rapide.
Oui ça peut attendre la fin de la semaine.

OK parfait

En attendant ce sera embarqué dans la “preview” de la 6.1 buildée ce soir (on peut aussi temporairement mettre une image Docker 6-preview à dispo avec cette preview)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.