记一次com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name

报文: ### Error querying database.Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name WMS_Inven

报文:

### Error querying database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'WMS_Inventory_View'.
### The error may exist in file [E:\workspace\clone\oumengcrm\oumeng-biz\oumeng-biz-wms\target\classes\mapping\ProudctMapper.xml]
### The error may involve cn.com.oumeng.biz.wms.mapper.ProductMapper.queryInventoryKL-Inline
### The error occurred while setting parameters
### SQL: select * from WMS_Inventory_View where 1=1                       and sku = ?
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'WMS_Inventory_View'.
; bad SQL grammar []; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'WMS_Inventory_View'.] with root cause
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'WMS_Inventory_View'.

项目背景

通过苞米豆baomidou的@DS注解来实现配置动态数据源的

产生问题原因

在方法上使用了 @Transactional 注解 ,导致了事务内数据源锁定 无法切换

解决

使用 @DSTransactional 注解

发布者:admin,转转请注明出处:http://www.yc00.com/web/1740274587a4220290.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信