常见异常、bug和重难点 持续更新

这篇博客汇总了Java开发中遇到的各种异常和问题,包括Mybatis的BindingException、Spring的自动注入失败、QuartzConfig冲突、Spring报错、Mybatis懒加载JSON序列化异常、服务访问问题以及Tomcat部署故障等,并提供了相应的解决策略。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

保存全局异常信息 ex=org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sf.gis.emergencytransport.dao.TransOrderMapper.getCompanyOrderList
Invalid bound statement (not found): com.sf.gis.emergencytransport.dao.TransOrderMapper.getCompanyOrderList

原因:别人吧我的mapper.xml文件改了

要不就是你的 没写对

要不就是 mapper-locations: classpath*:mapper/*.xml  沒寫對

要不就是   你之前的java进程没有杀掉,你一直在调用之前的进程

No qualifying bean of type 'com.sf.gis.emergencytransport.mapper.AppletsUserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

自动注入失败 --- 容器中没有该对象 --- 查询AppletsUserMapper是否漏写注解

 Annotation-specified bean name 'quartzConfig' for bean class [com.sf.gis.app.framework.Scheduled.QuartzConfig] conflicts with existing, non-compatible bean definition of same name and class [com.sf.gis.hcfiregovern.config.QuartzConfig]

之前引入的JAR中也有quartz相关的配置

@ComponentScan(basePackages = {"com.sf"}, excludeFilters =
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = com.sf.gis.app.framework.Scheduled.QuartzConfig.class))

用户未认证,请登录如果是spring security

方法1:security.ignorePath=/api/**

方法2:

在COOKIE管理器中添加 

Spring报错:has been injected into other beans [xxx] in its raw version as part of a circular reference

Mybatis懒加载时,springMVC返回JSON异常 Could not write JSON: No serializer found for class

无法访问某个服务

1、ping ip

2、telnet ip port

原因: 服务停了  ;  没有权限  ;  确认是否写错了

tomcat重新发布失效

1、shutdown是否有残余进程(需手动kill掉)

2、查看war包是否替换成功(看更新时间)

3、查看war包解决文件夹是否解压成功(看更新时间)

使用Tomcat 启动war包时报Not running on Jetty, JSR-356 support unavailable 错误 + vue项目发布在tomcat    -- 见博文

自动拆箱失败??? 

 Cause:java.sql.SQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值