You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/09/01 10:41:05 UTC

[GitHub] [shenyu] jbh2507 opened a new issue, #3905: [BUG] </h1><pre> jbh2507 opened a new issue, #3905: URL: https://github.com/apache/shenyu/issues/3905 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Can't find JDBC driver! ShenYu admin is not deployed ### Expected Behavior just run docker with mysql ### Steps To Reproduce 1. use docker image 2.5.0 ``` docker run -v /${some_dir}/ext-lib:/opt/shenyu-admin/ext-lib -e "SPRING_PROFILES_ACTIVE=mysql" -e "spring.datasource.url=jdbc:mysql://${your_ip_port}/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull" -e "spring.datasource.username=${your_username}" -e "spring.datasource.password=${your_password}" -d -p 9095:9095 --net shenyu apache/shenyu-admin:2.5.0 ``` ### Environment ```markdown ShenYu version(s):2.5.0 Docker version: 20.10.17 ``` ### Debug logs Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2022-09-01 19:35:36 [main] ERROR org.springframework.boot.SpringApplication - Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataPermissionAspect' defined in URL [jar:file:/opt/shenyu-bootstrap/lib/shenyu-admin-2.5.0.jar!/org/apache/shenyu/admin/aspect/DataPermissionAspect.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataPermissionServiceImpl' defined in URL [jar:file:/opt/shenyu-bootstrap/lib/shenyu-admin-2.5.0.jar!/org/apache/shenyu/admin/service/impl/DataPermissionServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataPermissionMapper' defined in URL [jar:file:/opt/shenyu-bootstrap/lib/shenyu-admin-2.5.0.jar!/org/apache/shenyu/admin/mapper/DataPermissionMapper.class]: Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionTemplate' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org. springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) 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:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) at org.apache.shenyu.admin.ShenyuAdminBootstrap.main(ShenyuAdminBootstrap.java:36) .... Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver at org.springframework.util.Assert.state(Assert.java:97) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:241) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 86 common frames omitted [shenyu-admin-error.log](https://github.com/apache/shenyu/files/9469139/shenyu-admin-error.log) ### Anything else? It is probably because of the following contents of line 17 of the docker file. 'WORKDIR /opt/shenyu-bootstrap' -> 'WORKDIR /opt/shenyu-admin' -- 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@shenyu.apache.org.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] JooKS-me commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> JooKS-me commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235688249 BTW, I recommend using `docker-compose`. We provide relatively complete scripts and operation steps, which are much more convenient than manually executing long docker commands. (https://shenyu.apache.org/docs/deployment/deployment-docker-compose/) -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] yu199195 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> yu199195 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235037267 can you copy [mysql-connector.jar](https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.29/mysql-connector-java-8.0.29.jar) to /$(your_work_dir)/ext-lib? -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] impactCn commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> impactCn commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235685348 @jbh2507 Updated docker bug above. You can go to docker hub again to pull it. -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] JooKS-me commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> JooKS-me commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235685525 @jbh2507 I read your log, the problem you encountered should be that the mysql driver is not mounted. @jilliss Thanks for your feedback, this problem is now fixed (mirror updated) -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jilliss commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jilliss commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235182512 > If I change the docker volume mount to '/opt/shenyu-bootstrap/ext-lib' and run it, the dirver not found error goes away (although it still fails with other errors) After a brief test, first of all, my environment is the image of `mysql:8` running by Docker and I added this image to Shenyu network (`--net shenyu`) I then mounted the mysql JDBC driver JAR package into the `opt/shenyu-bootstrap/ext-lib` directory When I started the `apache/shenyu-admin:2.5.0` image, I made the following changes to my JDBC URL jdbc:mysql://**shenyu-mysql:3306**/shenyu?useUnicode=true&characterEncoding=utf-8&useSSL=false&**allowPublicKeyRetrieval=true**&serverTimezone=Asia/Shanghai&zeroDateTimeBeh avior=convertToNull Everything is working fine ps `shenyu-mysql` is the name I gave to the mysql container ![image](https://user-images.githubusercontent.com/30598952/188085473-4b2967f3-fd69-4e52-b8d3-01606f3f5c3f.png) -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jilliss commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jilliss commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235187894 > @jilliss > > maybe add to opt/shenyu-admin/ext-lib? only shenyu-admin used mysql. > > > I then mounted the mysql JDBC driver JAR package into the opt/shenyu-bootstrap/ext-lib directory The log shows that the admin container is running in `/opt/shenyu-bootstrap/`. This is an obvious problem. If I do not mount the `/opt/shenyu-admin/ext-lib` container, the `/opt/shenyu-admin` directory will not appear -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] Jiiiiiin commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by "Jiiiiiin (via GitHub)" <gi...@apache.org>.</b><hr/><pre> Jiiiiiin commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1464930560 我也遇到对应的问题, 环境: macos (13.2.1 (22D68)) Docker Compose version v2.15.1 Docker version 20.10.23, build 7155243 shenyu <version>2.6.0-SNAPSHOT</version> 直接 clone 从master; 按照文档:https://shenyu.apache.org/zh/docs/deployment/deployment-local/ 使用 mysql,已初始化脚本,项目使用idea打开,maven 和 idea编译成功,唯一区别,由于使用 nacos 构建注册中心,所以 mysql 沿用其 compose 启动版本: ```bash +-----------+ | version() | +-----------+ | 8.0.31 | +-----------+ ``` 启动之后即: ```bash Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver at org.springframework.util.Assert.state(Assert.java:97) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:241) at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ... 86 common frames omitted ``` 根据上面的讨论,目前通过以下idea配置解决: <img width="869" alt="Pasted Graphic" src="https://user-images.githubusercontent.com/8840636/224491879-88250e9c-023b-416b-8549-84bb1399987b.png"> -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jbh2507 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jbh2507 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235048663 Yes, I did. I also checked that the jar file exists in the '/opt/shenyu-admin/ext-lib' path using the 'docker exec' command. -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jilliss commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jilliss commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235232211 ![image](https://user-images.githubusercontent.com/30598952/188099387-466ff815-9f08-4080-b09d-88dc95e9e415.png) Yes, I know very well that there should be a problem when packing your Docker image. This is the LAYERS of `Shenyu-admin :2.5.0` image that I queried on Docker Hub Its `WORKDIR `should be `shenyu-admin`, right -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jbh2507 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jbh2507 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1236450879 Now it's fully functional! Thanks for your 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jilliss commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jilliss commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235234631 The problem now is that Docker Image version 2.5.0 must be mounted to ` /opt/shenyu-boostrap/ext-lib` in order to work properly. I suggest you repackage the Docker Image -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] yu199195 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> yu199195 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235223015 @jilliss hi,shenyu-admin ,shenyu-boostrap are 2 different applications and should have 2 different directories -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>Re: [I] [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error [shenyu]</h2> <b>Posted by "UncleCatWu (via GitHub)" <gi...@apache.org>.</b><hr/><pre> UncleCatWu commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1833415640 > 我也遇到对应的问题, > > 环境: macos (13.2.1 (22D68)) Docker Compose version v2.15.1 Docker version 20.10.23, build 7155243 > > shenyu 2.6.0-SNAPSHOT > > 直接 clone 从master; > > 按照文档:https://shenyu.apache.org/zh/docs/deployment/deployment-local/ > > 使用 mysql,已初始化脚本,项目使用idea打开,maven 和 idea编译成功,唯一区别,由于使用 nacos 构建注册中心,所以 mysql 沿用其 compose 启动版本: > > ```shell > +-----------+ > | version() | > +-----------+ > | 8.0.31 | > +-----------+ > ``` > > 启动之后即: > > ```shell > Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver > at org.springframework.util.Assert.state(Assert.java:97) > at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:241) > at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193) > at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) > at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) > ... 86 common frames omitted > ``` > > 根据上面的讨论,目前通过以下idea配置解决: > > <img alt="Pasted Graphic" width="869" src="https://user-images.githubusercontent.com/8840636/224491879-88250e9c-023b-416b-8549-84bb1399987b.png"> <img width="1274" alt="image" src="https://github.com/apache/shenyu/assets/18675524/4e2d9962-22ea-4539-84be-b72ea3a22655"> 作用域改成compile也行 -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jbh2507 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jbh2507 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235642682 > The problem now is that Docker Image version 2.5.0 must be mounted to ` /opt/shenyu-boostrap/ext-lib` in order to work properly. I suggest you repackage the Docker Image I mentioned it in the body of the problem, but it doesn't seem to be recognized properly due to a markdown mistake. (I forgot to close the code block correctly) Thanks for checking. -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jbh2507 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jbh2507 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235049625 If I change the docker volume mount to '/opt/shenyu-bootstrap/ext-lib' and run it, the dirver not found error goes away (although it still fails with other errors) -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] jilliss commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> jilliss commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235185460 However, I think this is still a problem, either the documentation is wrong, or the packaging image is wrong ```log 2022-09-02 07:34:43 [main] INFO org.apache.shenyu.admin.ShenyuAdminBootstrap - Starting ShenyuAdminBootstrap v2.5.0 using Java 1.8.0_212 on b7d3ed31f336 with PID 37 (/opt/shenyu-bootstrap/lib/shenyu-admin-2.5.0.jar started by root in /opt/shenyu-bootstrap) ``` > @jilliss > > maybe add to opt/shenyu-admin/ext-lib? only shenyu-admin used mysql. > > > I then mounted the mysql JDBC driver JAR package into the opt/shenyu-bootstrap/ext-lib directory -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] yu199195 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> yu199195 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1235184596 @jilliss maybe add to opt/shenyu-admin/ext-lib? only shenyu-admin used mysql. > I then mounted the mysql JDBC driver JAR package into the opt/shenyu-bootstrap/ext-lib directory -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] JooKS-me closed issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by GitBox <gi...@apache.org>.</b><hr/><pre> JooKS-me closed issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error URL: https://github.com/apache/shenyu/issues/3905 -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> <h2>[GitHub] [shenyu] zhangjun1998 commented on issue #3905: [BUG] ShenYu-admin 2.5.0 docker image not work with mysql jdbc drive error</h2> <b>Posted by "zhangjun1998 (via GitHub)" <gi...@apache.org>.</b><hr/><pre> zhangjun1998 commented on issue #3905: URL: https://github.com/apache/shenyu/issues/3905#issuecomment-1670519256 > 我也遇到对应的问题, > > 环境: macos (13.2.1 (22D68)) Docker Compose version v2.15.1 Docker version 20.10.23, build 7155243 > > shenyu 2.6.0-SNAPSHOT > > 直接 clone 从master; > > 按照文档:https://shenyu.apache.org/zh/docs/deployment/deployment-local/ > > 使用 mysql,已初始化脚本,项目使用idea打开,maven 和 idea编译成功,唯一区别,由于使用 nacos 构建注册中心,所以 mysql 沿用其 compose 启动版本: > > ```shell > +-----------+ > | version() | > +-----------+ > | 8.0.31 | > +-----------+ > ``` > > 启动之后即: > > ```shell > Caused by: java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver > at org.springframework.util.Assert.state(Assert.java:97) > at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:241) > at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:193) > at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:48) > at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:90) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) > ... 86 common frames omitted > ``` > > 根据上面的讨论,目前通过以下idea配置解决: > > <img alt="Pasted Graphic" width="869" src="https://user-images.githubusercontent.com/8840636/224491879-88250e9c-023b-416b-8549-84bb1399987b.png"> 解决了,有用 -- 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@shenyu.apache.org For queries about this service, please contact Infrastructure at: users@infra.apache.org </pre><hr/> </body> </html>