![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaEEElement
InterfaceToL
the rigour of mathematics and the safety of projects
展开
-
springMVC启动报错“org.apache.catalina.LifecycleException: A child container failed during start”
问题原因:导入依赖没有设置<scope>如下。解决方案:导入依赖设置<scope>如下。原创 2024-07-20 01:33:16 · 20 阅读 · 0 评论 -
spring整合mybatis报错“Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException:
解决方案:去掉依赖注入或者改为依赖注入dao中的接口的实现类的bean如下。原创 2024-07-17 23:10:46 · 125 阅读 · 0 评论 -
spring aop 失效 失败 没效 不起作用
问题原因:配置类配置的包扫描为@ComponentScan(value={"com.example.dao","com.example.service"}),而aop类在com.example.aop包下,导致没扫描到。解决方案:配置类配置的包扫描改为@ComponentScan(value={"com.exampleservice"})原创 2024-07-17 01:16:07 · 63 阅读 · 0 评论 -
springboot整合rocketmq启动报错“Field rocketMQTemplate in com.example.service.impl.rocketmq.
问题原因:application.yml错误配置如下。解决方案:application.yml正确配置如下。原创 2024-07-14 11:50:38 · 175 阅读 · 0 评论 -
springboot整合rocketmq命令窗口测试producer报错“Caused by: org.apache.rocketmq.remoting.exception.
问题原因:环境变量配置错误变量NAMESER_ADDR。解决方案:环境变量配置正确变量NAMESRV_ADDR。原创 2024-07-14 10:58:22 · 64 阅读 · 0 评论 -
springboot整合jetcache“Caused by: java.lang.IllegalStateException: Error processing condition on com.
问题原因:application.xml错误配置如下。原创 2024-07-12 10:33:01 · 212 阅读 · 0 评论 -
springboot整合jetcache启动报错“java.lang.ClassNotFoundException: redis.clients.jedis.UnifiedJedis”
问题原因:导入依赖如下。解决方案:导入依赖改为。原创 2024-07-11 22:35:37 · 65 阅读 · 0 评论 -
springboot整合cache启动时报错“Property or field ‘id‘ cannot be found on object of type ‘org.springframework
问题原因:@Cacheable(value = "usersCache",key = "id")的key没有加#解决方案:改为@Cacheable(value = "usersCache",key = "#id")原创 2024-07-10 19:58:57 · 98 阅读 · 0 评论 -
springboot启动报错“Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary
解决方案:idea-build菜单-rebuild project。原创 2024-07-10 09:56:57 · 107 阅读 · 0 评论 -
jaxWsServerFactoryBean.create()发布webservice服务报错“java.lang.NullPointerException”
解决方案:jaxWsServerFactoryBean.setAddress("http://127.0.0.1:9000/ws/hello")地址添加协议。问题原因:jaxWsServerFactoryBean.setAddress("127.0.0.1:9000/ws/hello")设置地址时没有协议。原创 2024-06-21 22:42:38 · 94 阅读 · 0 评论 -
springboot整合嵌入的H2后用jdbcTemplate进行单元测试时报错“Database may be already in use:“Locked by another process””
解决方案:命令窗口tasklist | findstr java查找占用的程序并taskkill /pid 20376 -f杀掉。问题原因:有java进程占用。原创 2024-07-09 09:50:43 · 272 阅读 · 0 评论 -
springboot整合mybatisplus报错“Caused by: org.apache.ibatis.exceptions.PersistenceException:
问题原因:启动类中使用了@Bean以及@ConfigurationProperties(prefix = "data-source")中的prefix参数和application.xml配置文件中的不一致。解决方案:注释两个注解及其相关代码或者注释掉@Bean或者修改prefix的参数和application.xml配置文件中的一致。原创 2024-07-08 00:13:16 · 231 阅读 · 0 评论 -
SpringBoot报错“java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/Embedded”
问题原因:缺少jdbc相关的jar包。解决方案:pom中添加依赖如下。原创 2024-07-06 17:51:09 · 103 阅读 · 0 评论 -
springboot依赖报错“failed to read artifact descriptor for org\springframework\spring-test\5.2.8.RELEASE”
问题原因:org\springframework\spring-test\5.2.8.RELEASE目录或其中的文件损坏。解决方案:maven仓库所在目录右键属性-工具-检查-扫描驱动器修复损坏目录或文件。原创 2024-07-06 00:11:32 · 109 阅读 · 0 评论 -
springboot打包报错“Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:........”
程序包com.sun.xml.internal.ws.policy.privateutil不存在”问题原因:缺少maven编译插件。解决方案:pom文件中添加如下。原创 2024-07-04 18:13:52 · 201 阅读 · 0 评论 -
springboot整合mybatis plus测试业务层方法时报错“org.apache.ibatis.binding.BindingException:
问题原因:dao层定义了public User getUserById(int id),但没有给其添加@Select注解,所以当业务层注入dao调用该接口来重写业务层的接口时没有sql语句可以执行。解决方案:getUserById(int id)方法上添加@Select注解。原创 2024-07-04 01:32:40 · 113 阅读 · 0 评论 -
springboot整合mybatis plus测试报错“Error reading file:invalid CEN header (bad signature)”
错误的类文件: /D:/WorkingSoftwareInstall/maven/scarepository/org/springframework/spring-context/6.1.10/spring-context-6.1.10.jar!继续报错:“Cause: java.sql.SQLSyntaxErrorException: Table 'xxxxxx.user' doesn't exist”问题原因:默认使用domain中的User作为sql语句中的表名。原创 2024-07-03 18:18:37 · 316 阅读 · 0 评论 -
springboot2.3.2整合mybatis测试报错“Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionExcept
错误的类文件: /D:/WorkingSoftwareInstall/maven/scarepository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar!问题原因:创建springboot工程选择的是3.3.1版本,pom文件中改为2.3.2版本(参见前贴)解决方案:pom文件中parent版本改回3.3.1版本。原创 2024-07-03 16:23:36 · 148 阅读 · 0 评论 -
springboot整合mybatis导入依赖报错“Problem:unresolved dependency:“com.mysql:mysql-connector-j:jar unknown”
问题原因:idea2019.1选择的springboot版本为3.1.1,默认导入的mysql相关依赖如下:解决方案:修改parent版本为2.3.2.RELEASE,然后再修改mysql相关依赖如下:原创 2024-07-03 15:53:33 · 102 阅读 · 1 评论 -
springboot2.3.2.RELEASE用自动装配注解封装配置文件数据时报错“Could not autowire. No beans of ‘Environment‘ type found.”
解决方案:正确导包import org.springframework.core.env.Environment。问题原因:错误导包import org.omg.CORBA.Environment。原创 2024-07-03 11:53:34 · 96 阅读 · 0 评论 -
springboot启动web项目报错“无效的目标发行版:17”
问题原因:idea的java complier配置的模块target bytecode version为17。解决方案:idea的java complier配置的模块target bytecode version改为8。原创 2024-06-30 22:53:41 · 84 阅读 · 0 评论 -
jsp使用标签<%@ taglib prefix=“c“ uri=“http://java.sun.com/jsp/jstl/core“ %>引入jstl时uri属性报红
解决方案:添加jstl.impl-1.2.jar和javax.servlet.jsp.jstl-api-1.2.1.jar。原创 2024-06-30 13:09:48 · 330 阅读 · 0 评论 -
maven项目启动tomcat7报错“org.springframework.beans.factory.parsing.BeanDefinitionParsingException: ”
问题背景:maven创建一个web项目,用于编写集成spring的jaxws风格的webservice服务端。问题原因:applicationContext.xml使用错误的标签解决方案:applicationContext.xml使用错误的标签原创 2024-06-23 12:18:57 · 110 阅读 · 0 评论 -
maven项目启动tomcat7报错“Unable to process Jar entry”
问题原因:pom.xml文件中spring相关导包版本导致。解决方案:pom.xml文件中spring相关导包版本修改。原创 2024-06-23 11:48:41 · 103 阅读 · 0 评论 -
maven创建的web项目pom.xml配置的tomcat7插件不生效
</plugins></pluginManagement>解决方案:tomcat7插件改为配置在<plugins>原创 2024-06-23 00:52:21 · 110 阅读 · 0 评论 -
javaweb使用druid连接池报错“com.mysql.cj.exceptions.CJException: Access denied for user ‘‘@‘localhost‘ ”
问题原因:druid.properties配置文件参数名user错误。解决方案:user改为username。原创 2024-06-19 08:15:52 · 82 阅读 · 0 评论 -
idea2019.1版本使用maven3.5.4引入依赖报错“Unable to import maven project: See logs for details”
问题原因:idea和maven版本不兼容。解决方案:改用低版本maven3.2.5。原创 2024-06-19 23:16:02 · 89 阅读 · 0 评论 -
JdbcTemplate调用query方法报错“org.springframework.dao.DataAccessException”
解决方案:lib中导入spring-core-5.0.17.jar。问题原因:缺少spring-core包。原创 2024-06-17 22:35:16 · 63 阅读 · 0 评论 -
th合并边框无效
问题原因:th设置collapse属性不生效。问题背景:合并th元素的边框。原创 2024-06-01 21:46:01 · 135 阅读 · 0 评论 -
浏览器控制台报错“TypeError: Cannot read properties of undefined (reading ‘appendChild‘)”
问题原因:创建tr元素时,用setAttribute。问题背景:通过元素点击事件给td赋值。原创 2024-06-01 17:53:04 · 98 阅读 · 0 评论 -
浏览器控制台报错“TypeError: Failed to execute ‘appendChild‘ on ‘Node‘: parameter 1 is not of type ‘Node‘”
问题原因:获取到的id值不是一个node,不能用appendChild方法。问题背景:通过元素点击事件给td赋值。原创 2024-06-01 17:46:46 · 99 阅读 · 0 评论 -
浏览器访问servlet报错“此URL不支持Http方法GET描述”
问题原因:继承HttpServlet时重写的doget和dopost方法中使用了super.doGet(req, resp)和super.doPost(req, resp)解决方案:删除父类调用代码。原创 2024-05-26 09:53:35 · 204 阅读 · 0 评论 -
idea2019启动tomcat9.0报错“Application Server was not connected before run configuration stop, reason:”
java.io.IOException: Failed to retrieve RMIServer stub原创 2024-05-25 22:07:53 · 229 阅读 · 0 评论