NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain
Description
Environment
Activity
Pothys - MitrahSoft 3 October 2023 at 08:14
Thanks @Leon Miller-Out for your reply. As the reporter said, I'm closing this ticket.
Leon Miller-Out 29 September 2023 at 20:53
@Pothys - MitrahSoft this is fixed (per https://luceeserver.atlassian.net/browse/LDEV-4708 ) in Lucee 5.4.4.5-SNAPSHOT and S3 2.0.1.12, so it can be closed.
Pothys - MitrahSoft 23 September 2022 at 09:53
@Leon Miller-Out Please make ensure that you got the error only when setting mapping incorrectly?
Pothys - MitrahSoft 23 September 2022 at 09:44
@Leon Miller-Out I've checked this ticket with the lucee latest version 5.3.10.78-SNAPSHOT and S3 Extension version 2.0.0.94-RC. I got the error only When I incorrectly set the s3 mapping in Application.cfc, it throws an above-mentioned error Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain.
Stacktrace:
"ERROR","ajp-nio-8009-exec-10","09/23/2022","12:19:34","","Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain;lucee.runtime.exp.NativeException: Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain
at com.amazonaws.services.s3.AmazonS3ClientBuilder.standard(AmazonS3ClientBuilder.java:46)
at org.lucee.extension.resource.s3.AmazonS3Client.create(AmazonS3Client.java:74)
at org.lucee.extension.resource.s3.AmazonS3Client.<init>(AmazonS3Client.java:69)
at org.lucee.extension.resource.s3.AmazonS3Client.get(AmazonS3Client.java:56)
at org.lucee.extension.resource.s3.S3.getAmazonS3(S3.java:1915)
at org.lucee.extension.resource.s3.S3.list(S3.java:445)
at org.lucee.extension.resource.s3.S3.get(S3.java:959)
at org.lucee.extension.resource.s3.S3.exists(S3.java:768)
at org.lucee.extension.resource.s3.S3Resource.exists(S3Resource.java:325)
at lucee.commons.io.res.util.ResourceUtil.toExactResource(ResourceUtil.java:393)
at lucee.runtime.PageSourceImpl.getPhyscalFile(PageSourceImpl.java:567)
at lucee.runtime.PageSourceImpl.physcalExists(PageSourceImpl.java:818)
at lucee.runtime.PageSourceImpl.exists(PageSourceImpl.java:812)
at lucee.runtime.functions.system.ExpandPath.call(ExpandPath.java:71)
at test.testcases.s3.test_cfm$cf$4.call(/test/testcases/S3/test.cfm:27)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:1056)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:948)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:219)
Leon Miller-Out 22 September 2022 at 16:46
Thanks for checking this, Pothys. I’m not getting the same error any more. What I’m seeing now is that the S3 extension 0.9.4.135 works fine and is stable. With the 2.0.0.94-RC extension installed, and S3 mappings in place, my Application.cfc-defined datasource sometimes (but not always) is reported not to exist. When this happens, I see errors in stdout like:
[ERROR] runwar.context: )
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:260)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:79)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:100)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:852)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449)
at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
at java.base/java.lang.Thread.run(Unknown Source)
lucee.runtime.exp.DatabaseException: datasource [from_env_vars] doesn't exist
at lucee.runtime.exp.DatabaseException.notFoundException(DatabaseException.java:195)
at lucee.runtime.PageContextImpl.getDataSource(PageContextImpl.java:3571)
at lucee.runtime.tag.Query.doStartTag(Query.java:483)
at lucee.runtime.functions.query.QueryExecute.call(QueryExecute.java:67)
at lucee.runtime.functions.query.QueryExecute.call(QueryExecute.java:50)
at country_set_cfc$cf.udfCall(/country_set.cfc:47)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:112)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:350)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:223)
I know this isn’t really helpful, and I don’t have the time right now to try building a simple repro case. Sorry!
Details
Assignee
Pothys - MitrahSoftPothys - MitrahSoftReporter
Leon Miller-OutLeon Miller-OutPriority
NewLabels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Details
Details
Assignee
Reporter
Priority
Labels
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Has anyone had problems with Lucee 5.3.9 and the S3 extension? If I use extension version 0.9.4.x, adding S3 mapping breaks my regular mappings. If I use extension version 2.0.0.93-RC, I get this error:
java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain at com.amazonaws.services.s3.AmazonS3ClientBuilder.standard(AmazonS3ClientBuilder.java:46) at org.lucee.extension.resource.s3.AmazonS3Client.create(AmazonS3Client.java:74) at org.lucee.extension.resource.s3.AmazonS3Client.<init>(AmazonS3Client.java:69)
Version 0.9.4.x works fine with Lucee 5.3.8.