自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 收藏
  • 关注

原创 pycharm安装scikit-learn1.5.1报错“UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0x9c in position 2:

解决方案:在报错位置return self._path.joinpath(filename).read_text(encoding='utf-8')添加参数errors='ignore'为return self._path.joinpath(filename).read_text(encoding='utf-8',errors='ignore')问题原因:未明,这个错误通常是由于文件编码不兼容或文件格式不正确导致的。

2024-08-20 13:15:33 83 1

原创 pycharm运行报错“AttributeError: module ‘matplotlib.tri‘ has no attribute ‘tricontour‘”

问题原因:或为pycharm的bug。

2024-08-10 10:29:54 107

原创 pycharm安装pandas2.1.0报错“note: This is an issue with the package mentioned above, not pip.”

问题原因:是包pandas2.1.0的问题,可能是和pycharm2022.3.3或python3.12不兼容,或pandas2.1.0过时或错误。解决方案:下载pycharm默认选择的最新pandas2.2.2。

2024-08-08 01:49:19 152

原创 springboot启动报错“ERROR org.springframework.boot.SpringApplication - Application run failed

问题原因:启动错误jar包java -jar shortcut-0.0.1-SNAPSHOT.jar。解决方案:启动正确jar包original-shortcut-0.0.1-SNAPSHOT.jar。

2024-07-31 12:44:24 172

原创 html页面js绑定点击事件报错“Uncaught TypeError: Cannot set properties of null (setting ‘onclick’)”

解决方案:document.getElementById("cloudmusic").onclick=function ()去掉参数中#问题原因:document.getElementById("#cloudmusic").onclick=function ()参数错误。

2024-07-31 01:57:08 123

原创 ssm启动“A required class was missing while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.1”

问题原因:tomcat7插件版本2.1突然失效。解决方案:tomcat7插件版本改为2.2。

2024-07-22 22:54:04 102

原创 ssm整合表现层和前端数据传输协议报错“HttpMessageNotWritableException: No converter found for return value of type: ”

问题原因:数据传输协议类没有set方法。解决方案:数据传输协议类添加set方法。

2024-07-22 02:10:15 129

原创 ssm整合在controller层用@Autowired自动装配service层对象时报错“No Beans Of ‘UserService‘ type found”

问题原因:MVC配置了类的注解@ComponentScan("com.example.controller")扫描范围问题?解决方案:项目正常启动和正常访问,暂不处理。

2024-07-21 23:18:45 89

原创 ssm整合单元测试报错“java.lang.IllegalStateException: No ServletContext set”

问题原因:@EnableWebMvc注解与SpringBootTest.WebEnvironment.NONE冲突导致。解决方案:注释掉@EnableWebMvc注解后即可。

2024-07-21 23:02:49 150

原创 springMVC启动报错“org.apache.catalina.LifecycleException: A child container failed during start”

问题原因:导入依赖没有设置<scope>如下。解决方案:导入依赖设置<scope>如下。

2024-07-20 01:33:16 141

原创 spring整合mybatis报错“Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException:

解决方案:去掉依赖注入或者改为依赖注入dao中的接口的实现类的bean如下。

2024-07-17 23:10:46 196

原创 spring aop 失效 失败 没效 不起作用

问题原因:配置类配置的包扫描为@ComponentScan(value={"com.example.dao","com.example.service"}),而aop类在com.example.aop包下,导致没扫描到。解决方案:配置类配置的包扫描改为@ComponentScan(value={"com.exampleservice"})

2024-07-17 01:16:07 108

原创 springboot整合rocketmq启动报错“Field rocketMQTemplate in com.example.service.impl.rocketmq.

问题原因:application.yml错误配置如下。解决方案:application.yml正确配置如下。

2024-07-14 11:50:38 427

原创 springboot整合rocketmq命令窗口测试producer报错“Caused by: org.apache.rocketmq.remoting.exception.

问题原因:环境变量配置错误变量NAMESER_ADDR。解决方案:环境变量配置正确变量NAMESRV_ADDR。

2024-07-14 10:58:22 105

原创 springboot整合jetcache“Caused by: java.lang.IllegalStateException: Error processing condition on com.

问题原因:application.xml错误配置如下。

2024-07-12 10:33:01 273

原创 springboot整合jetcache启动报错“java.lang.ClassNotFoundException: redis.clients.jedis.UnifiedJedis”

问题原因:导入依赖如下。解决方案:导入依赖改为。

2024-07-11 22:35:37 115

原创 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 157

原创 springboot启动报错“Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary

解决方案:idea-build菜单-rebuild project。

2024-07-10 09:56:57 182

原创 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 306

原创 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 282

原创 SpringBoot报错“java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/Embedded”

问题原因:缺少jdbc相关的jar包。解决方案:pom中添加依赖如下。

2024-07-06 17:51:09 168

原创 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 150

原创 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 312

原创 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 129

原创 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 381

原创 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 164

原创 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 200 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 113

原创 springboot启动web项目报错“无效的目标发行版:17”

问题原因:idea的java complier配置的模块target bytecode version为17。解决方案:idea的java complier配置的模块target bytecode version改为8。

2024-06-30 22:53:41 134

原创 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 389

原创 window11命令窗口ssh登录vm虚拟机报错“@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @”

问题原因:ssh会把每访问过计算机的公钥(public key)都记录在users/xxx/.ssh/known_hosts。解决方案:删除known_hosts的全部内容。

2024-06-27 12:05:52 95

原创 Xshell连接时报错“服务器发送了一个意外的数据包。received:3,expected:20”

解决方案:改用finallshell终端连接。问题原因:所用Xshell和VM不兼容。

2024-06-24 21:47:09 271

原创 Xshell连接VM报错“Could not connect to ‘192.168.xxx.xxx’(port 22): Connection failed.”

解决方案:sudo apt-get install openssh-server命令下载ssh。问题原因:没有安装ssh服务。

2024-06-24 21:35:02 271

原创 maven项目启动tomcat7报错“org.springframework.beans.factory.parsing.BeanDefinitionParsingException: ”

问题背景:maven创建一个web项目,用于编写集成spring的jaxws风格的webservice服务端。问题原因:applicationContext.xml使用错误的标签解决方案:applicationContext.xml使用错误的标签

2024-06-23 12:18:57 156

原创 maven项目启动tomcat7报错“Unable to process Jar entry”

问题原因:pom.xml文件中spring相关导包版本导致。解决方案:pom.xml文件中spring相关导包版本修改。

2024-06-23 11:48:41 150

原创 maven创建的web项目pom.xml配置的tomcat7插件不生效

</plugins></pluginManagement>解决方案:tomcat7插件改为配置在<plugins>

2024-06-23 00:52:21 140

原创 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 119

原创 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 104

原创 javaweb使用druid连接池报错“com.mysql.cj.exceptions.CJException: Access denied for user ‘‘@‘localhost‘ ”

问题原因:druid.properties配置文件参数名user错误。解决方案:user改为username。

2024-06-19 08:15:52 110

原创 JdbcTemplate调用query方法报错“org.springframework.dao.DataAccessException”

解决方案:lib中导入spring-core-5.0.17.jar。问题原因:缺少spring-core包。

2024-06-17 22:35:16 80

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除