question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Facing issue while running docker image on Apple M1 platform.

See original GitHub issue

Logs as follows:

docker run -it adobe/s3mock

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested


  .-')              _   .-')                           .-. .-')  
 ( OO ).           ( '.( OO )_                         \  ( OO ) 
(_)---\_) .-----.   ,--.   ,--.).-'),-----.    .-----. ,--. ,--. 
/    _ | /  -.   \  |   `.'   |( OO'  .-.  '  '  .--./ |  .'   / 
\  :` `. '-' _'  |  |         |/   |  | |  |  |  |('-. |      /, 
 '..`''.)   |_  <   |  |'.'|  |\_) |  |\|  | /_) |OO  )|     ' _)
.-._)   \.-.  |  |  |  |   |  |  \ |  | |  | ||  |`-'| |  .   \  
\       /\ `-'   /  |  |   |  |   `'  '-'  '(_'  '--'\ |  |\   \ 
 `-----'  `----''   `--'   `--'     `-----'    `-----' `--' '--' 



2021-08-31 13:38:53.029  INFO 1 --- [           main] c.a.testing.s3mock.S3MockApplication     : Starting S3MockApplication on 5645918340f0 with PID 1 (/opt/service/s3mock-2.2.1-exec.jar started by root in /)
2021-08-31 13:38:53.091  INFO 1 --- [           main] c.a.testing.s3mock.S3MockApplication     : No active profile set, falling back to default profiles: default
2021-08-31 13:38:58.367  WARN 1 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webServerFactory' defined in class path resource [com/adobe/testing/s3mock/S3MockApplication$Config.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.server.ServletWebServerFactory]: Factory method 'webServerFactory' threw exception; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.ClassFormatError-->Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
2021-08-31 13:38:58.419  INFO 1 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-08-31 13:38:58.531 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webServerFactory' defined in class path resource [com/adobe/testing/s3mock/S3MockApplication$Config.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.server.ServletWebServerFactory]: Factory method 'webServerFactory' threw exception; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.ClassFormatError-->Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at com.adobe.testing.s3mock.S3MockApplication.start(S3MockApplication.java:212) ~[classes!/:na]
	at com.adobe.testing.s3mock.S3MockApplication.start(S3MockApplication.java:176) ~[classes!/:na]
	at com.adobe.testing.s3mock.S3MockApplication.main(S3MockApplication.java:165) ~[classes!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[s3mock-2.2.1-exec.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[s3mock-2.2.1-exec.jar:na]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[s3mock-2.2.1-exec.jar:na]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[s3mock-2.2.1-exec.jar:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webServerFactory' defined in class path resource [com/adobe/testing/s3mock/S3MockApplication$Config.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.server.ServletWebServerFactory]: Factory method 'webServerFactory' threw exception; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.ClassFormatError-->Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:485) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1341) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1181) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getWebServerFactory(ServletWebServerApplicationContext.java:212) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:177) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:158) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
	... 18 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.server.ServletWebServerFactory]: Factory method 'webServerFactory' threw exception; nested exception is org.springframework.cglib.core.CodeGenerationException: java.lang.ClassFormatError-->Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:652) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	... 30 common frames omitted
Caused by: org.springframework.cglib.core.CodeGenerationException: java.lang.ClassFormatError-->Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
	at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:514) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:363) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:110) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:108) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source) ~[na:na]
	at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:134) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:319) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.reflect.FastClass$Generator.create(FastClass.java:65) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.proxy.MethodProxy.helper(MethodProxy.java:135) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.proxy.MethodProxy.init(MethodProxy.java:76) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:242) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	at com.adobe.testing.s3mock.S3MockApplication$Config$$EnhancerBySpringCGLIB$$a9e88d11.webServerFactory(<generated>) ~[classes!/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	... 31 common frames omitted
Caused by: java.lang.ClassFormatError: Illegal class name "java/lang/Class[]" in class file com/adobe/testing/s3mock/S3MockApplication$Config$$FastClassBySpringCGLIB$$1db321fa
	at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[na:na]
	at java.base/java.lang.System$2.defineClass(Unknown Source) ~[na:na]
	at java.base/java.lang.invoke.MethodHandles$Lookup.defineClass(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
	at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:509) ~[spring-core-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
	... 51 common frames omitted

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
ansmancommented, Nov 2, 2021

FYI I have deployed a mirror that supports arm64 to bontouch/s3mock:2.2.2.

1reaction
afrankencommented, Sep 1, 2021

@NikhilPareek88 did you check #253? Is this a duplicate?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix broken Docker Development on Apple Macbook M1
Docker is based on Golang and needs virtualization support. Getting Go to support the new architecture is not a problem and will be...
Read more >
Why new Macs break your Docker build, and how to fix it
New Macs can break your Docker image build in unexpected ways; learn why, and how to fix it.
Read more >
Limitations on docker on Apple M1 (Apple Silicon)? - Reddit
You can run x86/x64 images by specifying the platform in docker-compose, but in my experience that runs very slow and uses a lot...
Read more >
docker-compose up issue Using Docker Apple M1
When you run the prisma generate command, prisma seems to uses the query engine , but it needs to find the proper binary...
Read more >
Docker image build issue on M1 processor. - Apple Community
Hi Team I am facing issue while running docker-compose file on mac M1 its failling to start keycloak server with error 03:48:41,571 ERROR ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found