1、问题

刚刚在用springboot配置多数据源时,报错如下:

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

  • org.hibernate.cfg.annotations.EntityBinder.processComplementaryTableDefinitions(EntityBinder.java:1236)

The following method did not exist: javax.persistence.Table.indexes()[Ljavax/persistence/Index;

The method's class, javax.persistence.Table, is available from the following locations:

  • jar:file:/C:/practice/springboot/lib/javax.persistence.jar!/javax/persistence/Table.class
  • jar:file:/C:/Users/jiayou/.m2/repository/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar!/javax/persistence/Table.class

It was loaded from the following location:

  • file:/C:/practice/springboot/lib/javax.persistence.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of javax.persistence.Table


2、分析

看了这个链接 NoSuchMethodError in javax.persistence.Table.indexes()[Ljavax/persistence/Index,找到了原因:

当前项目和仓库同时提供了Table.class的类路径。

3、解决

在当前项目的库中删除下面的jar包:

解决:did not exist: javax.persistence.Table.indexes()[Ljavax/persistence/Index相关推荐

  1. Springboot 项目金蝶中间件AAS-9.0启动报错 javax.persistence.Table.indexes()[Ljavax/persistence/Index 问题解决

    Springboot 项目金蝶中间件AAS-9.0启动报错 java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/ ...

  2. java.lang.NoSuchMethodError:javax.persistence.PersistenceContext.synchronization()Ljavax/persistence

    现象:项目本地运行正常,打包后部署到tomcat报上边的错 原因:项目使用的实例化相关包和tomcat中自带的包冲突了! 冲突的jar: <dependency><groupId&g ...

  3. 错误:compatible versions of theorg.hibernate.cfg.annotations.EntityBinder and javx.persistence.Table冲突

    错误 :Correct the classpath of your application so that it contains compatible versions of the classes ...

  4. hive整合HBase:HBase table xsg:test05 doesn't exist while the table is declared as an external table

    版本 虚拟机centOS7 hive 1.2.1 hbase 1.2.6 1,在hive-site.xml中添加配置 <property><name>hbase.zookeep ...

  5. 解决 “OperationalError: (sqlite3.OperationalError) no such table: ...“问题

    解决 "OperationalError: (sqlite3.OperationalError) no such table: ..."问题 参考文章: (1)解决 "O ...

  6. 动态处理表格多行合并单元格、同时解决hover错乱问题 - Vue Element Table

    简介: el-table单元格合并,处理hover错乱问题,自定义底部合计栏. 如图所示: 源码(复制另存txt,修改.html直接运行) <!DOCTYPE html> <html ...

  7. 【registry】 javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;

    1.背景 在 [registries]registrie rest-service idea 无法引入的背景下,以及 [registry]NoSuchFieldError: INCLUDE_ALL 以 ...

  8. BI_开发_问题:ORA-26002: Table DWH.W_XACT_TYPE_D has index defined upon it.

    Database errors occurred: ORA-26002: Table DWH.W_XACT_TYPE_D has index defined upon it. Database dri ...

  9. 解析:type t_string is table of varchar2(32767) index by binary_integer

    @ 理解一: table 相当于是数组,这里定义了一个数组类型t_string; INDEX BY BINARY_INTEGER这里是定义数组下标是整数,因为ORACLE中下标可以是字符串. VARC ...

最新文章

  1. 重磅直播 | 图像对齐算法
  2. Python编程系列教程第12讲——属性和方法
  3. centos 6.5安装GitLab全过程和问题记录
  4. 同事查询多行_从零学会SQL-简单查询
  5. 微信小程序点击按钮实现弹出模态框
  6. 【bzoj1263】[SCOI2006]整数划分 高精度
  7. pip安装报错处理+PyPi源切换教程
  8. c语言 java append_C++中append函数的用法和函数定义。谢谢!
  9. 插件properties_Mybatis3系列 - 4. mybatis-config的properties属性详解
  10. curaengine linux编译,Cura源码在Ubuntu15.04上编译脚本(成功)
  11. 独热编码 one-hot Encoding
  12. USB设备的插入检测
  13. java 获取客户端的域用户名_使用java有没有办法提取局域网中的客户端的用户名,客户端是以域用户身份进去的...
  14. ATL COM类之激活
  15. matlab解微分方程组_MATLAB编程入门 求解常微分方程 通解 特解 数值解
  16. matlab里线性规划,Matlab 中的数学建模算法 —— 线性规划函数
  17. Centos7 Google输入法安装
  18. 2021年CKA考试真题(二)
  19. “奶茶第一股”会花落“草根品牌”蜜雪冰城吗?
  20. 游戏元素属性的设计原则

热门文章

  1. 对forword和redirect的理解
  2. Python opencv图像处理基础总结(一) 环境搭建 基础操作
  3. go语言基础-----18-----协程安全、互斥锁、读写锁、匿名锁、sync.Once
  4. Oracle中decode函数详解
  5. 【免杀】加花指令秒过杀?
  6. linux查看防火墙有没关闭了,linux查看防火墙是否关闭的实例方法
  7. gdb 笔记(11)— info 和 thread 命令(查看线程、切换线程)
  8. 秒杀多线程系列(摘录)
  9. 语义分割之FCN网络详解 全卷积网络
  10. Motor-DK (MM32SPIN05PF, MM32SPIN06PF, MM32SPIN07PF)