Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Cause: java.sql.SQLException: java.lang.NoClassDefFoundError: Could not initialize class io.seata.rm.datasource.sql.struct.TableMetaCache
; uncategorized SQLException; SQL state [null]; error code [0]; java.lang.NoClassDefFoundError: Could not initialize class io.seata.rm.datasource.sql.struct.TableMetaCache; nested exception is java.sql.SQLException: java.lang.NoClassDefFoundError: Could not initialize class io.seata.rm.datasource.sql.struct.TableMetaCache] with root cause
the reason:
jar package conflicts, delete the spring-cloud-alibaba-seata enough
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-seata</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-all</artifactId>
<version>0.9.0</version>
</dependency>