You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "GCwithH2O (via GitHub)" <gi...@apache.org> on 2025/06/04 09:54:09 UTC

[I] docker seata:latest找不到mysql驱动 [incubator-seata]

GCwithH2O opened a new issue, #7413:
URL: https://github.com/apache/incubator-seata/issues/7413

   ### Check Ahead
   
   - [x] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
   
   
   ### Ⅰ. Issue Description
   
   docker pull apache/seata-server:latest 拉取最新镜像,使用db模式启动,报错找不到jdbc文件夹
   
   
   ### Ⅱ. Describe what happened
   
   run命令:
   podman run --name=seata --net=host --log-opt max-size=10m --log-opt max-file=3 -e TZ=Asia/Shanghai -v "/repository/conf/seata:/seata-server/resources" -v "/repository/conf/seata/jdbc/mysql-connector-j-8.3.0.jar:/seata-server/libs/jdbc/mysql-connector-j-8.3.0.jar" -e SEATA_IP=192.168.0.7 -e TZ=Asia/Shanghai -d docker.io/apache/seata-server:latest
   
   异常信息:
   Caused by: org.apache.seata.common.loader.EnhancedServiceNotFoundException: not found service provider for : org.apache.seata.core.store.db.DataSourceProvider caused by java.lang.IllegalStateException: Extension instance(definition: org.apache.seata.common.loader.ExtensionDefinition@95c4abcd, class: interface org.apache.seata.core.store.db.DataSourceProvider)  could not be instantiated: cannot find jdbc folder
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.createNewExtension(EnhancedServiceLoader.java:495)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.getExtensionInstance(EnhancedServiceLoader.java:478)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.loadExtension(EnhancedServiceLoader.java:453)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.load(EnhancedServiceLoader.java:347)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.access$200(EnhancedServiceLoader.java:278)
           at org.apache.seata.common.loader.EnhancedServiceLoader.load(EnhancedServiceLoader.java:116)
           at org.apache.seata.common.loader.EnhancedServiceLoader.load(EnhancedServiceLoader.java:101)
           at org.apache.seata.server.storage.db.lock.DataBaseLockManager.init(DataBaseLockManager.java:48)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.initInstance(EnhancedServiceLoader.java:707)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.createNewExtension(EnhancedServiceLoader.java:492)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.getExtensionInstance(EnhancedServiceLoader.java:478)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.loadExtension(EnhancedServiceLoader.java:453)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.load(EnhancedServiceLoader.java:347)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.access$200(EnhancedServiceLoader.java:278)
           at org.apache.seata.common.loader.EnhancedServiceLoader.load(EnhancedServiceLoader.java:116)
           at org.apache.seata.common.loader.EnhancedServiceLoader.load(EnhancedServiceLoader.java:101)
           at org.apache.seata.server.lock.LockerManagerFactory.init(LockerManagerFactory.java:70)
           at org.apache.seata.server.lock.LockerManagerFactory.init(LockerManagerFactory.java:53)
           at org.apache.seata.server.lock.LockerManagerFactory.getLockManager(LockerManagerFactory.java:48)
           at org.apache.seata.server.console.impl.AbstractService.<init>(AbstractService.java:45)
           at org.apache.seata.server.console.impl.AbstractBranchService.<init>(AbstractBranchService.java:27)
           at org.apache.seata.server.console.impl.db.BranchSessionDBServiceImpl.<init>(BranchSessionDBServiceImpl.java:61)
           at org.apache.seata.server.console.impl.db.BranchSessionDBServiceImpl$$EnhancerBySpringCGLIB$$f7a9e53e.<init>(<generated>)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
           at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:213)
           at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1326)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1232)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
           at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)
           at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
           at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
           at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
           at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:548)
           at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:524)
           at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:677)
           at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:228)
           at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)
           at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:329)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)
           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
           at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
           at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
           at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
           at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:209)
           at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
           at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
           at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
           at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
           at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
           at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
           at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
           at org.apache.seata.server.ServerApplication.main(ServerApplication.java:30)
   Caused by: org.apache.seata.common.exception.ShouldNeverHappenException: cannot find jdbc folder
           at org.apache.seata.core.store.db.AbstractDataSourceProvider.lambda$validate$2(AbstractDataSourceProvider.java:117)
           at java.util.Optional.orElseThrow(Optional.java:290)
           at org.apache.seata.core.store.db.AbstractDataSourceProvider.validate(AbstractDataSourceProvider.java:117)
           at org.apache.seata.core.store.db.AbstractDataSourceProvider.generate(AbstractDataSourceProvider.java:83)
           at org.apache.seata.core.store.db.AbstractDataSourceProvider.init(AbstractDataSourceProvider.java:74)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.initInstance(EnhancedServiceLoader.java:707)
           at org.apache.seata.common.loader.EnhancedServiceLoader$InnerEnhancedServiceLoader.createNewExtension(EnhancedServiceLoader.java:492)
           ... 62 more
   
   ### Ⅲ. Describe what you expected to happen
   
   _No response_
   
   ### Ⅳ. How to reproduce it (as minimally and precisely as possible)
   
   _No response_
   
   ### Ⅴ. Anything else we need to know?
   
   _No response_
   
   ### Ⅵ. Environment
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker seata-server:latest找不到mysql驱动 [incubator-seata]

Posted by "GCwithH2O (via GitHub)" <gi...@apache.org>.
GCwithH2O commented on issue #7413:
URL: https://github.com/apache/incubator-seata/issues/7413#issuecomment-2942587909

   已解决,
   1、分析 /seata-server-entrypoint.sh得知容器通过 `cat /seata-server/jib-classpath-file` 动态读取 classpath 内容
   2、查看`cat /seata-server/jib-classpath-file` 得知classpath是/seata-server/resources:/seata-server/classes:/seata-server/libs/*
   3、因此只要把mysql-connector-j-8.3.0.jar映射到/seata-server/libs 目录下就可以了(不能是子目录)
   最终命令:
   `podman run --name=seata --net=host --log-opt max-size=10m --log-opt max-file=3 -e TZ=Asia/Shanghai -v /repository/conf/seata:/seata-server/resources -v /repository/conf/seata/jdbc/mysql-connector-j-8.3.0.jar:/seata-server/libs/mysql-connector-j-8.3.0.jar -e SEATA_IP=192.168.0.8 -e TZ=Asia/Shanghai -d docker.io/apache/seata-server:2.4.0`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker seata-server:latest找不到mysql驱动 [incubator-seata]

Posted by "GCwithH2O (via GitHub)" <gi...@apache.org>.
GCwithH2O closed issue #7413: docker seata-server:latest找不到mysql驱动
URL: https://github.com/apache/incubator-seata/issues/7413


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker seata-server:latest找不到mysql驱动 [incubator-seata]

Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #7413:
URL: https://github.com/apache/incubator-seata/issues/7413#issuecomment-2939907216

   Please pause the container and enter it to check if the jdbc path exists.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker seata-server:latest找不到mysql驱动 [incubator-seata]

Posted by "GCwithH2O (via GitHub)" <gi...@apache.org>.
GCwithH2O commented on issue #7413:
URL: https://github.com/apache/incubator-seata/issues/7413#issuecomment-2942568924

   > Please pause the container and enter it to check if the jdbc path exists.
   
   [root@localhost ~]# podman start seata
   seata
   [root@localhost ~]# podman exec  seata ls /seata-server/libs/jdbc
   mysql-connector-j-8.3.0.jar
   README.md


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org